:root {
  --bg: #0a1420;
  --bg-alt: #0f1e2e;
  --surface: #132635;
  --border: #1f3a4d;
  --text: #eaf2f6;
  --text-dim: #93a9b6;
  --accent: #3fd1c7;
  --accent-dim: #2a8f88;
  --danger: #e8626b;
  --radius: 10px;
  --max-width: 1240px;
}

* { box-sizing: border-box; }

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

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

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--accent);
  white-space: nowrap;
}

.logo span { color: var(--text); }

.main-nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-item { position: relative; }

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  font-weight: 600;
  color: var(--text);
}

.nav-item > a:hover,
.nav-item > a.active { color: var(--accent); }

.dropdown {
  position: absolute;
  top: 100%;
  left: -12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  width: 320px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.nav-item:hover .dropdown { display: flex; }

.dropdown a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.dropdown a:hover { color: var(--text); border-color: var(--accent); }

.header-search {
  flex: 0 0 auto;
}

.header-search input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  color: var(--text);
  font-size: 13px;
  width: 180px;
}

.header-search input::placeholder { color: var(--text-dim); }

.btn-login {
  background: var(--accent);
  color: #04211f;
  font-weight: 700;
  border-radius: 20px;
  padding: 8px 18px;
  white-space: nowrap;
}

.btn-login:hover { background: #58e0d6; }

/* Hero intro */
.intro {
  padding: 36px 0 8px;
}

.intro h1 {
  font-size: 28px;
  margin: 0 0 12px;
}

.intro p {
  color: var(--text-dim);
  max-width: 820px;
  font-size: 15px;
}

/* Sections */
.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 22px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-head .see-all {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.chip:hover { color: var(--text); }

.chip.active {
  background: var(--accent);
  color: #04211f;
  border-color: var(--accent);
  font-weight: 700;
}

/* Grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(0,0,0,0.45);
}

.card-genre {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.35);
  padding: 3px 8px;
  border-radius: 10px;
}

.card-info {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
}

.card-title {
  font-size: 17px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.card-meta {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}

.empty-state { color: var(--text-dim); padding: 24px 0; }

/* Title detail hero */
.title-hero {
  border-radius: var(--radius);
  padding: 48px 32px;
  margin: 24px 0 32px;
  border: 1px solid var(--border);
}

.title-hero .kicker {
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.title-hero h1 {
  font-size: 40px;
  margin: 0 0 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.title-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.title-meta span {
  background: rgba(0,0,0,0.35);
  padding: 4px 10px;
  border-radius: 12px;
}

.title-synopsis {
  max-width: 640px;
  color: rgba(255,255,255,0.92);
  margin-bottom: 24px;
}

.title-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary,
.btn-secondary {
  border-radius: 22px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: #04211f; }
.btn-primary:hover { background: #58e0d6; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-secondary:hover { background: rgba(255,255,255,0.16); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,8,13,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 380px;
  width: 100%;
  position: relative;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
}

.modal-close:hover { color: var(--text); }

.modal-box h3 { margin: 6px 0 10px; font-size: 20px; }
.modal-box p { color: var(--text-dim); margin-bottom: 22px; font-size: 14px; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Forms */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  font-size: 24px;
  margin: 0 0 6px;
}

.auth-card .sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 24px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
}

.field input:focus { outline: 2px solid var(--accent-dim); }

.field input:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

.form-note a { color: var(--accent); font-weight: 600; }

.form-feedback {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(63,209,199,0.12);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 13px;
}

.form-feedback.show { display: block; }

.form-feedback.error {
  background: rgba(232,98,107,0.12);
  border-color: var(--danger);
  color: var(--danger);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 32px 0;
  color: var(--text-dim);
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .brand-line { color: var(--text); font-weight: 700; margin-bottom: 6px; }

@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .main-nav { display: none; }
  .header-search input { width: 120px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .title-hero h1 { font-size: 28px; }
}
