/* ========================================
   CRACK THE ALGORITHM — Design System
   Gen Z / Dark / Neon / Glassmorphism
   ======================================== */

/* ---------- IMPORTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ---------- CSS VARIABLES ---------- */
:root {
  color-scheme: dark;
  
  /* Surfaces */
  --bg-primary: #0a192f;
  --bg-secondary: #0d1b2a;
  --bg-card: rgba(10, 25, 47, 0.4);
  --bg-card-hover: rgba(10, 25, 47, 0.6);
  --bg-glass: rgba(10, 25, 47, 0.5);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #8a8a9a;
  --text-muted: #55556a;

  /* Neon Accents */
  --neon-lime: #c8ff00;
  --neon-pink: #ff3366;
  --neon-cyan: #00f0ff;
  --neon-violet: #b366ff;
  --neon-orange: #ff8c42;
  --neon-blue: #4d7cff;

  /* Semantic */
  --color-success: #00e676;
  --color-warning: #ffab40;
  --color-danger: #ff5252;

  /* Verdict */
  --verdict-apply: #00e676;
  --verdict-maybe: #ffab40;
  --verdict-skip: #ff5252;

  /* Typography */
  --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Helvetica Neue', Helvetica, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- RESET ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: #0a192f;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: #0a192f;
  /* Merged ambient gradients for zero-flicker stability */
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(200, 255, 0, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(179, 102, 255, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 240, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, #0a192f 0%, #060e1b 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background noise texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ---------- NAVIGATION ---------- */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  height: 64px;
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-glass);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.brand-icon {
  font-size: 1.3rem;
}

.brand-text {
  background: linear-gradient(135deg, var(--neon-lime), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-tabs {
  display: flex;
  gap: var(--space-xs);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  background: rgba(200, 255, 0, 0.1);
  color: var(--neon-lime);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.1);
}

.tab-icon {
  font-size: 0.95rem;
}

.nav-accent-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-lime), var(--neon-violet), var(--neon-cyan), transparent);
  opacity: 0.3;
}

/* ---------- PAGES ---------- */
.page {
  display: none;
  position: relative;
  z-index: 1;
  padding-top: 64px;
  min-height: 100vh;
}

.page.active {
  display: block;
  animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.hero-content-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(200, 255, 0, 0.2);
  background: rgba(200, 255, 0, 0.05);
  color: var(--neon-lime);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(200, 255, 0, 0.1); }
  50% { box-shadow: 0 0 25px rgba(200, 255, 0, 0.2); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: var(--space-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-alt {
  background: linear-gradient(135deg, var(--neon-lime) 0%, var(--neon-cyan) 50%, var(--neon-violet) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 4s ease-in-out infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

/* ---------- CTA BUTTON ---------- */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--neon-lime), #a8e600);
  color: #000;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s var(--ease-spring);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.cta-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.cta-button:hover::before {
  transform: translateX(100%);
}

.cta-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 40px rgba(200, 255, 0, 0.3),
              0 0 80px rgba(200, 255, 0, 0.1);
}

.cta-button:active {
  transform: translateY(0) scale(0.98);
}

.cta-arrow {
  transition: transform 0.3s var(--ease-spring);
  font-size: 1.2rem;
}

.cta-button:hover .cta-arrow {
  transform: translateX(4px);
}

.cta-secondary {
  background: transparent;
  border: 2px solid var(--neon-lime);
  color: var(--neon-lime);
}

.cta-secondary:hover {
  background: rgba(200, 255, 0, 0.1);
}

/* ---------- HERO STATS ---------- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--neon-lime);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ---------- FLOATING SHAPES ---------- */
.floating-elements {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--neon-lime);
  top: 10%;
  left: -5%;
  opacity: 0.06;
  animation: float1 15s ease-in-out infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  background: var(--neon-violet);
  top: 60%;
  right: -5%;
  opacity: 0.06;
  animation: float2 18s ease-in-out infinite;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--neon-cyan);
  bottom: 10%;
  left: 30%;
  opacity: 0.04;
  animation: float3 20s ease-in-out infinite;
}

.shape-4 {
  width: 180px;
  height: 180px;
  background: var(--neon-pink);
  top: 30%;
  right: 20%;
  opacity: 0.04;
  animation: float1 22s ease-in-out infinite reverse;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 20px) scale(1.15); }
  66% { transform: translate(20px, -40px) scale(0.95); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, -30px); }
}

/* ---------- SECTION DIVIDER ---------- */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-xl) var(--space-xl);
}

.divider-text {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--text-muted);
  padding: 8px 24px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  background: var(--bg-glass);
}

/* ---------- DIMENSION CARDS ---------- */
.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.dimension-card {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  overflow: hidden;
  cursor: default;
  transition: all 0.5s var(--ease-out), opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
}

.dimension-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glass-hover);
  transform: translateY(-6px);
}

.dimension-card:nth-child(1):hover { box-shadow: 0 20px 60px rgba(200, 255, 0, 0.08); }
.dimension-card:nth-child(2):hover { box-shadow: 0 20px 60px rgba(0, 240, 255, 0.08); }
.dimension-card:nth-child(3):hover { box-shadow: 0 20px 60px rgba(255, 140, 66, 0.08); }
.dimension-card:nth-child(4):hover { box-shadow: 0 20px 60px rgba(179, 102, 255, 0.08); }

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  opacity: 0;
  transition: opacity 0.5s;
}

.dimension-card:nth-child(1) .card-glow { background: radial-gradient(circle, rgba(200, 255, 0, 0.06) 0%, transparent 70%); }
.dimension-card:nth-child(2) .card-glow { background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 70%); }
.dimension-card:nth-child(3) .card-glow { background: radial-gradient(circle, rgba(255, 140, 66, 0.06) 0%, transparent 70%); }
.dimension-card:nth-child(4) .card-glow { background: radial-gradient(circle, rgba(179, 102, 255, 0.06) 0%, transparent 70%); }

.dimension-card:hover .card-glow { opacity: 1; }

.dimension-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  display: inline-block;
  transition: transform 0.5s var(--ease-spring);
}

.dimension-card:hover .dimension-icon {
  transform: scale(1.2) rotate(-5deg);
}

.dimension-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  position: absolute;
  top: 12px;
  right: 16px;
  line-height: 1;
}

.dimension-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.dimension-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.dimension-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dimension-card:nth-child(1) .dimension-tag { background: rgba(200, 255, 0, 0.1); color: var(--neon-lime); }
.dimension-card:nth-child(2) .dimension-tag { background: rgba(0, 240, 255, 0.1); color: var(--neon-cyan); }
.dimension-card:nth-child(3) .dimension-tag { background: rgba(255, 140, 66, 0.1); color: var(--neon-orange); }
.dimension-card:nth-child(4) .dimension-tag { background: rgba(179, 102, 255, 0.1); color: var(--neon-violet); }

/* ---------- FEATURES SECTION ---------- */
.features-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-2xl);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  background: var(--bg-card);
  transition: all 0.3s var(--ease-out), opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  opacity: 0;
  transform: translateY(30px);
}

.feature-item:hover {
  border-color: var(--border-glass-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-emoji {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-item h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- BOTTOM CTA ---------- */
.bottom-cta {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.bottom-cta h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- FOOTER ---------- */
.landing-footer {
  text-align: center;
  padding: var(--space-xl);
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ========================================
   ANALYZER PAGE
   ======================================== */

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

/* ---------- GLASS CARD ---------- */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2),
              inset 0 0 30px rgba(255, 255, 255, 0.02);
  transition: all 0.3s var(--ease-out);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3),
              0 0 30px rgba(0, 240, 255, 0.03);
}

/* ---------- API KEY ---------- */
.api-key-section {
  margin-bottom: var(--space-xl);
}

.api-key-card {
  padding: var(--space-lg) var(--space-xl);
}

.api-key-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.api-key-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.key-icon {
  font-size: 1.2rem;
}

.api-key-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.api-key-input-wrapper {
  display: flex;
  gap: var(--space-sm);
}

.api-key-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s;
}

.api-key-input:focus {
  border-color: var(--neon-lime);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.1);
}

.btn-save-key {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--neon-lime);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  white-space: nowrap;
}

.btn-save-key:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(200, 255, 0, 0.3);
}

.api-key-status {
  font-size: 0.75rem;
  margin-top: var(--space-sm);
  min-height: 1.2em;
}

.api-key-status.success { color: var(--color-success); }
.api-key-status.error { color: var(--color-danger); }

/* ---------- INPUT SECTION ---------- */
.input-section {
  margin-bottom: var(--space-xl);
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.input-card {
  padding: var(--space-lg);
}

.input-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.input-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.input-icon {
  font-size: 1.2rem;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--neon-lime);
  background: rgba(200, 255, 0, 0.03);
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.upload-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.upload-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.success-icon { font-size: 2rem; }

.success-filename {
  font-size: 0.85rem;
  color: var(--neon-lime);
  font-weight: 500;
}

.btn-remove-file {
  padding: 4px 12px;
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-danger);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-remove-file:hover {
  background: rgba(255, 82, 82, 0.1);
}

.or-divider {
  text-align: center;
  margin: var(--space-md) 0;
  position: relative;
}

.or-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-glass);
}

.or-divider span {
  position: relative;
  padding: 0 16px;
  background: var(--bg-primary);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: 600;
}

/* Text Input */
.text-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.text-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}

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

/* ---------- ANALYZE BUTTON ---------- */
.analyze-section {
  text-align: center;
  margin-top: var(--space-lg);
}

.btn-analyze {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 64px;
  border: 2px solid var(--neon-lime);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--neon-lime);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.4s var(--ease-spring);
  min-width: 320px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 0 15px rgba(200, 255, 0, 0.5);
  letter-spacing: 1px;
}

.btn-analyze::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn-analyze:hover::before {
  transform: translateX(100%);
}

.btn-analyze:hover {
  transform: translateY(-5px) scale(1.05);
  background: rgba(200, 255, 0, 0.05);
  box-shadow: 0 0 50px rgba(200, 255, 0, 0.2),
              inset 0 0 20px rgba(200, 255, 0, 0.1);
  border-color: #fff;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.btn-analyze:active {
  transform: translateY(0) scale(0.98);
}

.btn-analyze:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-analyze:disabled:hover {
  box-shadow: none;
}

.btn-analyze:disabled::before {
  display: none;
}

.btn-new {
  background: transparent;
  border: 2px solid var(--neon-lime);
  color: var(--neon-lime);
}

.btn-new:hover {
  background: rgba(200, 255, 0, 0.1);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analyze-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* ---------- ERROR BANNER ---------- */
.error-banner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.2);
  animation: slideDown 0.3s var(--ease-out);
}

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

.error-icon { font-size: 1.2rem; flex-shrink: 0; }

.error-banner p {
  flex: 1;
  font-size: 0.85rem;
  color: var(--color-danger);
}

.error-close {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.error-close:hover { opacity: 1; }

/* ========================================
   RESULTS
   ======================================== */

.results-section {
  animation: resultsIn 0.8s var(--ease-out);
}

@keyframes resultsIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- VERDICT ---------- */
.verdict-container {
  margin-bottom: var(--space-xl);
}

.verdict-card {
  padding: var(--space-xl) var(--space-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.verdict-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.05;
  border-radius: inherit;
}

.verdict-card.apply::before { background: var(--verdict-apply); }
.verdict-card.maybe::before { background: var(--verdict-maybe); }
.verdict-card.skip::before { background: var(--verdict-skip); }

.verdict-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.verdict-value {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.verdict-card.apply .verdict-value { color: var(--verdict-apply); text-shadow: 0 0 40px rgba(0, 230, 118, 0.3); }
.verdict-card.maybe .verdict-value { color: var(--verdict-maybe); text-shadow: 0 0 40px rgba(255, 171, 64, 0.3); }
.verdict-card.skip .verdict-value { color: var(--verdict-skip); text-shadow: 0 0 40px rgba(255, 82, 82, 0.3); }

.verdict-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- SCORES ---------- */
.scores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.score-card {
  padding: var(--space-lg);
  text-align: center;
  transition: all 0.3s var(--ease-out);
}

.score-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
}

.score-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.score-icon {
  font-size: 1rem;
}

.score-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.score-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.score-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1.5s var(--ease-out), background 0.5s;
  position: relative;
}

.score-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  bottom: -2px;
  width: 10px;
  border-radius: 50%;
  filter: blur(4px);
  background: inherit;
}

.score-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

/* ---------- SKILLS BREAKDOWN ---------- */
.breakdown-section {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.pills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.pill-group {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
}

.pill-group-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.matched-title { color: var(--color-success); }
.gap-title { color: var(--color-danger); }
.bonus-title { color: var(--neon-violet); }

.pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  animation: pillIn 0.4s var(--ease-spring) backwards;
}

.pill-matched {
  background: rgba(0, 230, 118, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.pill-gap {
  background: rgba(255, 82, 82, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(255, 82, 82, 0.2);
}

.pill-bonus {
  background: rgba(179, 102, 255, 0.12);
  color: var(--neon-violet);
  border: 1px solid rgba(179, 102, 255, 0.2);
}

@keyframes pillIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- INSIGHTS ---------- */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.insight-card {
  padding: var(--space-lg);
}

.insight-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.insight-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.insight-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--neon-lime);
  font-weight: 700;
}

/* ---------- COVER LETTER ---------- */
.cover-letter-section {
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.cover-letter-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: var(--space-md);
  border-left: 3px solid var(--neon-lime);
  background: rgba(200, 255, 0, 0.02);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ---------- NEW ANALYSIS ---------- */
.new-analysis {
  text-align: center;
  padding: var(--space-xl) 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .dimensions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .scores-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pills-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #main-nav {
    padding: 0 var(--space-md);
    height: 56px;
  }

  .page {
    padding-top: 56px;
  }

  .hero {
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    letter-spacing: -2px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .dimensions-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md);
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .features-section {
    padding: 0 var(--space-md) var(--space-xl);
  }

  .input-grid {
    grid-template-columns: 1fr;
  }

  .scores-grid {
    grid-template-columns: 1fr 1fr;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .analyzer-container {
    padding: var(--space-md);
  }

  .verdict-card {
    padding: var(--space-lg);
  }

  .verdict-value {
    font-size: 2rem;
  }

  .brand-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .scores-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-md);
  }

  .nav-tab span:not(.tab-icon) {
    display: none;
  }

  .nav-tab {
    padding: 8px 14px;
  }
}
