/*
 * IPTV Smart Flix Player - Production Stylesheet
 * Integrated with Google Stitch "Apex Stream" Design System
 */

:root {
  --font-headline: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Deep Space Dark Theme (Default) */
  --bg-canvas: #0B1220;
  --bg-surface: #111C2E;
  --bg-surface-elevated: #18263E;
  --border-color: #1E293B;
  --border-focus: #06B6D4;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --accent: #06B6D4;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --status-live: #10B981;
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-secondary: #64748B;
  --card-shadow: 0 8px 24px -4px rgba(2, 6, 23, 0.6);
}

/* Light Theme Variable Overrides */
html.theme-light {
  --bg-canvas: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F1F5F9;
  --border-color: #E2E8F0;
  --border-focus: #2563EB;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --accent: #0284C7;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --status-live: #059669;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-secondary: #64748B;
  --card-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  scroll-behavior: smooth;
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.grid { display: grid; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Grid Responsive Breakpoints */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
}

/* Spacing */
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

/* Custom Component Classes from Google Stitch Design System */

/* 1. Header & Navigation */
.site-header {
  background-color: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}
html.theme-light .site-header {
  background-color: rgba(255, 255, 255, 0.9);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

/* 2. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-headline);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-accent {
  background-color: var(--accent);
  color: #0B1220;
  font-weight: 700;
}
.btn-accent:hover {
  background-color: #38bdf8;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.45);
}

/* 3. Surface Cards */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.5), 0 0 16px var(--accent-glow);
  transform: translateY(-3px);
}

/* 4. Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-elevated);
}

.badge-live {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--status-live);
}
.badge-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--status-live);
  box-shadow: 0 0 8px var(--status-live);
  animation: pulse 2s infinite;
}

.badge-cyan {
  background-color: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent);
}

/* 5. Inputs & Forms */
.form-input, .form-textarea, .form-select {
  width: 100%;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* 6. Typography Specs */
.display-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
}
.text-cyan { color: var(--accent); }
.text-muted { color: var(--text-muted); }

/* 7. Accordion FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
  color: var(--text-muted);
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding-bottom: 1.25rem;
  transition: max-height 0.4s ease-in-out;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-icon {
  transition: transform 0.25s ease;
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
