:root {
  --bg: #141414;
  --bg-raised: #1f1f1f;
  --text: #f5f5f5;
  --text-dim: #b3b3b3;
  --accent: #e50914;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Malgun Gothic", sans-serif;
  overflow-x: hidden;
}

/* NAV */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
  transition: background 0.3s ease;
}

.nav-left { display: flex; align-items: center; gap: 36px; }

.logo {
  color: var(--accent);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 1px;
}

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}
.nav-links a.active, .nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 20px; }
.icon { font-size: 18px; cursor: pointer; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

/* HERO */
.hero {
  position: relative;
  height: 88vh;
  min-height: 480px;
  background: radial-gradient(ellipse at top right, #4a0f14 0%, #1a1a1a 55%, #141414 100%);
  display: flex;
  align-items: flex-end;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 2%, transparent 45%),
              linear-gradient(to right, rgba(20,20,20,0.7) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  padding: 0 48px 80px;
  max-width: 620px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  margin-bottom: 18px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.hero-desc {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 24px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.hero-buttons { display: flex; gap: 14px; }

.btn {
  border: none;
  border-radius: 4px;
  padding: 12px 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-play { background: var(--text); color: #000; }
.btn-play:hover { background: rgba(255,255,255,0.8); }

.btn-info { background: rgba(109,109,110,0.7); color: var(--text); }
.btn-info:hover { background: rgba(109,109,110,0.5); }

/* ROWS */
.rows {
  position: relative;
  margin-top: -60px;
  padding: 20px 0 60px;
  z-index: 2;
}

.row {
  margin-bottom: 36px;
}

.row-title {
  font-size: 20px;
  font-weight: 700;
  padding: 0 48px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-badge {
  font-size: 12px;
  font-weight: 700;
  color: #46d369;
  background: rgba(70,211,105,0.12);
  border: 1px solid rgba(70,211,105,0.4);
  border-radius: 4px;
  padding: 3px 8px;
}

.play-badge {
  display: inline-block;
  margin-right: 6px;
}

.row-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 60px 48px 60px;
  scroll-behavior: smooth;
}

.row-track::-webkit-scrollbar { height: 0; }

.card {
  flex: 0 0 auto;
  width: 220px;
  height: 124px;
  position: relative;
  cursor: pointer;
}

.card-thumb {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
  background-size: cover;
  background-position: center;
}

/* Netflix-style hover preview: pops out larger & centered over the tile,
   plays a muted autoplay loop, and auto-collapses after a few seconds. */
.card-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  pointer-events: none;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: 0 20px 44px rgba(0,0,0,0.75);
  transition: transform 0.25s ease, opacity 0.2s ease;
  z-index: 5;
}

.card.hovered { z-index: 30; }
.card.hovered .card-preview {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.card-preview-media {
  width: 100%;
  height: 169px;
  background: #000;
}

.card-preview-info { padding: 10px 14px 12px; }

.card-preview-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-preview-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.pv-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.5);
  background: rgba(42,42,42,0.6);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-btn:hover { border-color: #fff; background: rgba(255,255,255,0.15); }
.pv-play { background: #fff; color: #000; border-color: #fff; }

.card-preview-meta { font-size: 11px; color: var(--text-dim); }

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal.open { display: flex; }

.modal-card {
  width: 640px;
  max-width: 92vw;
  background: var(--bg-raised);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(20,20,20,0.7);
  border: none;
  color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

.modal-banner {
  height: 260px;
  background-size: cover;
  background-position: center;
}

.modal-body { padding: 24px; }
.modal-body h2 { font-size: 26px; margin-bottom: 10px; }
.modal-meta { color: #46d369; font-weight: 700; margin-bottom: 12px; font-size: 14px; }
.modal-desc { color: var(--text-dim); line-height: 1.6; }

.footer {
  text-align: center;
  padding: 40px 20px 60px;
  color: var(--text-dim);
  font-size: 13px;
}

@media (max-width: 720px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hero-content { padding: 0 20px 60px; }
  .hero-title { font-size: 34px; }
  .row-title, .row-track { padding-left: 20px; padding-right: 20px; }
  .card { width: 150px; height: 90px; }
  .card-thumb { font-size: 12px; }
  .card-preview { width: 220px; }
  .card-preview-media { height: 124px; }
}
