:root {
  --bg: #070707;
  --bg-soft: #111111;
  --surface: #181818;
  --surface-hover: #242424;
  --text: #f5f5f5;
  --muted: #bdbdbd;
  --accent: #e50914;
  --accent-soft: #ff4d57;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: min(1180px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Aptos", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top, rgba(229, 9, 20, 0.18), transparent 28%),
    linear-gradient(180deg, #111111 0%, #070707 30%, #050505 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid rgba(255, 77, 87, 0.9);
  outline-offset: 3px;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.noscript-banner {
  position: relative;
  z-index: 1100;
  padding: 0.9rem 1rem;
  background: rgba(229, 9, 20, 0.12);
  color: #ffe6e7;
  text-align: center;
  border-bottom: 1px solid rgba(229, 9, 20, 0.28);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.logo::first-letter {
  color: var(--accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 9rem 0 5rem;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.72) 100%),
    url("https://images.unsplash.com/photo-1440404653325-ab127d49abc1?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.76) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  animation: fade-up 700ms ease both;
}

.hero-badge,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.16);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 1.2rem 0 1rem;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 2rem;
  color: #d2d2d2;
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 16px 35px rgba(229, 9, 20, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(229, 9, 20, 0.34);
}

.movies-section,
.about-section {
  padding: 5rem 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-heading h2,
.about-card h2 {
  margin: 1rem 0 0;
  font-size: clamp(2rem, 3.6vw, 3rem);
  letter-spacing: -0.04em;
}

.section-heading p,
.about-card p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.status-message {
  min-height: 28px;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.status-message.error {
  padding: 1rem 1.2rem;
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(229, 9, 20, 0.1);
  color: #ffd5d7;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.movie-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  animation: fade-up 700ms ease both;
}

.movie-card:hover,
.movie-card:focus-within {
  transform: translateY(-8px) scale(1.02);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border-color: rgba(229, 9, 20, 0.24);
}

.movie-poster {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.movie-body {
  padding: 1rem 1rem 1.2rem;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.movie-genre {
  color: var(--muted);
  font-size: 0.92rem;
}

.movie-rating {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.16);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.65;
}

.movie-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.trailer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 12px 26px rgba(229, 9, 20, 0.22);
}

.trailer-button:hover,
.trailer-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(229, 9, 20, 0.28);
}

.about-card {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(229, 9, 20, 0.12), rgba(255, 255, 255, 0.03)),
    var(--surface);
}

.site-footer {
  padding: 0 0 2.5rem;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: #9f9f9f;
  font-size: 0.95rem;
  line-height: 1.7;
}

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.trailer-modal.is-open {
  display: block;
}

.trailer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.trailer-panel {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100% - 1.5rem));
  margin: 8vh auto;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0d0d0d;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
}

.trailer-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.trailer-close {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
}

.trailer-frame-wrap {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000000;
  aspect-ratio: 16 / 9;
}

.trailer-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(17, 17, 17, 0.96);
  }

  .nav-menu.is-open {
    display: flex;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 88svh;
    padding-top: 8rem;
  }
}

@media (max-width: 640px) {
  .navbar {
    min-height: 68px;
  }

  .hero h1 {
    line-height: 1.02;
  }

  .movies-section,
  .about-section {
    padding: 4rem 0;
  }

  .movie-body {
    padding: 0.95rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
