/* ============================================
   BEST SCI-FI OF THE DECADE (2015-2025)
   Dark cinematic theme
   ============================================ */

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

:root {
  --bg-deep: #06060e;
  --bg-main: #0a0a14;
  --bg-card: #12121f;
  --bg-card-hover: #1a1a2e;
  --accent: #00c8ff;
  --accent-glow: rgba(0, 200, 255, 0.15);
  --accent-secondary: #ff6b35;
  --text-primary: #e8e8ec;
  --text-secondary: #9898a8;
  --text-muted: #5a5a6e;
  --border: #1e1e30;
  --border-hover: #2e2e48;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', var(--font);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Background grid effect */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ---- TYPOGRAPHY ---- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: #fff; }

/* ---- LAYOUT ---- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.page-content {
  padding: 120px 0 80px;
}

/* ---- NAV ---- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 6, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

nav .logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

nav .logo .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #0066ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

nav .nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

nav .nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

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

/* Mobile nav */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(6, 6, 14, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    gap: 2px;
  }

  nav .nav-links.open { display: flex; }

  nav .nav-links a {
    padding: 12px 14px;
  }
}

/* ---- HERO ---- */

.hero {
  text-align: center;
  padding: 140px 0 80px;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero .badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(0, 200, 255, 0.05);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, #a855f7 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ---- CATEGORY CARDS (index page) ---- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card:hover::before { opacity: 1; }

.category-card .card-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(0, 200, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card h3 {
  color: var(--text-primary);
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.category-card .card-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: auto;
  transition: var(--transition);
}

.category-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ---- MOVIE CARDS ---- */

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.movie-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.movie-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.movie-card .movie-poster {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.movie-card .movie-poster-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
  border-bottom: 1px solid var(--border);
}

.movie-card .movie-body {
  padding: 24px;
}

.movie-card .movie-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.movie-card .movie-year {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 200, 255, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
}

.movie-card .movie-rating {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.movie-card .movie-director {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.movie-card h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

.movie-card .movie-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.movie-card .movie-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.movie-card .movie-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- PAGE HEADER (category pages) ---- */

.page-header {
  text-align: center;
  padding: 120px 0 48px;
  position: relative;
  z-index: 1;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.page-header .page-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 16px auto 0;
}

/* ---- FEATURED MOVIE (large card) ---- */

.featured-movie {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.featured-movie::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
}

.featured-movie .featured-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 107, 53, 0.15);
  color: var(--accent-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.featured-movie h2 {
  margin-bottom: 8px;
}

.featured-movie .featured-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.featured-movie .featured-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.featured-movie .featured-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.featured-movie .featured-quote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.95rem;
}

.featured-movie .featured-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  min-height: 280px;
  background: linear-gradient(135deg, rgba(0, 200, 255, 0.05), rgba(168, 85, 247, 0.05));
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .featured-movie {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .featured-movie .featured-visual {
    min-height: 200px;
    font-size: 5rem;
  }
}

/* ---- HONORABLE MENTIONS ---- */

.honorable-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.honorable-section h2 {
  margin-bottom: 24px;
}

.honorable-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.honorable-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.honorable-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.honorable-item .h-rank {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 24px;
}

.honorable-item .h-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.honorable-item .h-year {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

/* ---- BACK LINK ---- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 6px 0;
}

.back-link:hover {
  color: var(--accent);
}

/* ---- FOOTER ---- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

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

footer a {
  color: var(--text-secondary);
}

/* ---- TOP 10 LIST (index) ---- */

.top-ten-list {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-ten-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.top-ten-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.top-ten-item .rank {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 48px;
  text-align: center;
}

.top-ten-item:nth-child(1) .rank { color: var(--accent); }
.top-ten-item:nth-child(2) .rank { color: var(--accent); opacity: 0.8; }
.top-ten-item:nth-child(3) .rank { color: var(--accent); opacity: 0.6; }

.top-ten-item .rank-info {
  flex: 1;
}

.top-ten-item .rank-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.top-ten-item .rank-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.top-ten-item .rank-score {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-secondary);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .top-ten-item {
    gap: 12px;
    padding: 16px;
  }
  .top-ten-item .rank {
    font-size: 1.2rem;
    min-width: 36px;
  }
}

/* ---- SECTION DIVIDER ---- */

.section-divider {
  text-align: center;
  margin: 64px 0 48px;
}

.section-divider h2 {
  margin-bottom: 8px;
}

.section-divider p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---- ANIMATIONS ---- */

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

.animate-in {
  animation: fadeInUp 0.6s ease-out both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ---- GOOGLE FONTS IMPORT ---- */
/* Loaded in HTML head for performance */
