:root {
  --bg: #0b0d12;
  --bg-2: #11141d;
  --surface: #181c28;
  --surface-2: #202638;
  --border: #2a3142;
  --text: #e8ebf3;
  --text-dim: #9aa3b5;
  --accent: #e50914;
  --accent-2: #ff5c66;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge { font-size: 26px; }
.brand-name { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.brand-name span { color: var(--accent); }

.main-nav { display: flex; gap: 4px; margin-left: 12px; }
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }

.search-box { margin-left: auto; }
#searchInput {
  width: 240px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, width 0.2s;
}
#searchInput:focus { border-color: var(--accent); width: 280px; }

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(229, 9, 20, 0.25), transparent 60%),
    linear-gradient(180deg, #0b0d12, var(--bg-2));
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 13, 18, 0.65), rgba(11, 13, 18, 0.9)),
    radial-gradient(circle at 20% 40%, rgba(255, 92, 102, 0.08), transparent 50%);
}
.hero-content { position: relative; z-index: 2; max-width: 720px; padding-top: 40px; padding-bottom: 40px; }
.hero-title { font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.08; letter-spacing: -1px; }
.hero-title span { color: var(--accent); }
.hero-sub { margin-top: 20px; font-size: 18px; color: var(--text-dim); max-width: 560px; }
.hero-actions { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* Sections */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }
.section-title em { color: var(--accent); font-style: normal; }

.genre-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.genre-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.genre-chip:hover { color: var(--text); border-color: var(--text-dim); }
.genre-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Movie grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.movie-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.movie-poster { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: linear-gradient(135deg, var(--surface-2), var(--bg-2)); }
.movie-info { padding: 12px; }
.movie-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-year { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.movie-genre { color: var(--accent-2); font-size: 12px; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.no-results { text-align: center; color: var(--text-dim); padding: 60px 0; font-size: 17px; }

/* About */
.about { background: var(--bg-2); }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 28px; }
.about-card { background: var(--surface); padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.about-icon { font-size: 32px; }
.about-card h3 { margin-top: 12px; font-size: 18px; }
.about-card p { margin-top: 8px; color: var(--text-dim); font-size: 14px; }

/* Modal / player */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(4px); }
.modal-content {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  z-index: 3;
}
.modal-close:hover { background: var(--accent); }
.player-title { font-size: 22px; font-weight: 800; padding-right: 40px; }
.player-meta { color: var(--text-dim); font-size: 14px; margin-bottom: 12px; }
.video-wrap {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}
.video-wrap video { width: 100%; height: 100%; display: block; }
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
#iframeWrap { width: 100%; height: 100%; }
#iframeWrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-desc { margin-top: 16px; color: var(--text-dim); font-size: 14px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; background: var(--bg-2); }
.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.footer-note { color: var(--text-dim); font-size: 13px; max-width: 720px; }

/* Responsive */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search-box { margin-left: 0; width: 100%; }
  #searchInput { width: 100%; }
  #searchInput:focus { width: 100%; }
  .main-nav { margin-left: 0; }
  .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
}
