/* ============================================
   LuWare — iOS Liquid Glass Theme
   Performance-first · Light / Dark mode
   ============================================ */

:root,
[data-theme="light"] {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;

  --white: #ffffff;
  --off-white: #f8faff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --bg-gradient:
    radial-gradient(ellipse 85% 55% at 18% -8%, rgba(186, 230, 253, 0.62), transparent 52%),
    radial-gradient(ellipse 75% 50% at 88% 105%, rgba(147, 197, 253, 0.5), transparent 52%),
    radial-gradient(ellipse 45% 35% at 62% 42%, rgba(167, 139, 250, 0.12), transparent 60%),
    linear-gradient(168deg, #b8d4ff 0%, #cce3ff 18%, #e3eeff 48%, #d6e8ff 75%, #c5daff 100%);

  --mesh-color-1: rgba(37, 99, 235, 0.34);
  --mesh-color-2: rgba(56, 189, 248, 0.38);
  --mesh-color-3: rgba(129, 140, 248, 0.22);
  --aurora-1: rgba(37, 99, 235, 0.32);
  --aurora-2: rgba(125, 211, 252, 0.36);
  --aurora-3: rgba(167, 139, 250, 0.14);
  --grid-color: rgba(37, 99, 235, 0.05);

  --glass-bg: rgba(255, 255, 255, 0.52);
  --glass-bg-strong: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.78);
  --glass-border-subtle: rgba(59, 130, 246, 0.18);
  --glass-border-outer: rgba(37, 99, 235, 0.22);
  --glass-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 0 0 1px rgba(59, 130, 246, 0.1),
    0 12px 40px rgba(37, 99, 235, 0.1),
    0 4px 14px rgba(15, 23, 42, 0.05);
  --glass-inset: rgba(255, 255, 255, 0.38);
  --glass-shine: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(186, 230, 253, 0.22) 38%,
    rgba(255, 255, 255, 0.06) 58%,
    transparent 100%
  );
  --glass-morphic-edge: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.72),
    rgba(147, 197, 253, 0.28) 50%,
    rgba(59, 130, 246, 0.16)
  );
  --glass-chip-bg: rgba(255, 255, 255, 0.42);
  --glass-blur: 24px;
  --glass-saturate: 180%;
  --glass-radius: 20px;
  --glass-radius-sm: 14px;
  --glass-radius-xs: 10px;

  --status-ok: #16a34a;
  --status-online: #22c55e;
  --discord-color: #5865f2;

  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --slide-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --slide-transition: 480ms var(--slide-ease);
  --height-transition: 480ms var(--slide-ease);
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --off-white: #0a0f1a;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --bg-gradient:
    radial-gradient(ellipse 80% 55% at 12% -5%, rgba(37, 99, 235, 0.32), transparent 54%),
    radial-gradient(ellipse 75% 50% at 92% 102%, rgba(99, 102, 241, 0.22), transparent 54%),
    radial-gradient(ellipse 50% 40% at 55% 48%, rgba(56, 189, 248, 0.1), transparent 58%),
    linear-gradient(168deg, #030610 0%, #081018 28%, #0e1a30 58%, #122240 100%);

  --mesh-color-1: rgba(37, 99, 235, 0.42);
  --mesh-color-2: rgba(56, 189, 248, 0.28);
  --mesh-color-3: rgba(99, 102, 241, 0.24);
  --aurora-1: rgba(37, 99, 235, 0.26);
  --aurora-2: rgba(56, 189, 248, 0.2);
  --aurora-3: rgba(99, 102, 241, 0.16);
  --grid-color: rgba(96, 165, 250, 0.07);

  --glass-bg: rgba(12, 18, 32, 0.42);
  --glass-bg-strong: rgba(18, 26, 44, 0.56);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.07);
  --glass-border-outer: rgba(96, 165, 250, 0.18);
  --glass-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 12px 40px rgba(0, 0, 0, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.18);
  --glass-inset: rgba(255, 255, 255, 0.04);
  --glass-shine: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(56, 189, 248, 0.06) 35%,
    rgba(99, 102, 241, 0.04) 55%,
    transparent 100%
  );
  --glass-chip-bg: rgba(255, 255, 255, 0.06);
  --glass-morphic-edge: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22),
    rgba(147, 197, 253, 0.12) 50%,
    rgba(255, 255, 255, 0.06)
  );
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  background: transparent;
  overflow-x: hidden;
  transition: color var(--transition);
  -webkit-font-smoothing: antialiased;
}

/* ── Animated ambient background ── */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-base {
  position: absolute;
  inset: 0;
  background: var(--bg-gradient);
  transition: background var(--transition);
}

.mesh-gradient {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse 78% 62% at 8% 10%, var(--mesh-color-1), transparent 54%),
    radial-gradient(ellipse 72% 58% at 94% 90%, var(--mesh-color-2), transparent 52%),
    radial-gradient(ellipse 48% 42% at 58% 38%, var(--mesh-color-3), transparent 58%),
    radial-gradient(ellipse 35% 30% at 72% 22%, var(--aurora-3), transparent 62%);
  animation: meshDrift 32s ease-in-out infinite alternate;
  will-change: transform;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.7;
  will-change: transform;
}

.aurora-1 {
  width: min(520px, 90vw);
  height: min(280px, 50vw);
  top: 10%;
  left: -8%;
  background: linear-gradient(125deg, var(--aurora-1) 0%, rgba(125, 211, 252, 0.18) 42%, transparent 72%);
  animation: auroraDriftA 24s ease-in-out infinite;
}

.aurora-2 {
  width: min(480px, 85vw);
  height: min(260px, 45vw);
  bottom: 8%;
  right: -10%;
  background: linear-gradient(305deg, var(--aurora-2) 0%, var(--aurora-3) 38%, transparent 74%);
  animation: auroraDriftB 28s ease-in-out infinite;
}

.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.orb-1 {
  width: min(480px, 80vw);
  height: min(480px, 80vw);
  top: -120px;
  right: -80px;
  background: radial-gradient(circle at 35% 35%, var(--mesh-color-1) 0%, rgba(56, 189, 248, 0.12) 42%, transparent 68%);
  opacity: 0.7;
  animation: orbFloatA 20s ease-in-out infinite;
}

.orb-2 {
  width: min(400px, 70vw);
  height: min(400px, 70vw);
  bottom: 2%;
  left: -100px;
  background: radial-gradient(circle at 60% 60%, var(--mesh-color-2) 0%, rgba(129, 140, 248, 0.1) 40%, transparent 68%);
  opacity: 0.6;
  animation: orbFloatB 24s ease-in-out infinite;
}

.orb-3 {
  width: min(320px, 55vw);
  height: min(320px, 55vw);
  top: 38%;
  right: 12%;
  background: radial-gradient(circle at 50% 50%, var(--mesh-color-3) 0%, rgba(37, 99, 235, 0.08) 45%, transparent 70%);
  opacity: 0.5;
  animation: orbFloatC 26s ease-in-out infinite;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 8%, transparent 75%);
  animation: gridPulse 18s ease-in-out infinite;
}

@keyframes meshDrift {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.08) rotate(2deg); }
}

@keyframes auroraDriftA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6%, 8%, 0) scale(1.12); }
}

@keyframes auroraDriftB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-8%, -6%, 0) scale(1.1); }
}

@keyframes orbFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-32px, 40px, 0) scale(1.05); }
}

@keyframes orbFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(44px, -34px, 0) scale(1.06); }
}

@keyframes orbFloatC {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, -28px, 0) scale(1.04); }
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.55; }
}

/* ── Glass system ── */
.glass-panel {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  isolation: isolate;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-panel {
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  }
}

.glass-shine::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--glass-shine);
  pointer-events: none;
  z-index: 0;
}

/* Iridescent edge — uses ::after so it stacks with glass-shine ::before */
.glass-morphic::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-morphic-edge);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 0.72;
}

[data-theme="dark"] .glass-morphic::after {
  opacity: 0.48;
}

/* Outer ring on non-morphic panels only (morphic uses ::after for edge) */
.glass-panel:not(.glass-morphic)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--glass-border-outer);
  pointer-events: none;
}

.glass-panel.glass-morphic::after {
  border: none;
}

.glass-inset {
  position: relative;
  background: var(--glass-inset);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--glass-radius-xs);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-inset {
    backdrop-filter: blur(12px) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(12px) saturate(var(--glass-saturate));
  }
}

.glass-chip {
  background: var(--glass-chip-bg);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--glass-radius-xs);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-chip {
    backdrop-filter: blur(10px) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(10px) saturate(var(--glass-saturate));
  }
}

.glass-btn {
  /* Buttons inherit panel blur context — no extra filter layer */
}

/* block-frame kept for markup compat — glass effects remain active */

/* ── Taskbar ── */
.taskbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  margin: 0.75rem 1rem 0;
  border-radius: var(--glass-radius);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.brand-icon {
  display: flex;
  width: 38px;
  height: 38px;
  padding: 4px;
  border-radius: var(--glass-radius-xs);
  color: var(--blue-500);
  overflow: hidden;
}

.brand-logo,
.hero-logo,
.credit-avatar img,
.game-snapshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.hero-logo-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  padding: 6px;
  border-radius: var(--glass-radius-sm);
  overflow: hidden;
}

.hero-logo-wrap .hero-logo {
  border-radius: var(--glass-radius-xs);
}

.credit-avatar {
  overflow: hidden;
  padding: 0;
}

.credit-avatar img {
  border-radius: var(--glass-radius-xs);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 40%, #3b82f6 75%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .brand-text {
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 45%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-tabs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: var(--glass-radius-sm);
}

.tab-indicator {
  position: absolute;
  top: 0.25rem;
  left: 0;
  width: 0;
  height: calc(100% - 0.5rem);
  border-radius: var(--glass-radius-xs);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  box-shadow: 0 1px 6px rgba(37, 99, 235, 0.1);
  transition:
    transform var(--slide-transition),
    width var(--slide-transition);
  z-index: 0;
  pointer-events: none;
}

[data-theme="dark"] .tab-indicator {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
}

.tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--glass-radius-xs);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.tab-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--blue-600);
  background: var(--glass-chip-bg);
  border-color: var(--glass-border-subtle);
}

[data-theme="dark"] .tab:hover {
  color: var(--blue-300);
}

.tab:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.tab.active {
  color: var(--blue-700);
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .tab.active {
  color: var(--blue-300);
  box-shadow: none;
}

.taskbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: var(--glass-radius-xs);
  color: var(--blue-600);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .menu-toggle {
  color: var(--blue-300);
}

.theme-toggle svg,
.menu-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle:hover,
.menu-toggle:hover {
  opacity: 0.85;
}

.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

/* ── Sliding panel carousel ── */
.panel-viewport {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 1.25rem;
  padding: 1rem 1rem 1rem;
  overflow: hidden;
}

.panel-viewport[data-density="full"] {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
}

.panel-viewport[data-density="compact"] {
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
}

.panel-viewport[data-density="compact"] .panel {
  padding-bottom: 0.35rem;
}

.panel-viewport.is-animating {
  transition: height var(--height-transition);
}

.panel-viewport:not([data-ready]) .panel {
  position: relative;
  transform: none;
  visibility: visible;
}

.panel-viewport:not([data-ready]) .panel:not(.active) {
  display: none;
}

.panel-track {
  position: relative;
  width: 100%;
}

.panel {
  width: 100%;
  padding: 0 0.1rem 0.75rem;
  transform: translate3d(calc((var(--panel-i, 0) - var(--slide-index, 0)) * 100%), 0, 0);
  transition: transform var(--slide-transition);
  will-change: transform;
  visibility: hidden;
  pointer-events: none;
}

/* Steady state: active panel in document flow so height is natural */
.panel-viewport[data-ready] .panel.active:not(.is-sliding) {
  position: relative;
  display: block;
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.panel-viewport[data-ready] .panel:not(.active):not(.is-sliding) {
  display: none;
}

/* During slide: both panels absolute for horizontal transition */
.panel-viewport[data-ready] .panel.is-sliding {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  visibility: visible;
}

.panel.active.is-sliding {
  transform: translate3d(calc((var(--panel-i, 0) - var(--slide-index, 0)) * 100%), 0, 0);
  pointer-events: auto;
}

.panel.is-sliding:not(.active) {
  pointer-events: none;
}

/* ── Hero ── */
.hero {
  padding: 0;
  border-radius: var(--glass-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-700);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .hero-badge {
  color: var(--blue-300);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 28%, #2563eb 55%, #3b82f6 78%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.875rem;
}

[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 30%, #60a5fa 65%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  max-width: 520px;
  margin: 0 auto 1.35rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  border: none;
  border-radius: var(--glass-radius-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.external-icon {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.7;
}

.btn:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 38%, #3b82f6 72%, #60a5fa 100%);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-secondary {
  background: var(--glass-chip-bg);
  color: var(--blue-700);
  border: 1px solid var(--glass-border);
}

[data-theme="dark"] .btn-secondary {
  color: var(--blue-300);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.45);
}

.btn-large {
  width: 100%;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
}

.btn-copy {
  background: var(--glass-chip-bg);
  color: var(--blue-700);
  border: 1px solid var(--blue-300);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

[data-theme="dark"] .btn-copy {
  color: var(--blue-300);
  border-color: var(--blue-600);
}

.btn-copy.copied {
  background: var(--blue-500);
  color: var(--white);
  border-color: var(--blue-600);
}

/* ── Feature grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.feature-card {
  padding: 1.25rem;
  border-radius: var(--glass-radius);
  overflow: visible;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-3px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.95) inset,
      0 0 0 1px rgba(59, 130, 246, 0.14),
      0 16px 40px rgba(37, 99, 235, 0.14);
  }

  [data-theme="light"] .feature-card:hover {
    background: rgba(255, 255, 255, 0.62);
  }
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--glass-radius-xs);
  color: var(--blue-600);
  margin-bottom: 0.875rem;
}

[data-theme="dark"] .feature-icon {
  color: var(--blue-400);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--blue-800);
  margin-bottom: 0.45rem;
}

[data-theme="dark"] .feature-card h2 {
  color: var(--blue-300);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ── Section header ── */
.section-header,
.content-card {
  padding: 1.75rem;
  border-radius: var(--glass-radius);
  margin-bottom: 1.25rem;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.section-header > *,
.content-card > * {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--glass-radius-xs);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.games-icon,
.script-icon,
.credits-icon {
  color: var(--blue-600);
}

.discord-icon {
  color: var(--discord-color);
}

[data-theme="dark"] .games-icon,
[data-theme="dark"] .script-icon,
[data-theme="dark"] .credits-icon {
  color: var(--blue-400);
}

.card-header h1,
.section-header h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--blue-800);
  margin-bottom: 0.3rem;
}

[data-theme="dark"] .card-header h1,
[data-theme="dark"] .section-header h1 {
  color: var(--blue-200);
}

.card-desc {
  color: var(--text-secondary);
}

/* ── Game card ── */
.game-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding: 1.35rem;
  border-radius: var(--glass-radius);
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-snapshot {
  position: relative;
  border-radius: var(--glass-radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: linear-gradient(145deg, #93c5fd 0%, #3b82f6 55%, #6366f1 100%);
}

.game-snapshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

@media (hover: hover) {
  .game-card:hover .game-snapshot img {
    transform: scale(1.03);
  }
}

.snapshot-overlay {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .status-badge.status-online {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-online);
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.game-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.game-title-row h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--blue-800);
}

[data-theme="dark"] .game-title-row h2 {
  color: var(--blue-200);
}

.supported-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--status-ok);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.supported-tag svg {
  width: 13px;
  height: 13px;
}

.game-desc {
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
  font-size: 0.9375rem;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.35rem;
}

.status-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--glass-radius-xs);
}

.status-item svg {
  width: 20px;
  height: 20px;
  color: var(--blue-500);
  flex-shrink: 0;
}

.status-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.status-value {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.status-ok {
  color: var(--status-ok);
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.game-actions .btn-primary {
  flex: 1;
  min-width: 180px;
}

.game-actions .btn-secondary {
  flex: 0 0 auto;
}

/* ── Discord ── */
.discord-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.35rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.15rem 1rem;
  border-radius: var(--glass-radius-xs);
  text-align: center;
}

.stat svg {
  width: 22px;
  height: 22px;
  color: var(--blue-500);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--blue-700);
}

[data-theme="dark"] .stat-value {
  color: var(--blue-300);
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.discord-join {
  margin-bottom: 0;
}

/* ── Script ── */
.script-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.script-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

[data-theme="dark"] .script-label {
  color: var(--blue-400);
}

.script-container {
  border-radius: var(--glass-radius-xs);
  overflow: hidden;
}

.script-container pre {
  margin: 0;
  padding: 1.15rem;
  overflow-x: auto;
  font-family: "Cascadia Code", "Consolas", "Monaco", monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--blue-900);
}

[data-theme="dark"] .script-container pre {
  color: var(--blue-200);
}

/* ── Credits ── */
.credits-grid {
  display: grid;
  gap: 0.875rem;
  margin-bottom: 1.35rem;
}

.credit-card {
  display: flex;
  gap: 1.15rem;
  padding: 1.35rem;
  border-radius: var(--glass-radius-sm);
}

.credit-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--glass-radius-xs);
  color: var(--blue-600);
}

[data-theme="dark"] .credit-avatar {
  color: var(--blue-400);
}

.credit-avatar svg {
  width: 28px;
  height: 28px;
}

.credit-info h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--blue-800);
  margin-bottom: 0.45rem;
}

[data-theme="dark"] .credit-info h2 {
  color: var(--blue-200);
}

.credit-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: var(--text-secondary);
}

.role-badge svg {
  width: 12px;
  height: 12px;
}

.role-owner {
  color: var(--blue-700);
}

.role-dev {
  color: var(--blue-600);
}

[data-theme="dark"] .role-owner {
  color: var(--blue-300);
}

[data-theme="dark"] .role-dev {
  color: var(--blue-400);
}

.credit-info p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.tech-stack {
  padding: 1.15rem;
  border-radius: var(--glass-radius-xs);
}

.tech-stack h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--blue-700);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .tech-stack h3 {
  color: var(--blue-300);
}

.tech-stack h3 svg {
  width: 18px;
  height: 18px;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--text-secondary);
}

.hidden {
  display: none !important;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 0;
  clear: both;
  text-align: center;
  padding: 0.45rem 0.875rem;
  margin: 1.5rem 1rem 1.25rem;
  border-radius: var(--glass-radius-sm);
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--text-muted);
  transition: margin-top var(--height-transition);
}

.panel-viewport[data-density="full"] + .footer {
  margin-top: 2rem;
}

.panel-viewport[data-density="compact"] + .footer {
  margin-top: 0.75rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.75rem 1.5rem;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--glass-radius-sm);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.35);
  z-index: 200;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Mobile / touch performance tier ── */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  :root,
  [data-theme="light"],
  [data-theme="dark"] {
    --glass-blur: 16px;
    --glass-saturate: 160%;
    --glass-bg: rgba(255, 255, 255, 0.42);
    --glass-bg-strong: rgba(255, 255, 255, 0.55);
    --glass-chip-bg: rgba(255, 255, 255, 0.32);
    --glass-inset: rgba(255, 255, 255, 0.28);
  }

  [data-theme="dark"] {
    --glass-bg: rgba(12, 18, 32, 0.58);
    --glass-bg-strong: rgba(18, 26, 44, 0.68);
    --glass-chip-bg: rgba(255, 255, 255, 0.07);
    --glass-inset: rgba(255, 255, 255, 0.05);
  }

  .aurora {
    filter: none;
    opacity: 0.4;
  }

  .orb-3 {
    display: none;
  }

  .mesh-gradient,
  .orb,
  .aurora {
    animation-duration: 40s;
  }

  .grid-overlay {
    animation: none;
    opacity: 0.3;
  }

  .glass-morphic::after {
    opacity: 0.55;
  }

  .panel {
    transform: translate3d(calc((var(--panel-i, 0) - var(--slide-index, 0)) * 100%), 0, 0);
    transition: transform var(--slide-transition);
  }

  .feature-card:hover,
  .game-card:hover .game-snapshot img,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}

/* ── Responsive layout ── */
@media (max-width: 900px) {
  .game-card {
    grid-template-columns: 1fr;
  }

  .game-snapshot {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .taskbar {
    flex-wrap: wrap;
    margin: 0.625rem;
    padding: 0.625rem 0.75rem;
  }

  .nav-tabs {
    display: none;
    width: 100%;
    flex-direction: column;
    order: 3;
  }

  .nav-tabs.open {
    display: flex;
  }

  .tab-indicator {
    display: none;
  }

  .tab.active {
    background: var(--glass-bg-strong);
    border-color: var(--glass-border);
  }

  .menu-toggle {
    display: flex;
  }

  .hero-inner {
    padding: 2rem 1.15rem;
  }

  .content-card,
  .section-header {
    padding: 1.35rem;
  }

  .discord-stats,
  .status-grid,
  .status-grid-3 {
    grid-template-columns: 1fr;
  }

  .script-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    width: 100%;
  }

  .game-actions {
    flex-direction: column;
  }

  .game-actions .btn {
    width: 100%;
  }

  .credit-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .credit-roles {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .panel-viewport {
    padding: 1.15rem 0.75rem 0.75rem;
  }

  .panel-viewport[data-density="full"] {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  .panel-viewport[data-density="compact"] {
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
  }

  .panel-viewport[data-density="full"] + .footer {
    margin-top: 1.5rem;
  }

  .panel-viewport[data-density="compact"] + .footer {
    margin-top: 0.5rem;
  }

  .footer {
    margin-bottom: 1rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.625rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .aurora {
    filter: none;
    animation: none;
  }

  .panel {
    transition: none;
  }

  .panel-viewport {
    transition: none;
  }

  .tab-indicator {
    transition: none;
  }
}
