/* Prism Portfolio — design tokens from designs.md */
:root {
  --bg-base: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.7) 50%, rgba(240, 147, 251, 0.8) 100%);
  --bg-surface: rgba(17, 19, 26, 0.9);
  --bg-glass: rgba(17, 19, 26, 0.85);
  --grad-primary: linear-gradient(135deg, #7b2cbf 0%, #3c8aff 100%);
  --accent-red: #ff6b6b;
  --text-primary: #ffffff;
  --text-secondary: #f0f0f0;
  --border-light: rgba(255, 255, 255, 0.12);
  --theme-accent: #3c8aff;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}

/* Theme variants from ability prism */
[data-theme="snowstorm"] {
  --theme-accent: #ffb347;
  --bg-base: linear-gradient(135deg, rgba(10, 10, 20, 0.8) 0%, rgba(20, 20, 40, 0.7) 50%, rgba(10, 10, 20, 0.8) 100%);
}
[data-theme="universe"] {
  --theme-accent: #5a6bff;
  --bg-base: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(10, 10, 10, 0.85) 50%, rgba(0, 0, 0, 0.9) 100%);
}
[data-theme="moonnight"] {
  --theme-accent: #2dd4bf;
  --bg-base: linear-gradient(135deg, rgba(10, 50, 100, 0.8) 0%, rgba(50, 100, 150, 0.7) 50%, rgba(10, 50, 100, 0.8) 100%);
}

/* Additional theme colors */
[data-theme="fresh-blue"] {
  --theme-accent: #3c8aff;
  --bg-base: linear-gradient(135deg, rgba(10, 16, 42, 0.8) 0%, rgba(16, 26, 62, 0.7) 50%, rgba(10, 16, 42, 0.8) 100%);
}

[data-theme="soft-pink"] {
  --theme-accent: #ff7eb6;
  --bg-base: linear-gradient(135deg, rgba(42, 10, 26, 0.8) 0%, rgba(62, 16, 42, 0.7) 50%, rgba(42, 10, 26, 0.8) 100%);
}

[data-theme="premium-black"] {
  --theme-accent: #a0a0a0;
  --bg-base: linear-gradient(135deg, rgba(10, 10, 10, 0.8) 0%, rgba(26, 26, 26, 0.7) 50%, rgba(10, 10, 10, 0.8) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  min-height: 100vh;
  transition: all var(--duration-slow) var(--ease-out-expo);
  position: relative;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}



@keyframes slideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

body.minimal-mode *,
body.minimal-mode *::before,
body.minimal-mode *::after {
  animation: none !important;
  transition-duration: 0.01ms !important;
}

body.minimal-mode .glass,
body.minimal-mode .prism-face,
body.minimal-mode .work-card,
body.minimal-mode .site-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--bg-surface) !important;
}

body.minimal-mode #particles-canvas,
body.minimal-mode #sakura-canvas,
body.minimal-mode .hero-video-wrap video,
body.minimal-mode .hero-star-bokeh {
  display: none !important;
}

body.minimal-mode .hero-fallback {
  display: block !important;
  opacity: 1 !important;
}

a {
  color: var(--theme-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 44, 191, 0.5) var(--bg-base);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-base);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7b2cbf, #3c8aff);
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3xl);
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 19, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--duration-normal) var(--ease-out-expo);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.site-header.scrolled {
  background: rgba(17, 19, 26, 0.95);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  padding: var(--space-sm) var(--space-3xl);
}
@media (max-width: 768px) {
  .site-header {
    padding: var(--space-md) 20px;
  }
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo:hover {
  text-decoration: none;
  color: var(--theme-accent);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--duration-normal) var(--ease-out-expo);
  border-radius: 8px;
  padding: 0 var(--space-sm);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--theme-accent);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--theme-accent);
  border-radius: 1px;
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 80%;
}

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1000;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    flex-direction: column;
    background: rgba(17, 19, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 20px 20px;
    transition: right var(--duration-normal) var(--ease-out-expo);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
  }
  .nav-links.active {
    right: 0;
  }
  .nav-links a {
    justify-content: flex-start;
    padding: var(--space-md) var(--space-sm);
    border-radius: 8px;
  }
  .nav-links a span.long {
    display: inline;
  }
}

@media (max-width: 640px) {
  .nav-links {
    width: 200px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-lg);
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  animation: shine 3s linear infinite;
  opacity: 0;
  transition: opacity var(--duration-normal);
  z-index: -1;
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(60, 138, 255, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 32px rgba(60, 138, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--theme-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--space-3xl);
  overflow: hidden;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  will-change: transform;
}
.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 隐藏浏览器默认控件 */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* 确保没有默认的播放按钮 */
  pointer-events: none;
  /* 去除可能的边框 */
  border: none;
  outline: none;
}
.hero-video-wrap .hero-bg-video {
  object-position: center bottom;
  filter: saturate(1.2) hue-rotate(15deg) brightness(0.8) contrast(1.1);
}

.hero-video-wrap .hero-watermark-video {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: auto;
  z-index: 10;
  filter: brightness(1.5) contrast(1.2);
  mix-blend-mode: screen;
  opacity: 1;
}
.hero-star-bokeh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(195, 220, 255, 0.16) 0 2px, transparent 8px),
    radial-gradient(circle at 72% 36%, rgba(194, 170, 255, 0.14) 0 2px, transparent 9px),
    radial-gradient(circle at 58% 62%, rgba(166, 206, 255, 0.12) 0 2px, transparent 8px),
    radial-gradient(circle at 40% 18%, rgba(236, 240, 255, 0.11) 0 1px, transparent 7px);
  opacity: 0.75;
  mix-blend-mode: screen;
  z-index: 1;
  animation: star-breathe 5s ease-in-out infinite;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.44) 100%);
  z-index: 1;
}
.hero-fallback {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1a0a2e 0%, #0a0a0f 40%, #16213e 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  z-index: 2;
  pointer-events: none;
}

.hero-top-scrolling-text {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 4;
  overflow: hidden;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.top-scrolling-content {
  white-space: nowrap;
  animation: scroll-right 120s linear infinite;
}

.top-artistic-text {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
  margin: 0;
  letter-spacing: 2px;
  line-height: 1.2;
  white-space: nowrap;
  filter: brightness(1.5) contrast(1.2);
  mix-blend-mode: screen;
  opacity: 1;
}

/* 响应式调整 - 顶部滚动文本 */
@media (max-width: 768px) {
  .top-artistic-text {
    font-size: 1.1rem;
    letter-spacing: 1px;
  }
  .hero-top-scrolling-text {
    height: 50px;
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .top-artistic-text {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }
  .hero-top-scrolling-text {
    height: 40px;
    padding: 0 10px;
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% + 100vw));
  }
}

.hero-content-top {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 50vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  overflow: hidden;
}

.scrolling-text {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.text-content {
  display: inline-block;
  animation: scroll-left 45s linear infinite;
  text-align: center;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(calc(-100% + 100vw));
  }
}

.artistic-text {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  font-style: italic;
  color: rgba(128, 128, 128, 0.5);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
  margin: 0 0 0.5em;
  letter-spacing: 2px;
  line-height: 1.2;
  white-space: nowrap;
  animation: scroll-left 45s linear infinite;
  display: inline-block;
  position: relative;
  left: 100%;
}

.artistic-text.english {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1em;
}

/* 响应式调整 - 艺术文本 */
@media (max-width: 768px) {
  .artistic-text {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  .artistic-text.english {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .artistic-text {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
  }
  .artistic-text.english {
    font-size: 1.5rem;
  }
  .hero-content-top {
    height: 40vh;
    padding-top: 8vh;
  }
  .hero-content-bottom {
    height: 60vh;
  }
}

.hero-tagline.english {
  font-size: 1rem;
  margin-bottom: 1em;
}

.hero-content-bottom {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pyramid-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pyramid {
  width: 80px;
  height: 80px;
  position: relative;
  margin-bottom: 2rem;
  transform-style: preserve-3d;
  animation: rotate 20s linear infinite;
  transform: translateX(-20px);
}

.pyramid-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform-style: preserve-3d;
}

.pyramid-face {
  position: absolute;
  width: 80px;
  height: 57px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(218, 165, 32, 0.05));
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transform-origin: center bottom;
}

.pyramid-face:nth-child(1) {
  top: 0;
  transform: rotateY(0deg) translateZ(34.6px);
}

.pyramid-face:nth-child(2) {
  top: 0;
  transform: rotateY(90deg) translateZ(34.6px);
}

.pyramid-face:nth-child(3) {
  top: 0;
  transform: rotateY(180deg) translateZ(34.6px);
}

.pyramid-face:nth-child(4) {
  top: 0;
  transform: rotateY(270deg) translateZ(34.6px);
}

.pyramid-face:nth-child(5) {
  top: 40px;
  transform: rotateY(0deg) rotateX(180deg) translateZ(34.6px);
}

.pyramid-face:nth-child(6) {
  top: 40px;
  transform: rotateY(90deg) rotateX(180deg) translateZ(34.6px);
}

.pyramid-face:nth-child(7) {
  top: 40px;
  transform: rotateY(180deg) rotateX(180deg) translateZ(34.6px);
}

.pyramid-face:nth-child(8) {
  top: 40px;
  transform: rotateY(270deg) rotateX(180deg) translateZ(34.6px);
}

@keyframes rotate {
  0% {
    transform: rotateY(0deg) rotateX(0deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(360deg);
  }
}

.pyramid-container::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.pyramid-container::after {
  content: '';
  position: absolute;
  width: 250px;
  height: 250px;
  border: 2px solid rgba(218, 165, 32, 0.7);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite reverse;
  box-shadow: 0 0 15px rgba(218, 165, 32, 0.4);
}

.pyramid-container .golden-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
}

.golden-ring {
  position: absolute;
  border: 1px solid rgba(255, 215, 0, 0.6);
  border-radius: 50%;
  animation: rotate 15s linear infinite reverse;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.golden-ring:nth-child(1) {
  width: 200px;
  height: 200px;
  top: 0;
  left: 0;
  animation-duration: 15s;
}

.golden-ring:nth-child(2) {
  width: 160px;
  height: 160px;
  top: 20px;
  left: 20px;
  animation-duration: 20s;
  animation-delay: -2s;
}

.golden-ring:nth-child(3) {
  width: 120px;
  height: 120px;
  top: 40px;
  left: 40px;
  animation-duration: 25s;
  animation-delay: -4s;
}

.golden-ring:nth-child(4) {
  width: 80px;
  height: 80px;
  top: 60px;
  left: 60px;
  animation-duration: 30s;
  animation-delay: -6s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .artistic-text {
    font-size: 2rem;
  }
  
  .artistic-text.english {
    font-size: 1.2rem;
  }
  
  .pyramid {
    width: 150px;
    height: 150px;
  }
  
  .pyramid-container::before {
    width: 250px;
    height: 250px;
  }
  
  .pyramid-container::after {
    width: 200px;
    height: 200px;
  }
}
.hero-tagline {
  font-family: '仿宋', 'FangSong', 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1.125rem;
  color: #f0f0f0;
  margin-bottom: var(--space-xl);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  min-height: 44px;
  justify-content: center;
  animation: pulse-arrow 1.5s ease-in-out infinite;
}
@keyframes star-breathe {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 0.86;
  }
}
.scroll-hint svg {
  width: 24px;
  height: 24px;
}
@keyframes pulse-arrow {
  0%,
  100% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) translateY(6px);
  }
}

/* Sections */
section {
  padding: var(--space-3xl) 0;
}
.section-title {
  font-size: 2.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin: 0 0 var(--space-xl);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--theme-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--theme-accent);
  border-radius: 2px;
  opacity: 0.8;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-normal) var(--ease-out-expo), transform var(--duration-normal) var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ability prism */
.prism-section {
  padding-top: var(--space-lg);
}
.prism-diamond {
  display: grid;
  place-items: center;
  min-height: 300px;
  position: relative;
  margin: var(--space-lg) 0;
}
@media (min-width: 769px) {
  .prism-diamond {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-md);
  }
  .prism-face:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
  }
  .prism-face:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    margin-right: var(--space-lg);
  }
  .prism-face:nth-child(3) {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
    margin-left: var(--space-lg);
  }
}

@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .prism-face,
  .work-card,
  .blog-card,
  .site-header {
    background: rgba(17, 19, 26, 0.96) !important;
  }
}

.prism-face {
  width: 150px;
  height: 150px;
  background: rgba(200, 200, 200, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-lg);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* 按钮形状 */
.prism-face {
  border-radius: 50%;
}

/* 按钮触动效果 */
.prism-face:hover {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.05);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.prism-face[data-prism="universe"]:hover {
  box-shadow: 0 0 30px rgba(90, 107, 255, 0.8);
  border: 1px solid rgba(90, 107, 255, 0.5);
}

.prism-face[data-prism="snowstorm"]:hover {
  box-shadow: 0 0 30px rgba(255, 179, 71, 0.8);
  border: 1px solid rgba(255, 179, 71, 0.5);
}

.prism-face[data-prism="moonnight"]:hover {
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.8);
  border: 1px solid rgba(45, 212, 191, 0.5);
}

/* 流光效果 */
.prism-face::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s linear infinite;
  opacity: 0;
  transition: opacity var(--duration-normal);
  z-index: 1;
}

.prism-face:hover::before {
  opacity: 1;
}

.prism-face[data-prism="universe"]::before {
  background: linear-gradient(45deg, transparent, rgba(90, 107, 255, 0.5), transparent);
}

.prism-face[data-prism="snowstorm"]::before {
  background: linear-gradient(45deg, transparent, rgba(255, 179, 71, 0.5), transparent);
}

.prism-face[data-prism="moonnight"]::before {
  background: linear-gradient(45deg, transparent, rgba(45, 212, 191, 0.5), transparent);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.prism-face::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s linear infinite;
  opacity: 0;
  transition: opacity var(--duration-normal);
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .prism-face:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg) scale(1.1);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    border-color: var(--theme-accent);
    background: rgba(255, 255, 255, 0.12);
  }
  
  .prism-face:hover::before {
    opacity: 1;
  }
}

.prism-face.active {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 2px var(--theme-accent), 0 20px 40px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.15);
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1.05);
}

.prism-face.plane {
  transform: none;
}
@media (max-width: 768px) {
  .prism-diamond {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    min-height: auto;
  }
  .prism-face {
    transform: none;
    width: 100%;
    max-width: 280px;
    height: auto;
    min-height: 72px;
  }
}

.prism-reset {
  margin-top: var(--space-lg);
  text-align: center;
}
.prism-reset .btn-text {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0 var(--space-lg);
  transition: all var(--duration-normal) var(--ease-out-expo);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.prism-reset .btn-text:hover {
  color: var(--theme-accent);
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--theme-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}
.prism-reset .btn-text:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Works strip */
.works-strip-wrap {
  position: relative;
  margin: 0 calc(-1 * var(--space-3xl));
  padding: 0 var(--space-3xl);
}
@media (max-width: 768px) {
  .works-strip-wrap {
    margin: 0 -20px;
    padding: 0 20px;
  }
}

.works-strip {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-md) 0 var(--space-xl);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: var(--space-3xl);
}
.works-strip:active {
  cursor: grabbing;
}
.works-strip::before,
.works-strip::after {
  content: "";
  position: sticky;
  top: 0;
  width: 48px;
  flex-shrink: 0;
  z-index: 2;
  pointer-events: none;
}
.works-strip::before {
  left: 0;
  margin-right: -48px;
  background: linear-gradient(90deg, var(--bg-base), transparent);
}
.works-strip::after {
  right: 0;
  margin-left: -48px;
  background: linear-gradient(270deg, var(--bg-base), transparent);
}

@media (max-width: 768px) {
  .works-strip {
    flex-direction: column;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .works-strip::before,
  .works-strip::after {
    display: none;
  }
}

.work-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
  width: 320px;
  min-height: 400px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  transform: translateY(0);
}

.work-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--theme-accent);
  transform: scaleX(0);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
@media (max-width: 768px) {
  .work-card {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}
@media (hover: hover) and (pointer: fine) {
  .work-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--theme-accent);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.12);
  }
  
  .work-card:hover::before {
    transform: scaleX(1);
  }
  
  .work-card:hover .work-card-body h3 {
    color: var(--theme-accent);
  }
  
  .work-card:hover .danmaku {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
}

.work-card-image {
  height: 180px;
  background: linear-gradient(135deg, #2d1b4e, #1e3a5f);
  object-fit: cover;
  width: 100%;
  display: block;
}

.work-card-body {
  padding: var(--space-lg);
  position: relative;
}
.work-card h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.5em;
  transition: color var(--duration-normal) var(--ease-out-expo);
}
.work-card p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 60ch;
}

.danmaku {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--accent-red);
  color: #fff;
  padding: 6px 14px;
  border-radius: 30px;
  z-index: 2;
  animation: float-y 2s ease-in-out infinite;
  pointer-events: auto;
  cursor: pointer;
  max-width: 140px;
  text-align: center;
}
.work-card:nth-child(2n) .danmaku {
  animation-delay: 0.3s;
}
.work-card:nth-child(3n) .danmaku {
  animation-delay: 0.6s;
}
.work-card.paused .danmaku {
  animation-play-state: paused;
}
@keyframes float-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

.works-empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-secondary);
  border: 1px dashed var(--border-light);
  border-radius: 20px;
  display: none;
}
.works-empty.visible {
  display: block;
}

/* Lab */
.lab-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.online-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.online-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
}
@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
}
.trust-pill .online-dot {
  flex-shrink: 0;
}

.lab-card {
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-out-expo);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) and (pointer: fine) {
  .lab-card:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
  }
}
.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Blog grid */
.blog-grid {
  display: grid;
  gap: var(--space-lg);
}
@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.blog-card {
  padding: var(--space-lg);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-out-expo);
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--theme-accent);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
  }
  
  .blog-card:hover h3 {
    color: var(--theme-accent);
  }
}
.blog-card h3 {
  font-size: 1.25rem;
  margin: 0 0 var(--space-sm);
  transition: color var(--duration-normal) var(--ease-out-expo);
}
.blog-summary {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  max-width: 60ch;
}
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: rgba(17, 19, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: var(--space-xl);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.modal-overlay.open .modal {
  transform: scale(1);
  opacity: 1;
}
.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-normal) var(--ease-out-expo);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
  color: var(--theme-accent);
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1);
  border-color: var(--theme-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.modal h2 {
  margin: 0 0 var(--space-lg);
  font-size: 1.5rem;
}

.form-group {
  margin-bottom: var(--space-md);
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--duration-normal) var(--ease-out-expo);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 138, 255, 0.3);
  border-color: var(--theme-accent);
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}
.form-group textarea {
  min-height: 100px;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 138, 255, 0.3);
  border-color: rgba(60, 138, 255, 0.5);
}

/* Footer */
.site-footer {
  padding: var(--space-3xl) var(--space-3xl) var(--space-xl);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-3xl);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}
.footer-toggle label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Particles canvas */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

#sakura-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
}

/* Page hero small */
.page-hero {
  padding: 140px 0 var(--space-2xl);
  border-bottom: 1px solid var(--border-light);
}
.page-hero h1 {
  font-size: 2.5rem;
  margin: 0 0 var(--space-md);
}
.page-hero p {
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0;
}

/* Detail / shop / article layouts */
.prose {
  max-width: 65ch;
}
.prose h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
}
.prose p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.download-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}
.download-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-sm) 0;
}

.shop-grid {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}
@media (min-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.shop-card {
  padding: var(--space-xl);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-out-expo);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .shop-card:hover {
    transform: translateY(-4px);
    border-color: var(--theme-accent);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
  }
  
  .shop-card:hover h3 {
    color: var(--theme-accent);
  }
  
  .shop-card:hover .price {
    transform: scale(1.05);
  }
}
.shop-card .price {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--theme-accent);
  margin: var(--space-sm) 0;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
.shop-stats {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-md);
}

/* Blog article layout */
.article-layout {
  display: grid;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}
@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
}
.toc {
  position: sticky;
  top: 100px;
  font-size: 0.875rem;
}
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc a {
  display: block;
  padding: var(--space-xs) 0;
  color: var(--text-secondary);
}
.toc a:hover {
  color: var(--theme-accent);
}

/* Toast / popup toolkit */
.toolkit-popup {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  max-width: 360px;
  padding: var(--space-lg);
  background: var(--bg-surface);
  border: 1px solid var(--theme-accent);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  z-index: 150;
  display: none;
}
.toolkit-popup.visible {
  display: block;
}
.toolkit-popup .modal-close {
  position: static;
  float: right;
}

/*404 snake placeholder */
.snake-mini {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: var(--space-xl);
}
