/* HEADER & NAVIGATION */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(8, 8, 16, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header.hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.3s ease;
}

nav a.active {
  color: var(--accent);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 1500px 800px at 50% 30%, rgba(88, 44, 131, 0.3), transparent),
              radial-gradient(ellipse 1200px 600px at 80% 70%, rgba(30, 58, 138, 0.2), transparent);
  z-index: 0;
}

#rain-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-title {
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(255, 114, 54, 0.4);
  animation: fadeInDown 0.8s ease-out;
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.25rem);
  letter-spacing: 0.2em;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 114, 54, 0.1);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta:hover {
  background: rgba(255, 114, 54, 0.2);
  box-shadow: 0 0 20px var(--accent-glow);
}

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

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

/* OVERVIEW SECTION */
.overview {
  position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  border-top: 1px solid var(--divider);
}

.overview h2 {
  margin-bottom: 2rem;
}

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

.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(255, 114, 54, 0.05);
  transform: translateY(-4px);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Timeline */
.timeline {
  margin: 4rem 0;
  position: relative;
}

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

.timeline-item {
  position: relative;
  text-align: center;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.timeline-title {
  color: var(--text);
  margin-bottom: 0.5rem;
}

.timeline-duration {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Box office table */
.box-office-table {
  width: 100%;
  border-collapse: collapse;
  margin: 3rem 0;
  background: var(--surface-2);
  overflow: hidden;
  border: 1px solid var(--border);
}

.box-office-table th {
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.box-office-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--divider);
}

.box-office-table tr:hover {
  background: rgba(255, 114, 54, 0.05);
}

.box-office-table tr:last-child td {
  border-bottom: none;
}

/* FILM SECTION */
.film-section {
  position: relative;
  background: var(--surface);
}

.film-hero {
  position: relative;
  height: 400px;
  overflow: hidden;
  margin-bottom: 3rem;
  border-radius: 4px;
}

.film-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5) brightness(0.6);
}

.film-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 16, 0) 0%, rgba(8, 8, 16, 0.9) 100%);
  z-index: 2;
}

.film-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 3rem;
  color: var(--text);
}

.film-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.film-title h2 {
  margin: 0;
}

.film-year {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
}

.film-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.film-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.info-item {
  text-align: center;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.info-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.plot-analysis {
  margin: 3rem 0;
  line-height: 1.8;
}

.plot-analysis p {
  margin-bottom: 1rem;
  color: var(--text);
}

/* Thematic sections */
.thematic-section {
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 114, 54, 0.03);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.thematic-section h4 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.thematic-section p {
  color: var(--text);
  line-height: 1.8;
}

/* Critics consensus */
.critics-consensus {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--surface-2);
  border-left: 4px solid var(--secondary);
  border-radius: 4px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Character grid */
.characters {
  margin: 3rem 0;
}

.characters h3 {
  margin-bottom: 2rem;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.character-card {
  background: rgba(255, 114, 54, 0.05);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 4px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.character-card:hover {
  background: rgba(255, 114, 54, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.character-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.character-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.character-bio {
  color: var(--text);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* FRANCHISE THEMES */
.franchise-themes {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-top: 1px solid var(--divider);
}

.themes-intro {
  margin-bottom: 4rem;
}

.themes-grid {
  display: grid;
  gap: 4rem;
  margin: 3rem 0;
}

.theme-item {
  position: relative;
  padding-left: 0;
}

.theme-number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--text-faint);
  opacity: 0.1;
  position: absolute;
  top: -2rem;
  left: -1rem;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
}

.theme-content {
  position: relative;
  z-index: 1;
}

.theme-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.theme-text {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 3rem 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--accent);
}

.comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--divider);
  color: var(--text);
}

.comparison-table tr:hover {
  background: rgba(255, 114, 54, 0.05);
}

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--divider);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255, 114, 54, 0.02) 2px,
    rgba(255, 114, 54, 0.02) 4px
  );
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.footer-sources {
  border-top: 1px solid var(--divider);
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer-sources p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav ul {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(8, 8, 16, 0.98);
    backdrop-filter: blur(10px);
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

  nav ul.open {
    display: flex;
  }

  nav li {
    border-bottom: 1px solid var(--divider);
  }

  nav a {
    display: block;
    padding: 1rem 2rem;
  }

  .hamburger {
    display: flex;
  }

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

  .timeline-items {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  header {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  nav a {
    font-size: 0.85rem;
  }

  .hero {
    padding-top: 60px;
  }

  .film-hero {
    height: 300px;
  }

  .film-hero-content {
    padding: 2rem;
  }

  .film-title h2 {
    font-size: 1.5rem;
  }

  .theme-number {
    font-size: 4rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 1rem;
  }

  .logo {
    font-size: 1rem;
  }

  nav a {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }

  .film-hero {
    height: 200px;
  }

  .film-meta {
    gap: 0.5rem;
  }

  .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

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

  .theme-number {
    font-size: 2.5rem;
    top: 0;
    left: 0;
  }

  footer {
    padding: 2rem 1rem;
  }
}
