/* ============================================================
   LUXURY SKEUOMORPHISM & 2026 GLASSMORPHISM DESIGN SYSTEM
   Marius Swish Engine Masterpiece Edition
   ============================================================ */

:root {
  --bg-dark: #06070a;
  --site-wallpaper: none;
  --panel-bg: rgba(16, 18, 26, 0.78);
  --card-bg: rgba(23, 26, 38, 0.82);
  --card-hover: rgba(32, 36, 52, 0.9);
  
  --text-main: #f5f5f7;
  --text-muted: #9e9ea8;
  --text-gold: #f3e5ab;

  /* Champagne Gold & Platinum Palette */
  --gold-primary: #d4af37;
  --gold-light: #f7e7a3;
  --gold-dark: #997819;
  --gold-glow: rgba(212, 175, 55, 0.45);

  --platinum-primary: #e2d1c3;
  --silver-primary: #c5c7d0;
  --bronze-primary: #d48c46;
  --cyan-accent: #00f0ff;

  /* Skeuomorphic Bevels & Shadows */
  --skeuo-border: 1px solid rgba(212, 175, 55, 0.32);
  --skeuo-border-light: 1px solid rgba(255, 255, 255, 0.2);
  --skeuo-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -2px 4px rgba(0, 0, 0, 0.85), 0 16px 36px rgba(0, 0, 0, 0.8);
  --skeuo-shadow-hover: inset 0 1px 2px rgba(255, 255, 255, 0.35), inset 0 -2px 4px rgba(0, 0, 0, 0.9), 0 20px 48px rgba(0, 0, 0, 0.95);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Typography */
  --font-serif: 'Playfair Display', 'Cinzel', Georgia, serif;
  --font-display: 'Cinzel', 'Playfair Display', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-color: var(--bg-dark);
  background-image: var(--site-wallpaper);
  background-position: center 38%;
  background-repeat: no-repeat;
  background-size: cover;
  animation: wallpaperReveal 480ms ease-out both;
}

body::after {
  z-index: -1;
  background: rgba(4, 5, 8, 0.69);
}

@keyframes wallpaperReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

[hidden] {
  display: none !important;
}

body.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(4, 5, 8, 0.22);
}

.auth-console {
  width: min(100%, 420px);
  padding: 1.75rem;
  border: 1px solid rgba(212, 175, 55, 0.58);
  border-radius: 8px;
  background: rgba(13, 15, 21, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.72),
    0 0 36px rgba(212, 175, 55, 0.12);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
  color: #f7e7a3;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-brand span:last-child {
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 4px;
  background: #d4af37;
  color: #0a0a08;
  font-family: var(--font-sans);
  font-size: 0.62rem;
}

.auth-heading {
  margin-bottom: 1.5rem;
}

.auth-kicker,
.auth-field label {
  display: block;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin-top: 0.35rem;
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 2rem;
  line-height: 1.15;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  margin-bottom: 0.45rem;
  color: var(--text-muted);
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  outline: none;
  background: #080a0f;
  color: var(--text-main);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.75);
  font: 600 1rem/1.2 var(--font-sans);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field input:focus-visible {
  border-color: var(--gold-primary);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.75),
    0 0 0 3px rgba(212, 175, 55, 0.22);
}

.turnstile-slot {
  min-height: 65px;
  display: grid;
  place-items: center;
  margin: 1.15rem 0 0.65rem;
  overflow: hidden;
}

.auth-status {
  min-height: 2.6rem;
  padding: 0.45rem 0;
  color: #e2d1c3;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid #f7e7a3;
  border-radius: 6px;
  background: #d4af37;
  color: #090906;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 8px 22px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  font: 800 0.9rem/1 var(--font-sans);
}

.auth-retry {
  margin: 0 0 0.85rem;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--gold-light);
  cursor: pointer;
  font: 700 0.78rem/1.2 var(--font-sans);
}

.auth-retry:focus-visible {
  outline: 3px solid rgba(0, 240, 255, 0.72);
  outline-offset: 3px;
}

.auth-submit:hover:not(:disabled) {
  background: #f0d269;
}

.auth-submit:focus-visible,
.logout-btn:focus-visible {
  outline: 3px solid rgba(0, 240, 255, 0.72);
  outline-offset: 3px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.48;
}

.auth-focus-guard {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* App Main Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2.5rem 5rem 2.5rem;
}

/* Navbar Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(25, 28, 40, 0.85), rgba(12, 14, 20, 0.92));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: var(--skeuo-border);
  box-shadow: var(--skeuo-shadow), 0 0 20px rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.2rem 2rem;
  margin-bottom: 2.2rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.brand-name {
  background: linear-gradient(135deg, #ffffff 20%, var(--gold-primary) 70%, var(--gold-light) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: #ffffff;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  width: max-content;
  min-width: 9.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #090906;
  -webkit-text-fill-color: #090906;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.nav-stats-pill {
  background: linear-gradient(180deg, #10121a, #07080c);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.2);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logout-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: #0b0d13;
  color: var(--text-main);
  cursor: pointer;
  font: 700 0.78rem/1 var(--font-sans);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.feedback-toggle {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: #0b0d13;
  color: var(--text-muted);
  cursor: pointer;
}

.feedback-toggle[data-enabled="true"] {
  border-color: rgba(0, 240, 255, 0.55);
  color: var(--cyan-accent);
  box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08), 0 0 12px rgba(0, 240, 255, 0.13);
}

.feedback-toggle:focus-visible,
.custom-select-box:focus-visible,
.option-item:focus-visible {
  outline: 3px solid rgba(0, 240, 255, 0.72);
  outline-offset: 3px;
}

.feedback-icon-on,
.feedback-toggle[data-enabled="true"] .feedback-icon-off {
  display: none;
}

.feedback-toggle[data-enabled="true"] .feedback-icon-on {
  display: block;
}

.logout-btn:hover {
  border-color: rgba(212, 175, 55, 0.62);
  color: var(--gold-light);
}

@media (max-width: 520px) {
  .auth-gate {
    align-items: start;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  }

  .auth-console {
    margin-top: min(10vh, 4rem);
    padding: 1.25rem;
  }

  .auth-brand {
    margin-bottom: 1.5rem;
  }

  .auth-heading h1 {
    font-size: 1.7rem;
  }

  .turnstile-slot {
    justify-content: start;
  }
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold-primary);
  animation: goldPulse 2s infinite ease-in-out;
}

@keyframes goldPulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 16px var(--gold-primary); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, rgba(28, 32, 48, 0.7), rgba(12, 14, 22, 0.88));
  backdrop-filter: blur(16px);
  border: var(--skeuo-border);
  box-shadow: var(--skeuo-shadow);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.5rem;
  margin-bottom: 2.2rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
  animation: metallicSheen 8s infinite;
}

@keyframes metallicSheen {
  0% { left: -100%; }
  30%, 100% { left: 200%; }
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.hero-text h1 span {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
}

.hero-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 750px;
  line-height: 1.6;
}

/* Height Filter Pills */
.height-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.height-btn {
  background: linear-gradient(180deg, rgba(24, 27, 40, 0.9), rgba(10, 12, 18, 0.95));
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.5);
  padding: 0.6rem 1.4rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.height-btn:hover {
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.2);
}

.height-btn.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #000;
  font-weight: 800;
  border-color: var(--gold-light);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), 0 6px 18px rgba(212, 175, 55, 0.4);
}

.engine-view-tabs {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.82);
}

.engine-view-tab {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.engine-view-tab.active {
  background: #d4af37;
  color: #080906;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.engine-view-tab:focus-visible,
.comparison-action:focus-visible {
  outline: 2px solid var(--cyan-accent);
  outline-offset: 2px;
}

/* 2-Column Main Layout Grid */
.creator-grid {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 2.2rem;
  align-items: start;
}

.comparison-studio {
  padding: 0.75rem 0 3rem;
}

.comparison-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.comparison-kicker {
  color: var(--cyan-accent);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-heading h2 {
  margin-top: 0.25rem;
  font-family: var(--font-serif);
  font-size: 2rem;
}

.comparison-empty {
  min-height: 16rem;
  display: grid;
  place-items: center;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 700;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.comparison-build {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.34);
  border-radius: 8px;
  background: rgba(13, 16, 23, 0.94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.52);
}

.comparison-build-heading h3 {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.15;
}

.comparison-build-heading p,
.comparison-settings {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.comparison-build-heading p {
  margin-top: 0.35rem;
}

.comparison-settings {
  margin: 1rem 0;
  padding-block: 0.7rem;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison-metrics {
  display: grid;
  gap: 0.15rem;
}

.comparison-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 38px;
  padding-inline: 0.55rem;
  border-left: 2px solid transparent;
}

.comparison-metric dt {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-metric dd {
  color: var(--text-main);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 800;
}

.comparison-metric.is-best {
  border-left-color: var(--cyan-accent);
  background: rgba(0, 240, 255, 0.055);
}

.comparison-metric.is-best dd {
  color: var(--gold-light);
}

.comparison-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin-top: 1rem;
}

.comparison-action {
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #171a23;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-weight: 800;
  cursor: pointer;
}

.comparison-action-load {
  border-color: rgba(212, 175, 55, 0.55);
  background: #d4af37;
  color: #080906;
}

.comparison-action-remove {
  color: #f2a5ad;
}

/* Skeuomorphic Glass Panel */
.skeuo-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: var(--skeuo-border);
  box-shadow: var(--skeuo-shadow);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out, box-shadow 0.25s ease;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 0.85rem;
}

.field-group {
  margin-bottom: 1.6rem;
  position: relative;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.badge-tag {
  background: linear-gradient(135deg, #1f2233, #0f101a);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.35);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.custom-select-box {
  width: 100%;
  background: linear-gradient(180deg, #141622, #0a0b12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7), 0 4px 10px rgba(0, 0, 0, 0.4);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-select-box:hover {
  border-color: var(--gold-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7), 0 0 14px rgba(212, 175, 55, 0.3);
}

/* Search Dropdown Popup */
.search-popup {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #0f111a;
  border: var(--skeuo-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.95), 0 0 20px rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  z-index: 100;
  margin-top: 0.5rem;
  padding: 0.85rem;
  display: none;
}

.search-popup.open {
  display: block;
  animation: popupSlide 0.2s ease-out;
}

@keyframes popupSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-input {
  width: 100%;
  background: #06070a;
  color: #fff;
  border: 1px solid var(--gold-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  margin-bottom: 0.6rem;
  outline: none;
}

.picker-result-count {
  min-height: 1rem;
  margin: 0 0 0.45rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.options-list {
  max-height: 230px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.option-item {
  width: 100%;
  border: 0;
  color: var(--text-main);
  font-family: var(--font-sans);
  text-align: left;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.option-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.option-id {
  font-size: 0.75rem;
  opacity: 0.7;
  flex: 0 0 auto;
  text-align: right;
}

.option-empty {
  padding: 0.75rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.option-item:hover {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #000;
  font-weight: 800;
}

/* Tactile Skeuomorphic Range Sliders */
.slider-container {
  background: linear-gradient(180deg, #10121c, #07080e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.slider-val {
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  background: #181b29;
  border-radius: 5px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
  outline: none;
  margin-top: 0.85rem;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 10px var(--gold-glow);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Right Grade Dashboard Panel */
.grade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(24, 27, 40, 0.95), rgba(10, 12, 18, 0.98));
  border: var(--skeuo-border);
  box-shadow: var(--skeuo-shadow), 0 0 25px rgba(212, 175, 55, 0.15);
  border-radius: var(--radius-md);
  padding: 1.75rem 2.2rem;
  margin-bottom: 2.2rem;
  position: relative;
  overflow: hidden;
}

.grade-header-info h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
}

.grade-header-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* Metallic 3D Overall Grade Badge */
.overall-badge {
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-light) 30%, var(--gold-primary) 70%, var(--gold-dark) 100%);
  color: #121008;
  border: 2px solid #ffffff;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), 0 8px 24px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.6);
  padding: 0.6rem 2rem;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.overall-badge:hover {
  transform: scale(1.08) rotate(-2deg);
}

/* 4 Metrics Skeuomorphic Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.2rem;
}

.metric-card {
  background: linear-gradient(145deg, rgba(25, 28, 42, 0.85), rgba(12, 14, 22, 0.95));
  border: var(--skeuo-border);
  box-shadow: var(--skeuo-shadow);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--skeuo-shadow-hover), 0 0 20px rgba(212, 175, 55, 0.25);
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.metric-title {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.metric-grade-tag {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold-light);
  background: linear-gradient(180deg, #181a26, #090a12);
  padding: 0.15rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.progress-bar-bg {
  width: 100%;
  height: 12px;
  background: #090a10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
  box-shadow: 0 0 12px var(--gold-primary);
  width: 0%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Green Window Banner */
.green-window-banner {
  background: linear-gradient(135deg, rgba(20, 24, 36, 0.95), rgba(8, 10, 16, 0.98));
  border: 1px solid var(--gold-primary);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 1.4rem 2rem;
  margin-bottom: 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gw-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gw-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

/* Visual Cue Timeline Box */
.timeline-card {
  background: linear-gradient(180deg, #10121c, #07080e);
  border: var(--skeuo-border);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  margin-bottom: 2.2rem;
}

.timeline-title {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.timeline-track {
  position: relative;
  height: 52px;
  background: #07080e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.timeline-node {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.5s ease;
}

.node-pin {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 35% 35%, #fff, var(--gold-primary));
  border: 2px solid #000;
  box-shadow: 0 0 10px var(--gold-primary);
  border-radius: 50%;
}

.node-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  margin-top: 0.4rem;
  white-space: nowrap;
}

/* Tactile Push Buttons */
.action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.save-toast {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--cyan-accent);
  border-radius: 4px;
  background: rgba(8, 12, 16, 0.94);
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  font-size: 0.8rem;
  font-weight: 700;
}

.save-toast[data-kind="error"] {
  border-left-color: #f47280;
}

.neo-btn {
  background: linear-gradient(135deg, #ffffff 0%, var(--gold-light) 40%, var(--gold-primary) 80%, var(--gold-dark) 100%);
  color: #0b0a05;
  border: 1px solid #ffffff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.4);
  padding: 0.95rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.neo-btn:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.9), 0 12px 28px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.7);
}

.neo-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.neo-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.52;
  transform: none;
}

@media (max-width: 960px) {
  .app-container {
    padding-inline: 1.5rem;
  }

  .navbar {
    flex-wrap: wrap;
    gap: 0.9rem;
  }

  .nav-stats-pill {
    order: 3;
    width: 100%;
  }

  .creator-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .comparison-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 641px) {
  :root {
    --site-wallpaper: image-set(url("assets/swish-court-desktop.9243505913e3.webp") type("image/webp") 1x);
  }
}

@media (max-width: 640px) {
  body::before {
    background-image: image-set(url("assets/swish-court-mobile.fba5a0a956dd.webp") type("image/webp") 1x);
    background-position: center 18%;
  }

  body::after {
    background: rgba(4, 5, 8, 0.72);
  }

  .app-container {
    padding: 1rem 1rem 3rem;
  }

  .navbar {
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
  }

  .brand-wrap {
    min-width: 0;
  }

  .brand-title {
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1.25rem;
  }

  .brand-badge {
    min-width: 8.6rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.68rem;
  }

  .logout-btn span {
    display: none;
  }

  .nav-stats-pill {
    padding-inline: 0.85rem;
    font-size: 0.74rem;
  }

  .hero-banner,
  .skeuo-panel {
    padding: 1.25rem;
    border-radius: 8px;
  }

  .hero-banner {
    margin-bottom: 1rem;
  }

  .engine-view-tabs {
    position: static;
    width: 100%;
    margin-top: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .height-filter-bar {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .height-btn {
    flex: 1 1 9rem;
    padding-inline: 0.8rem;
  }

  .creator-grid {
    gap: 1rem;
  }

  .grade-header {
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }

  .grade-header-info h2 {
    font-size: 1.45rem;
  }

  .overall-badge {
    flex: 0 0 auto;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    font-size: 2rem;
  }

  .metrics-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .green-window-banner {
    gap: 1rem;
    padding: 1.1rem;
  }

  .gw-title {
    font-size: 1rem;
  }

  .gw-value {
    font-size: 1.65rem;
  }

  .timeline-card {
    padding-inline: 1rem;
  }

  .timeline-track {
    height: 72px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.5rem;
  }

  .timeline-node {
    position: static;
    min-width: 0;
    transform: none;
  }

  .node-label {
    white-space: normal;
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }

  .skeuo-panel,
  .metric-card,
  .grade-header,
  .overall-badge,
  .progress-bar-fill,
  .timeline-node {
    transition: none;
  }
}

@media (hover: none), (pointer: coarse) {
  .skeuo-panel,
  .metric-card,
  .grade-header,
  .metric-card:hover,
  .overall-badge:hover {
    transform: none !important;
  }
}
