:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #9333ea;
  --dark: #0f172a;
  --dark-lighter: #1e293b;
  --light: #ffffff;
  --light-bg: #f8fafc;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--dark);
  background: var(--light-bg);
  line-height: 1.7;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: var(--dark);
  color: var(--light);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

.container {
  width: min(90%, 1280px);
  margin: 0 auto;
  padding: 0 1.5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--dark);
  transition: color 0.2s ease;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--gray-800);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background-color: var(--gray-100);
  color: var(--primary);
  outline: none;
  transform: translateY(-1px);
}

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  color: var(--light);
  text-align: center;
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 
               0 2px 10px rgba(0, 0, 0, 0.5),
               0 0 40px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.hero p {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin: 0;
  color: #ffffff;
  opacity: 1;
  font-weight: 500;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6),
               0 2px 8px rgba(0, 0, 0, 0.5),
               0 0 30px rgba(0, 0, 0, 0.3);
  line-height: 1.7;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.hero-small {
  padding: 5rem 0;
}

.hero-small h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.hero-small p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.app-store-badge {
  display: inline-block;
  margin-top: 2.5rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.app-store-badge svg {
  height: 54px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.app-store-badge:hover,
.app-store-badge:focus-visible {
  transform: translateY(-3px) scale(1.02);
  outline: none;
}

.app-store-badge:focus-visible svg {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 10px;
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  background: var(--light);
  color: var(--primary);
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  outline: none;
  background: var(--gray-50);
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 3rem 0;
}

/* TV Gallery Grid */
.tv-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 4rem;
}

/* TV Mockup Component */
.tv-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tv-mockup:hover {
  transform: translateY(-8px);
}

.tv-frame {
  background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
  padding: 12px 12px 12px 12px;
  border-radius: 16px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  transition: box-shadow 0.4s ease;
}

.tv-mockup:hover .tv-frame {
  box-shadow: 
    0 35px 60px -15px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 40px rgba(96, 165, 250, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tv-screen {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.tv-screen img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.tv-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 40%,
    transparent 60%
  );
  pointer-events: none;
  border-radius: 6px;
}

.tv-stand {
  width: 80px;
  height: 8px;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 0 0 4px 4px;
  margin-top: -2px;
  position: relative;
}

.tv-stand::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 6px;
  background: linear-gradient(180deg, #252525 0%, #1a1a1a 100%);
  border-radius: 3px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tv-caption {
  margin: 2rem 0 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  letter-spacing: -0.01em;
}

section {
  padding: 5rem 0;
}

section#features {
  padding-top: 6rem;
}

.card {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.75;
  flex-grow: 1;
  font-size: 1rem;
}

section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 1rem 0;
  letter-spacing: -0.03em;
  color: var(--dark);
  line-height: 1.2;
}

.safety-note {
  margin-top: 2rem;
  font-size: 0.875rem;
  color: var(--gray-500);
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
}

.download {
  text-align: center;
  padding: 5rem 0;
}

.footer {
  background: var(--dark);
  color: var(--light);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--gray-400);
  font-size: 0.9375rem;
}

.footer ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.footer a {
  color: var(--gray-300);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  font-size: 0.9375rem;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--light);
  outline: none;
  text-decoration: underline;
}

.apple-disclaimer {
  font-size: 0.875rem;
  margin-top: 1rem;
  color: var(--gray-400);
}

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark-lighter);
  color: var(--light);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.cookie-consent p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-consent button {
  background: var(--primary);
  border: none;
  color: var(--light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-consent button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.hidden {
  display: none;
}

.legal {
  padding: 3rem 0 5rem;
  max-width: 800px;
  margin: 0 auto;
}

.legal h1 {
  margin-top: 0;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.legal h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.legal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.legal p {
  margin: 0 0 1.25rem 0;
  color: var(--gray-800);
  line-height: 1.8;
  font-size: 1.0625rem;
}

.legal ul {
  margin: 0 0 1.25rem 0;
  padding-left: 1.5rem;
  color: var(--gray-800);
  line-height: 1.8;
  font-size: 1.0625rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.legal a:hover,
.legal a:focus-visible {
  color: var(--primary-hover);
  border-bottom-color: var(--primary-hover);
  outline: none;
}

.legal hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid var(--gray-200);
}

.legal section {
  padding: 0;
}

/* Typography improvements */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-weight: 800;
}

h2 {
  font-weight: 700;
}

h3 {
  font-weight: 600;
}

p {
  line-height: 1.75;
  color: var(--gray-800);
}

/* Smooth scrolling and anchor offset for sticky header */
html {
  scroll-behavior: smooth;
  color-scheme: light dark;
}

:target {
  scroll-margin-top: 100px;
}

@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;
  }
  
  .hero {
    animation: none;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .hero {
    padding: 5rem 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tv-gallery {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
  }

  .tv-frame {
    padding: 8px;
    border-radius: 12px;
  }

  .tv-stand {
    width: 60px;
    height: 6px;
  }

  .tv-stand::before {
    width: 90px;
    height: 5px;
    bottom: -10px;
  }

  .tv-caption {
    font-size: 1rem;
    margin-top: 1.5rem;
  }

  section {
    padding: 3rem 0;
  }

  section#features {
    padding-top: 4rem;
  }

  .card {
    padding: 1.5rem;
  }

  .footer ul {
    gap: 1rem;
    flex-direction: column;
  }

  .cookie-consent {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent button {
    width: 100%;
  }

  .legal {
    padding: 2rem 0 3rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4rem 0;
  }

  .card {
    padding: 1.25rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #60a5fa;
    --primary-hover: #3b82f6;
    --primary-light: #93c5fd;
    --dark: #e5e7eb;
    --dark-lighter: #1e293b;
    --light: #0f172a;
    --light-bg: #0b1220;
    --gray-50: #1e293b;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
  }

  body {
    color: var(--dark);
    background: var(--light-bg);
  }

  header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: var(--gray-800);
  }

  .logo {
    color: var(--dark);
  }

  .logo:hover {
    color: var(--primary);
  }

  .nav-links a {
    color: var(--gray-300);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background-color: rgba(96, 165, 250, 0.15);
    color: var(--primary);
  }

  .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    background-size: 200% 200%;
  }

  .hero::before {
    background: rgba(0, 0, 0, 0.5);
  }

  .hero::after {
    background: radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.08) 0%, transparent 50%);
  }

  .hero h1,
  .hero p {
    color: #ffffff;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.8),
                 0 2px 12px rgba(0, 0, 0, 0.7),
                 0 0 50px rgba(0, 0, 0, 0.5);
  }

  .card {
    background: var(--gray-50);
    border-color: var(--gray-800);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  }

  .card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
  }

  .card h3 {
    color: var(--dark);
  }

  .card p {
    color: var(--gray-400);
  }

  section h2 {
    color: var(--dark);
  }

  .footer {
    background: var(--light-bg);
    border-top: 1px solid var(--gray-800);
  }

  .footer p {
    color: var(--gray-500);
  }

  .footer a {
    color: var(--gray-300);
  }

  .footer a:hover,
  .footer a:focus-visible {
    color: var(--dark);
  }

  .safety-note {
    background: var(--gray-50);
    color: var(--gray-300);
    border-left-color: var(--primary);
  }

  .tv-caption {
    color: var(--gray-300);
  }

  .tv-mockup:hover .tv-frame {
    box-shadow: 
      0 35px 60px -15px rgba(0, 0, 0, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.1),
      0 0 50px rgba(96, 165, 250, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }

  .legal h1,
  .legal h2,
  .legal h3 {
    color: var(--dark);
  }

  .legal p,
  .legal li {
    color: var(--gray-400);
  }
  
  p {
    color: var(--gray-300);
  }

  .legal a {
    color: var(--primary);
  }

  .legal a:hover,
  .legal a:focus-visible {
    color: var(--primary-light);
  }

  .legal hr {
    border-top-color: var(--gray-800);
  }

  .cookie-consent {
    background: rgba(30, 41, 59, 0.95);
  }
}
