:root,
:root[data-scheme="purple"] {
  --bg: #f7f4ff;
  --surface: #ffffff;
  --surface-2: #f1ebff;
  --surface-hover: #eae1ff;
  --border: #dfd3fc;
  --border-strong: #c2a4f8;
  --text: #160e2c;
  --text-muted: #584c78;
  --text-faint: #8174a3;
  --nav-bg: rgba(247, 244, 255, 0.86);
  --accent: #8b5cf6;
  --accent-2: #c026d3;
  --accent-3: #6366f1;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --accent-border: rgba(139, 92, 246, 0.34);
  --accent-rgb: 139, 92, 246;
  --accent2-rgb: 192, 38, 211;
  --btn-text: #ffffff;
  --glow-border: rgba(139, 92, 246, 0.55);
  --glow-shadow: 0 18px 42px rgba(139, 92, 246, 0.14);
  --hero-glass: rgba(19, 12, 40, 0.72);
  --sky-1: #0a0618;
  --sky-2: #1c103e;
  --sky-3: #3b1976;
  --sky-4: #7c3aed;
  --sky-5: #c4b5fd;
  --grid-1: #1d113d;
  --grid-2: #080514;
  --city-fill: #0d0821;
  --chess-light: #ece2ff;
  --chess-dark: #7c3aed;
}

html.dark,
html.dark[data-scheme="purple"] {
  --bg: #080614;
  --surface: #120e25;
  --surface-2: #1a1435;
  --surface-hover: #211a42;
  --border: #271f4d;
  --border-strong: #3e3178;
  --text: #f5f2ff;
  --text-muted: #b0a4cf;
  --text-faint: #7b6e9e;
  --nav-bg: rgba(8, 6, 20, 0.84);
  --accent: #c084fc;
  --accent-2: #a855f7;
  --accent-3: #e879f9;
  --accent-soft: rgba(192, 132, 252, 0.14);
  --accent-border: rgba(192, 132, 252, 0.34);
  --accent-rgb: 192, 132, 252;
  --accent2-rgb: 168, 85, 247;
  --btn-text: #0a0618;
  --glow-border: rgba(192, 132, 252, 0.54);
  --glow-shadow: 0 20px 46px rgba(168, 85, 247, 0.16), 0 0 28px rgba(192, 132, 252, 0.12);
  --hero-glass: rgba(17, 12, 38, 0.72);
  --sky-1: #070414;
  --sky-2: #190e38;
  --sky-3: #35176c;
  --sky-4: #7e22ce;
  --sky-5: #d8b4fe;
  --grid-1: #1c113c;
  --grid-2: #070413;
  --city-fill: #0b061d;
  --chess-light: #2d2356;
  --chess-dark: #161030;
}

:root[data-scheme="blue"] {
  --bg: #f2f8ff;
  --surface: #ffffff;
  --surface-2: #e8f2ff;
  --surface-hover: #dcebff;
  --border: #cde0fa;
  --border-strong: #93c5fd;
  --text: #0b152a;
  --text-muted: #465a7c;
  --text-faint: #7084a8;
  --nav-bg: rgba(242, 248, 255, 0.86);
  --accent: #0284c7;
  --accent-2: #2563eb;
  --accent-3: #06b6d4;
  --accent-soft: rgba(2, 132, 199, 0.12);
  --accent-border: rgba(2, 132, 199, 0.34);
  --accent-rgb: 2, 132, 199;
  --accent2-rgb: 37, 99, 235;
  --btn-text: #ffffff;
  --glow-border: rgba(37, 99, 235, 0.54);
  --glow-shadow: 0 18px 42px rgba(37, 99, 235, 0.14);
  --hero-glass: rgba(9, 16, 36, 0.74);
  --sky-1: #030814;
  --sky-2: #081736;
  --sky-3: #0e2d61;
  --sky-4: #0284c7;
  --sky-5: #38bdf8;
  --grid-1: #081d3d;
  --grid-2: #040812;
  --city-fill: #060e22;
  --chess-light: #dbeafe;
  --chess-dark: #2563eb;
}

html.dark[data-scheme="blue"] {
  --bg: #060a15;
  --surface: #0c1224;
  --surface-2: #111a33;
  --surface-hover: #172342;
  --border: #172342;
  --border-strong: #233766;
  --text: #eff7ff;
  --text-muted: #98add1;
  --text-faint: #647aa1;
  --nav-bg: rgba(6, 10, 21, 0.84);
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-3: #38bdf8;
  --accent-soft: rgba(34, 211, 238, 0.14);
  --accent-border: rgba(34, 211, 238, 0.34);
  --accent-rgb: 34, 211, 238;
  --accent2-rgb: 59, 130, 246;
  --btn-text: #040b1a;
  --glow-border: rgba(34, 211, 238, 0.52);
  --glow-shadow: 0 20px 46px rgba(34, 211, 238, 0.14), 0 0 26px rgba(59, 130, 246, 0.14);
  --hero-glass: rgba(9, 16, 36, 0.74);
  --chess-light: #1b2f58;
  --chess-dark: #0e1830;
}

:root[data-scheme="emerald"] {
  --bg: #f1fdf8;
  --surface: #ffffff;
  --surface-2: #e4faf0;
  --surface-hover: #d5f6e6;
  --border: #bdebd7;
  --border-strong: #6ee7b7;
  --text: #072219;
  --text-muted: #386354;
  --text-faint: #638f80;
  --nav-bg: rgba(241, 253, 248, 0.86);
  --accent: #059669;
  --accent-2: #0d9488;
  --accent-3: #10b981;
  --accent-soft: rgba(5, 150, 105, 0.12);
  --accent-border: rgba(5, 150, 105, 0.34);
  --accent-rgb: 5, 150, 105;
  --accent2-rgb: 13, 148, 136;
  --btn-text: #ffffff;
  --glow-border: rgba(16, 185, 129, 0.54);
  --glow-shadow: 0 18px 42px rgba(16, 185, 129, 0.14);
  --hero-glass: rgba(6, 23, 18, 0.74);
  --sky-1: #020d0a;
  --sky-2: #052219;
  --sky-3: #0a4030;
  --sky-4: #059669;
  --sky-5: #34d399;
  --grid-1: #082b21;
  --grid-2: #030b08;
  --city-fill: #041611;
  --chess-light: #d1fae5;
  --chess-dark: #059669;
}

html.dark[data-scheme="emerald"] {
  --bg: #040d0a;
  --surface: #0a1814;
  --surface-2: #10241e;
  --surface-hover: #153028;
  --border: #17382e;
  --border-strong: #225446;
  --text: #edfdf6;
  --text-muted: #93beae;
  --text-faint: #5d8879;
  --nav-bg: rgba(4, 13, 10, 0.84);
  --accent: #34d399;
  --accent-2: #10b981;
  --accent-3: #2dd4bf;
  --accent-soft: rgba(52, 211, 153, 0.14);
  --accent-border: rgba(52, 211, 153, 0.34);
  --accent-rgb: 52, 211, 153;
  --accent2-rgb: 16, 185, 129;
  --btn-text: #02120c;
  --glow-border: rgba(52, 211, 153, 0.52);
  --glow-shadow: 0 20px 46px rgba(16, 185, 129, 0.15), 0 0 26px rgba(45, 212, 191, 0.12);
  --hero-glass: rgba(6, 23, 18, 0.74);
  --chess-light: #183e32;
  --chess-dark: #0b201a;
}

:root[data-scheme="rose"] {
  --bg: #fff3f6;
  --surface: #ffffff;
  --surface-2: #ffe6ee;
  --surface-hover: #ffd6e3;
  --border: #fecfd9;
  --border-strong: #fda4af;
  --text: #290a14;
  --text-muted: #703e4f;
  --text-faint: #9e6a7c;
  --nav-bg: rgba(255, 243, 246, 0.86);
  --accent: #e11d48;
  --accent-2: #f97316;
  --accent-3: #ec4899;
  --accent-soft: rgba(225, 29, 72, 0.12);
  --accent-border: rgba(225, 29, 72, 0.34);
  --accent-rgb: 225, 29, 72;
  --accent2-rgb: 249, 115, 22;
  --btn-text: #ffffff;
  --glow-border: rgba(225, 29, 72, 0.52);
  --glow-shadow: 0 18px 42px rgba(225, 29, 72, 0.14);
  --hero-glass: rgba(29, 9, 17, 0.74);
  --sky-1: #120309;
  --sky-2: #2d0a18;
  --sky-3: #5c122d;
  --sky-4: #be123c;
  --sky-5: #fb7185;
  --grid-1: #320b1a;
  --grid-2: #100308;
  --city-fill: #1b060f;
  --chess-light: #ffe4e6;
  --chess-dark: #e11d48;
}

html.dark[data-scheme="rose"] {
  --bg: #10050a;
  --surface: #1c0b13;
  --surface-2: #28101c;
  --surface-hover: #341625;
  --border: #3d192b;
  --border-strong: #5c253f;
  --text: #fff1f6;
  --text-muted: #cea0b1;
  --text-faint: #946577;
  --nav-bg: rgba(16, 5, 10, 0.84);
  --accent: #fb7185;
  --accent-2: #f43f5e;
  --accent-3: #fb923c;
  --accent-soft: rgba(251, 113, 133, 0.15);
  --accent-border: rgba(251, 113, 133, 0.35);
  --accent-rgb: 251, 113, 133;
  --accent2-rgb: 244, 63, 94;
  --btn-text: #16040a;
  --glow-border: rgba(251, 113, 133, 0.54);
  --glow-shadow: 0 20px 46px rgba(244, 63, 94, 0.16), 0 0 26px rgba(251, 146, 60, 0.12);
  --hero-glass: rgba(29, 9, 17, 0.74);
  --chess-light: #491d32;
  --chess-dark: #230c17;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.68;
  letter-spacing: -0.005em;
  transition: background-color 0.45s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
}

::selection {
  background-color: rgba(var(--accent-rgb), 0.32);
  color: #ffffff;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  z-index: 80;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
  transition: width 0.08s linear;
  pointer-events: none;
}

.nav-bar {
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.nav-bar.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  transition: color 0.24s ease, background-color 0.24s ease;
}

.nav-link:hover {
  color: var(--accent);
  background-color: var(--accent-soft);
}

.nav-link.is-active {
  color: var(--accent);
  background-color: var(--accent-soft);
  font-weight: 600;
}

.accent-text {
  color: var(--accent);
  transition: color 0.3s ease;
}

.accent-pill {
  background-color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.accent-btn {
  background: linear-gradient(95deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--btn-text);
  box-shadow: 0 6px 22px rgba(var(--accent-rgb), 0.32);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease, box-shadow 0.26s ease;
}

.accent-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.44);
}

.accent-btn:active {
  transform: translateY(0) scale(0.97);
}

.accent-dot-bg {
  background-color: var(--accent);
  transition: background-color 0.3s ease;
}

.accent-ring {
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.38);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.neon-card {
  position: relative;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.32s ease, box-shadow 0.38s ease, background-color 0.38s ease;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.11), transparent 62%);
  transition: opacity 0.32s ease;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.neon-card-interactive:hover {
  transform: translateY(-5px);
  border-color: var(--glow-border);
  box-shadow: var(--glow-shadow);
}

.neon-surface {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.24s ease;
}

.neon-surface-hover:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent-border);
}

.shimmer-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-3) 34%, var(--accent-2) 68%, var(--accent) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerShift 6.5s linear infinite;
}

.neon-ring-text {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-3) 55%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-frame {
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
  transition: border-color 0.35s ease;
}

.hero-stagger {
  opacity: 0;
  transform: translateY(18px);
  animation: heroEnter 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-delay-1 { animation-delay: 0.05s; }
.hero-delay-2 { animation-delay: 0.13s; }
.hero-delay-3 { animation-delay: 0.21s; }
.hero-delay-4 { animation-delay: 0.29s; }
.hero-delay-5 { animation-delay: 0.2s; }

.unified-widget {
  background: var(--hero-glass);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45), 0 0 34px rgba(var(--accent-rgb), 0.14);
  animation: neonPulseBox 5s ease-in-out infinite;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.32s ease, box-shadow 0.32s ease;
}

.unified-widget:hover {
  transform: translateY(-2px);
}

.unified-widget.vpn-detected {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48), 0 0 40px rgba(var(--accent-rgb), 0.24);
}

.widget-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(var(--accent-rgb), 0.38) 50%, transparent 100%);
}

.hero-orb-1 {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28) 0%, transparent 70%);
  animation: orbDriftA 11s ease-in-out infinite alternate;
}

.hero-orb-2 {
  background: radial-gradient(circle, rgba(var(--accent2-rgb), 0.22) 0%, transparent 70%);
  animation: orbDriftB 13s ease-in-out infinite alternate;
}

.hero-aura-bg {
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.22) 0%, rgba(var(--accent2-rgb), 0.14) 55%, transparent 80%);
  transition: background 0.45s ease;
}

.clock-glow {
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.55), 0 0 34px rgba(var(--accent2-rgb), 0.35);
}

.colon-pulse {
  animation: colonBlink 1s ease-in-out infinite;
}

.status-dot {
  animation: pulseDot 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero-aura {
  animation: auraFloat 9s ease-in-out infinite alternate;
}

.twinkle-a { animation: starTwinkle 2.8s ease-in-out infinite; }
.twinkle-b { animation: starTwinkle 3.9s ease-in-out infinite 0.9s; }
.twinkle-c { animation: starTwinkle 4.6s ease-in-out infinite 1.7s; }

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(3px);
  transition: opacity 0.78s cubic-bezier(0.16, 1, 0.3, 1), transform 0.78s cubic-bezier(0.16, 1, 0.3, 1), filter 0.72s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.68s cubic-bezier(0.16, 1, 0.3, 1), transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible .reveal-stagger,
.reveal-stagger.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-parallax {
  will-change: transform;
  transition: transform 0.12s linear;
}

.section-divider {
  height: 1px;
  max-width: 12rem;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35), transparent);
}

.repo-card-anim {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  animation: cardPopIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.drawer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.44s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
}

.drawer-wrap.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.drawer-inner {
  overflow: hidden;
  min-height: 0;
}

.drawer-content {
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.drawer-wrap.is-open .drawer-content {
  transform: translateY(0);
  opacity: 1;
}

.drawer-chevron {
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.toggle-drawer-btn[aria-expanded="true"] .drawer-chevron {
  transform: rotate(180deg);
}

.toggle-drawer-btn {
  transition: background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease, transform 0.2s ease, box-shadow 0.24s ease;
}

.toggle-drawer-btn:hover {
  border-color: var(--glow-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.16);
}

.toggle-drawer-btn:active {
  transform: scale(0.97);
}

.mobile-drawer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}

.mobile-drawer.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.mobile-drawer-inner {
  overflow: hidden;
  min-height: 0;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.scheme-swatch {
  width: 17px;
  height: 17px;
  border-radius: 9999px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.scheme-swatch:hover { transform: scale(1.18); }
.scheme-swatch:active { transform: scale(0.94); }

.scheme-swatch.is-active {
  border-color: #ffffff;
  transform: scale(1.14);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.75);
}

.filter-chip,
.game-tab-btn {
  color: var(--text-muted);
  transition: background-color 0.24s ease, color 0.24s ease, box-shadow 0.24s ease, transform 0.18s ease;
}

.filter-chip:hover,
.game-tab-btn:hover {
  color: var(--text);
}

.filter-chip:active,
.game-tab-btn:active {
  transform: scale(0.96);
}

.filter-chip.is-active,
.game-tab-btn.is-active {
  background: linear-gradient(95deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--btn-text);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.4);
}

.vpn-banner {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--accent-border);
  color: var(--text);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideDownFade 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pfp-frame {
  position: relative;
  border-radius: 1.35rem;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2));
  box-shadow: 0 16px 38px rgba(var(--accent-rgb), 0.26);
  animation: gentleFloat 5.5s ease-in-out infinite;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
}

.pfp-frame:hover {
  box-shadow: 0 22px 46px rgba(var(--accent-rgb), 0.4);
}

.repo-badge-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.26);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.neon-card-interactive:hover .repo-badge-icon {
  transform: scale(1.06) rotate(-3deg);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.42);
}

.toast-box {
  background-color: var(--surface);
  border: 1px solid var(--accent-border);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(var(--accent-rgb), 0.22);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.back-to-top {
  background-color: var(--surface);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26), 0 0 18px rgba(var(--accent-rgb), 0.18);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.24s ease;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background-color: var(--surface-2);
}

.back-to-top.is-hidden {
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  pointer-events: none;
}

.game-panel {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.game-panel.is-active {
  display: block;
  animation: panelFadeIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ttt-cell {
  aspect-ratio: 1 / 1;
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.9rem, 7vw, 2.35rem);
  font-weight: 800;
  border-radius: 0.95rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.ttt-cell:hover:not(:disabled) {
  border-color: var(--glow-border);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.18);
}

.ttt-cell:active:not(:disabled) {
  transform: scale(0.95);
}

.ttt-cell.is-win {
  background-color: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.35);
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 100%;
  max-width: 392px;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

.chess-sq {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: clamp(1.15rem, 5.5vw, 1.95rem);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: filter 0.15s ease, box-shadow 0.18s ease;
}

.chess-sq.sq-light { background-color: var(--chess-light); }
.chess-sq.sq-dark { background-color: var(--chess-dark); }

.chess-sq.sq-selected {
  box-shadow: inset 0 0 0 3px var(--accent);
  filter: brightness(1.15);
}

.chess-sq.sq-hint::after {
  content: "";
  width: 28%;
  height: 28%;
  border-radius: 9999px;
  background-color: var(--accent);
  opacity: 0.8;
  position: absolute;
}

.chess-sq.sq-capture::after {
  content: "";
  width: 82%;
  height: 82%;
  border-radius: 9999px;
  border: 3px solid var(--accent);
  opacity: 0.85;
  position: absolute;
}

.chess-sq.sq-last {
  box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), 0.55);
}

.piece-w {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.piece-b {
  color: #090714;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}

.flappy-canvas {
  width: 100%;
  max-width: 520px;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 1rem;
  border: 1px solid var(--border-strong);
  display: block;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.wave-hand {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: gentleWave 2.8s ease-in-out infinite;
}

@media (max-width: 640px) {
  .scheme-swatch {
    width: 15px;
    height: 15px;
  }

  .neon-card-interactive:hover {
    transform: none;
  }

  .chess-board {
    max-width: 100%;
  }
}

@keyframes gentleWave {
  0%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(14deg); }
  24% { transform: rotate(-8deg); }
  36% { transform: rotate(12deg); }
  48% { transform: rotate(0deg); }
}

@keyframes orbDriftA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(28px, -18px) scale(1.12); }
}

@keyframes orbDriftB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-24px, 16px) scale(1.08); }
}

@keyframes panelFadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroEnter {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes cardPopIn {
  0% { opacity: 0; transform: translateY(16px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDownFade {
  0% { opacity: 0; transform: translateY(-100%); }
  100% { opacity: 1; transform: translateY(0); }
}

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

@keyframes shimmerShift {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}

@keyframes neonPulseBox {
  0%, 100% {
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.45), 0 0 26px rgba(var(--accent-rgb), 0.14);
    border-color: rgba(var(--accent-rgb), 0.3);
  }
  50% {
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.48), 0 0 40px rgba(var(--accent-rgb), 0.25);
    border-color: rgba(var(--accent-rgb), 0.5);
  }
}

@keyframes colonBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.65); }
  50% { transform: scale(1.22); opacity: 0.85; box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}

@keyframes auraFloat {
  0% { transform: translate(-50%, 0) scale(1); opacity: 0.35; }
  100% { transform: translate(-50%, -18px) scale(1.08); opacity: 0.55; }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.modal-open {
  overflow: hidden;
}

.arcade-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.arcade-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.arcade-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(5, 3, 14, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.arcade-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 56rem;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--accent-border);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 42px rgba(var(--accent-rgb), 0.18);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.arcade-modal.is-open .arcade-dialog {
  transform: translateY(0) scale(1);
}

.arcade-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.arcade-close-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(90deg);
}

@media (min-width: 640px) {
  .arcade-modal {
    padding: 1.5rem;
  }
}

.contact-input {
  width: 100%;
  border-radius: 0.85rem;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 0.95rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}

.contact-input::placeholder {
  color: var(--text-faint);
}

.contact-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-status {
  border-radius: 0.85rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--accent-border);
  background-color: var(--accent-soft);
  color: var(--text);
}