|
336 | 336 | --kb-dive-ray: rgba(74, 155, 217, 0.06); |
337 | 337 | --kb-dive-fog: rgba(12, 21, 36, 0.7); |
338 | 338 | } |
| 339 | + |
| 340 | +/* ============================================ |
| 341 | + 双光源材质(按钮质感) - 环境光 + 自发光 + 微噪点 + 按压点亮 |
| 342 | + ============================================ */ |
| 343 | +[data-theme="dark"] .kb-btn-primary-material, |
| 344 | +[data-theme="dark"] .kb-btn-ai-material { |
| 345 | + position: relative; |
| 346 | + overflow: hidden; |
| 347 | +} |
| 348 | +/* 深色 · 主按钮:海面光(顶部环境光)+ 磷光自发光(内透) */ |
| 349 | +[data-theme="dark"] .kb-btn-primary-material { |
| 350 | + background: radial-gradient(120% 130% at 50% 0%, |
| 351 | + #57C6A9 0%, #40AB92 55%, #2F7D6A 100%); |
| 352 | + box-shadow: |
| 353 | + inset 0 1px 0 rgba(255, 255, 255, 0.18), |
| 354 | + inset 0 -3px 8px rgba(4, 16, 12, 0.25), |
| 355 | + 0 1px 3px rgba(4, 16, 12, 0.35), |
| 356 | + 0 0 14px rgba(64, 171, 146, 0.22); |
| 357 | + transition: |
| 358 | + box-shadow 150ms var(--kb-ease-smooth), |
| 359 | + background 150ms var(--kb-ease-smooth), |
| 360 | + transform 150ms var(--kb-ease-out); |
| 361 | +} |
| 362 | +[data-theme="dark"] .kb-btn-primary-material:hover { |
| 363 | + background: radial-gradient(120% 130% at 50% 0%, |
| 364 | + #6FDDBF 0%, #57C6A9 55%, #3B9E86 100%); |
| 365 | + box-shadow: |
| 366 | + inset 0 1px 0 rgba(255, 255, 255, 0.22), |
| 367 | + inset 0 -3px 8px rgba(4, 16, 12, 0.22), |
| 368 | + 0 1px 3px rgba(4, 16, 12, 0.3), |
| 369 | + 0 0 18px rgba(64, 171, 146, 0.32); |
| 370 | +} |
| 371 | +[data-theme="dark"] .kb-btn-primary-material:active { |
| 372 | + background: radial-gradient(120% 130% at 50% 0%, |
| 373 | + #47AB92 0%, #328E79 60%, #256B5C 100%); |
| 374 | + box-shadow: |
| 375 | + inset 0 0 14px rgba(255, 255, 255, 0.22), |
| 376 | + inset 0 1px 0 rgba(255, 255, 255, 0.18), |
| 377 | + 0 0 10px rgba(64, 171, 146, 0.25); |
| 378 | + transform: scale(0.97); |
| 379 | +} |
| 380 | +/* 深色 · AI 按钮:磷光蓝自发光 */ |
| 381 | +[data-theme="dark"] .kb-btn-ai-material { |
| 382 | + background: radial-gradient(120% 130% at 50% 0%, |
| 383 | + #6FB4E8 0%, #4A9BD9 55%, #3578B5 100%); |
| 384 | + box-shadow: |
| 385 | + inset 0 1px 0 rgba(255, 255, 255, 0.16), |
| 386 | + inset 0 -3px 8px rgba(4, 16, 12, 0.22), |
| 387 | + 0 0 14px rgba(74, 155, 217, 0.22); |
| 388 | + transition: |
| 389 | + box-shadow 150ms var(--kb-ease-smooth), |
| 390 | + background 150ms var(--kb-ease-smooth), |
| 391 | + transform 150ms var(--kb-ease-out); |
| 392 | +} |
| 393 | +[data-theme="dark"] .kb-btn-ai-material:hover { |
| 394 | + background: radial-gradient(120% 130% at 50% 0%, |
| 395 | + #8AC6F0 0%, #6FB4E8 55%, #4A9BD9 100%); |
| 396 | + box-shadow: |
| 397 | + inset 0 1px 0 rgba(255, 255, 255, 0.2), |
| 398 | + inset 0 -3px 8px rgba(4, 16, 12, 0.2), |
| 399 | + 0 0 18px rgba(74, 155, 217, 0.32); |
| 400 | +} |
| 401 | +[data-theme="dark"] .kb-btn-ai-material:active { |
| 402 | + background: radial-gradient(120% 130% at 50% 0%, |
| 403 | + #5FA8DE 0%, #3D7FBB 60%, #2E6598 100%); |
| 404 | + box-shadow: |
| 405 | + inset 0 0 14px rgba(255, 255, 255, 0.22), |
| 406 | + inset 0 1px 0 rgba(255, 255, 255, 0.16), |
| 407 | + 0 0 10px rgba(74, 155, 217, 0.25); |
| 408 | + transform: scale(0.97); |
| 409 | +} |
| 410 | +/* 微噪点层:1px 颗粒,肉眼近不可见(feTurbulence data-URI) */ |
| 411 | +[data-theme="dark"] .kb-btn-primary-material::after, |
| 412 | +[data-theme="dark"] .kb-btn-ai-material::after { |
| 413 | + content: ''; |
| 414 | + position: absolute; |
| 415 | + inset: 0; |
| 416 | + pointer-events: none; |
| 417 | + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); |
| 418 | + background-size: 120px 120px; |
| 419 | + opacity: 0.03; |
| 420 | + transition: opacity 150ms ease; |
| 421 | +} |
| 422 | +[data-theme="dark"] .kb-btn-primary-material:hover::after, |
| 423 | +[data-theme="dark"] .kb-btn-ai-material:hover::after { |
| 424 | + opacity: 0.06; |
| 425 | +} |
| 426 | + |
| 427 | +:root .kb-btn-primary-material, |
| 428 | +:root .kb-btn-ai-material { |
| 429 | + position: relative; |
| 430 | + overflow: hidden; |
| 431 | +} |
| 432 | +/* 浅色 · 主按钮:晨光(顶部受光)+ 琥珀自发光 */ |
| 433 | +:root .kb-btn-primary-material { |
| 434 | + background: linear-gradient(180deg, #C97A22 0%, #B05E12 55%, #A3550E 100%); |
| 435 | + box-shadow: |
| 436 | + inset 0 1px 0 rgba(255, 255, 255, 0.28), |
| 437 | + inset 0 -1px 0 rgba(0, 0, 0, 0.12), |
| 438 | + 0 2px 6px rgba(154, 79, 12, 0.22); |
| 439 | + transition: |
| 440 | + box-shadow 150ms var(--kb-ease-smooth), |
| 441 | + background 150ms var(--kb-ease-smooth), |
| 442 | + transform 150ms var(--kb-ease-out); |
| 443 | +} |
| 444 | +:root .kb-btn-primary-material:hover { |
| 445 | + background: linear-gradient(180deg, #D88A2E 0%, #C06A15 55%, #B05E12 100%); |
| 446 | + box-shadow: |
| 447 | + inset 0 1px 0 rgba(255, 255, 255, 0.32), |
| 448 | + inset 0 -1px 0 rgba(0, 0, 0, 0.1), |
| 449 | + 0 4px 10px rgba(154, 79, 12, 0.28); |
| 450 | +} |
| 451 | +:root .kb-btn-primary-material:active { |
| 452 | + background: linear-gradient(180deg, #B05E12 0%, #9A4F0C 55%, #8A450A 100%); |
| 453 | + box-shadow: |
| 454 | + inset 0 2px 6px rgba(0, 0, 0, 0.18), |
| 455 | + inset 0 1px 0 rgba(255, 255, 255, 0.2), |
| 456 | + 0 1px 3px rgba(154, 79, 12, 0.2); |
| 457 | + transform: scale(0.97); |
| 458 | +} |
| 459 | +/* 浅色 · AI 按钮:磷光蓝 */ |
| 460 | +:root .kb-btn-ai-material { |
| 461 | + background: linear-gradient(180deg, #3B6FA8 0%, #2B5F9E 55%, #24517F 100%); |
| 462 | + box-shadow: |
| 463 | + inset 0 1px 0 rgba(255, 255, 255, 0.22), |
| 464 | + inset 0 -1px 0 rgba(0, 0, 0, 0.1), |
| 465 | + 0 2px 6px rgba(43, 95, 158, 0.22); |
| 466 | + transition: |
| 467 | + box-shadow 150ms var(--kb-ease-smooth), |
| 468 | + background 150ms var(--kb-ease-smooth), |
| 469 | + transform 150ms var(--kb-ease-out); |
| 470 | +} |
| 471 | +:root .kb-btn-ai-material:hover { |
| 472 | + background: linear-gradient(180deg, #4A7DB0 0%, #3B6FA8 55%, #2B5F9E 100%); |
| 473 | + box-shadow: |
| 474 | + inset 0 1px 0 rgba(255, 255, 255, 0.26), |
| 475 | + inset 0 -1px 0 rgba(0, 0, 0, 0.08), |
| 476 | + 0 4px 10px rgba(43, 95, 158, 0.28); |
| 477 | +} |
| 478 | +:root .kb-btn-ai-material:active { |
| 479 | + background: linear-gradient(180deg, #2B5F9E 0%, #24517F 55%, #1E4366 100%); |
| 480 | + box-shadow: |
| 481 | + inset 0 2px 6px rgba(0, 0, 0, 0.18), |
| 482 | + inset 0 1px 0 rgba(255, 255, 255, 0.18), |
| 483 | + 0 1px 3px rgba(43, 95, 158, 0.2); |
| 484 | + transform: scale(0.97); |
| 485 | +} |
| 486 | +/* 浅色微噪点(晨光实体表面,更淡) */ |
| 487 | +:root .kb-btn-primary-material::after, |
| 488 | +:root .kb-btn-ai-material::after { |
| 489 | + content: ''; |
| 490 | + position: absolute; |
| 491 | + inset: 0; |
| 492 | + pointer-events: none; |
| 493 | + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); |
| 494 | + background-size: 120px 120px; |
| 495 | + opacity: 0.025; |
| 496 | + transition: opacity 150ms ease; |
| 497 | +} |
| 498 | +:root .kb-btn-primary-material:hover::after, |
| 499 | +:root .kb-btn-ai-material:hover::after { |
| 500 | + opacity: 0.05; |
| 501 | +} |
| 502 | +/* reduced-motion:动效退化(按压点亮仅保留纯色变化) */ |
| 503 | +@media (prefers-reduced-motion: reduce) { |
| 504 | + .kb-btn-primary-material, |
| 505 | + .kb-btn-ai-material { |
| 506 | + transition: none; |
| 507 | + transform: none !important; |
| 508 | + } |
| 509 | +} |
0 commit comments