/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --fg: #f5f5f4;
  --fg-muted: #a8a29e;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.12);
  --border: rgba(245, 158, 11, 0.15);
  --section-bg: #0e0e10;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Typography ─── */
h1, h2, h3 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 48px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--fg); background: var(--accent-dim); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border);
  margin-left: 8px;
}

.nav-cta:hover { background: var(--accent-dim); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #09090b;
}

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--fg); border-color: var(--accent); }

/* ─── Form elements ─── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--fg-muted); opacity: 0.6; }

.form-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
}

.form-success {
  color: var(--accent);
  font-size: 13px;
  margin-top: 6px;
}

/* ─── Auth pages ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 40px;
}

.auth-title {
  font-size: 36px;
  color: var(--fg);
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--fg-muted);
  font-size: 15px;
  margin-bottom: 36px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--fg-muted);
}

.auth-footer a { color: var(--accent); text-decoration: none; }

/* ─── App layout ─── */
.app-body {
  padding-top: 80px;
  min-height: 100vh;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ─── Section header ─── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--fg);
}

/* ─── New Finds strip ─── */
.new-finds-section {
  background: var(--section-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
  margin-bottom: 64px;
}

.new-finds-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 48px 16px;
  scrollbar-width: none;
}

.new-finds-scroll::-webkit-scrollbar { display: none; }

.new-find-card {
  flex-shrink: 0;
  width: 200px;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: transform 0.2s;
}

.new-find-card:hover { transform: translateY(-4px); }

.new-find-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.new-find-label {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 600;
}

.new-find-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  margin-bottom: 4px;
}

.new-find-meta {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ─── Genre filters ─── */
.genre-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.genre-btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--fg-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.genre-btn:hover, .genre-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ─── Film grid ─── */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.film-card {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.film-poster-wrap {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  background: var(--section-bg);
  transition: border-color 0.2s;
}

.film-card:hover .film-poster-wrap { border-color: var(--accent); }

.film-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: #09090b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.film-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9,9,11,0.5);
  opacity: 0;
  transition: opacity 0.2s;
}

.film-card:hover .film-play-overlay { opacity: 1; }

.film-play-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #09090b;
}

.film-info-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
  line-height: 1.3;
}

.film-info-meta {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ─── Watch page ─── */
.watch-page {
  padding-top: 80px;
  min-height: 100vh;
}

.watch-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.film-detail-title {
  font-size: clamp(32px, 5vw, 56px);
  color: var(--fg);
  margin-bottom: 16px;
}

.film-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-tag {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
}

.film-detail-desc {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 640px;
}

/* ─── Dashboard ─── */
.dashboard-header {
  padding: 48px 48px 32px;
  border-bottom: 1px solid var(--border);
}

.dashboard-title {
  font-size: clamp(36px, 5vw, 56px);
  color: var(--fg);
  margin-bottom: 8px;
}

.dashboard-sub {
  color: var(--fg-muted);
  font-size: 15px;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px;
  text-align: center;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(168,162,158,0.5);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav { padding: 0 24px; }
  .app-container, .watch-container { padding: 0 24px; }
  .film-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
  .auth-card { padding: 32px 24px; }
  .dashboard-header { padding: 32px 24px 24px; }
  .new-finds-scroll { padding: 4px 24px 16px; }
}