/* ==========================================================================
   couchpotato.es - Design System & Master Stylesheet
   Theme: Midnight Cinema & Warm Amber Glow
   Responsive, High-Performance, Accessible (WCAG AA)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --bg-darkest: #07090E;
  --bg-dark: #0D111A;
  --bg-surface: #131926;
  --bg-elevated: #1B2334;
  --bg-glass: rgba(19, 25, 38, 0.75);
  
  --amber-primary: #F59E0B;
  --amber-light: #FCD34D;
  --amber-dark: #D97706;
  --amber-glow: rgba(245, 158, 11, 0.25);
  
  --accent-orange: #FF6B00;
  --accent-orange-glow: rgba(255, 107, 0, 0.3);
  --accent-blue: #38BDF8;
  --accent-emerald: #10B981;
  --accent-purple: #A855F7;
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-amber: rgba(245, 158, 11, 0.3);
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.2);
  --shadow-glow-strong: 0 0 40px rgba(245, 158, 11, 0.45);
  
  /* Fonts */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-darkest);
  color: var(--text-main);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 0%, #151C2C 0%, #07090E 70%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, .brand-font {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.25;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  color: var(--text-muted);
  font-size: 1.025rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: #252F44;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amber-dark);
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--amber-primary), var(--accent-orange));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  font-size: 1.35rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-item a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
}

.nav-item a:hover, .nav-item a.active {
  color: var(--amber-light);
}

.nav-item a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--amber-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--amber-primary);
}

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

/* Mobile Hamburger Menu */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons & CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-primary), var(--accent-orange));
  color: #000;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-strong);
  color: #000;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-amber);
  color: var(--amber-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-light);
  border: 1px solid var(--border-amber);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #7DD3FC;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Glass Card */
.card-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card-glass:hover {
  border-color: var(--border-amber);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

/* Product Card */
.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.product-card:hover {
  border-color: var(--border-amber);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-elevated);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.product-badge-float {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.product-score-float {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--amber-primary);
  border: 1px solid var(--border-amber);
}

.product-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  line-height: 1.3;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.spec-pill {
  font-size: 0.78rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.product-pricing {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.price-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Store Switcher Pill */
.store-pills {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.store-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.store-pill:hover {
  border-color: var(--amber-primary);
  color: var(--amber-light);
}

/* Affiliate Notice Bar */
.affiliate-notice {
  background: rgba(19, 25, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.affiliate-notice i {
  color: var(--amber-primary);
  font-size: 1.1rem;
}

/* Comparison Table */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  text-align: left;
}

.comparison-table th, .comparison-table td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th {
  background: var(--bg-elevated);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.comparison-table tr:hover td {
  background: rgba(245, 158, 11, 0.03);
}

.comparison-table .highlight-col {
  background: rgba(245, 158, 11, 0.06);
  border-left: 1px solid var(--border-amber);
  border-right: 1px solid var(--border-amber);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-glow-bg {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(255, 107, 0, 0.08) 40%, transparent 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-title span {
  background: linear-gradient(135deg, #FFF 30%, var(--amber-light) 75%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-media-wrapper {
  position: relative;
  margin-top: 3.5rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-amber);
  box-shadow: var(--shadow-glow-strong), 0 25px 50px -12px rgba(0,0,0,0.8);
}

/* Video Player Styling */
.cinematic-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cinematic-video-frame iframe, .cinematic-video-frame video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Interactive Tools UI */
.interactive-tool-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-amber);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.step-dot.active {
  background: var(--amber-primary);
  color: #000;
  box-shadow: 0 0 15px var(--amber-primary);
  border-color: var(--amber-primary);
}

.step-dot.completed {
  background: var(--accent-emerald);
  color: #FFF;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.choice-card {
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.choice-card:hover {
  border-color: var(--amber-primary);
  background: rgba(245, 158, 11, 0.05);
  transform: translateY(-3px);
}

.choice-card.selected {
  border-color: var(--amber-primary);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: var(--shadow-glow);
}

.choice-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.choice-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.choice-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: auto;
  background: var(--bg-darkest);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  max-width: 320px;
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* Margins & Spacing Enhancements */
.section-spacer {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  .section-spacer {
    padding: 2.5rem 0;
  }
}

/* Store pills wrapping and margin control */
.store-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.product-pricing {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.comparison-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  margin: 2rem 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: calc(100vw - 3rem);
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-amber);
  color: var(--text-main);
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  animation: slideIn 0.3s ease forwards;
}

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

/* Responsive Breakpoints & Margin Fine-Tuning */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 860px) {
  .interactive-highlight-box {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    padding: 2.25rem 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .container, .container-narrow {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-section {
    padding: 3rem 0 2rem;
  }

  .hero-media-wrapper {
    margin-top: 2rem;
    border-radius: var(--radius-lg);
  }
  
  .interactive-tool-box {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .card-glass {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }
  
  .toast {
    width: 100%;
    justify-content: center;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

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

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

  .btn-lg {
    width: 100%;
    padding: 0.9rem 1.5rem;
  }

  .step-indicator {
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .price-val {
    font-size: 1.25rem;
  }
}
