:root {
  --red: #e50914;
  --red-dark: #b20710;
  --bg: #141414;
  --card: #2f2f2f;
  --text: #ffffff;
  --muted: #b3b3b3;
}

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

html, body { height: 100%; }

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 4%;
  gap: 32px;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,.8), transparent);
}

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

.nav-links { display: flex; gap: 20px; flex: 1; }
.nav-links a {
  color: #e5e5e5;
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.nav-links a:hover { color: var(--muted); }
.nav-links a.active { font-weight: 700; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1ea1f7, #0062a8);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 62vh;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 0 4%;
  background:
    linear-gradient(to right, rgba(20,20,20,.95) 20%, rgba(20,20,20,.2) 70%),
    linear-gradient(to top, var(--bg) 0%, transparent 35%),
    radial-gradient(circle at 75% 40%, #7a0a12 0%, #3a0509 35%, #141414 75%);
}

.hero-content { max-width: 560px; margin-top: 68px; }
.hero-kicker { color: var(--muted); font-size: 13px; letter-spacing: 2px; margin-bottom: 12px; }
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 18px;
  text-shadow: 2px 2px 8px rgba(0,0,0,.6);
}
.hero-desc { font-size: 18px; color: #ddd; line-height: 1.4; }

/* ---------- Rows / cards ---------- */
.row { padding: 8px 4% 60px; }
.row-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  transition: transform .25s ease, box-shadow .25s ease;
  border: none;
  color: var(--text);
  text-align: left;
  font-family: inherit;
}

.card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 45%, #1a1a1a 100%);
  opacity: .9;
  z-index: 0;
}
.card:nth-child(2)::before { background: linear-gradient(135deg, #b81d24 0%, #5c0f14 50%, #1a1a1a 100%); }
.card:nth-child(3)::before { background: linear-gradient(135deg, #831010 0%, #3a0509 50%, #1a1a1a 100%); }

.card > * { position: relative; z-index: 1; }

.card:hover, .card:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.7);
  z-index: 2;
  outline: none;
}

.card-big { font-size: 48px; font-weight: 900; line-height: 1; }
.card-label { font-size: 15px; font-weight: 700; margin-top: 6px; }
.card-tag { font-size: 12px; color: #ddd; margin-top: 2px; }
.card-play {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* ---------- Timer screen ---------- */
#timer-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 90px 4% 40px;
  background: radial-gradient(circle at 50% 40%, #2a0508 0%, var(--bg) 60%);
  position: relative;
}

.back {
  position: absolute;
  top: 84px; left: 4%;
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 15px;
  cursor: pointer;
}
.back:hover { color: var(--text); }

.timer-label { color: var(--muted); letter-spacing: 3px; font-size: 14px; text-transform: uppercase; }

.timer-display {
  font-size: clamp(90px, 22vw, 220px);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  margin: 16px 0 28px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px rgba(229,9,20,.35);
}

.timer-display.finished { color: var(--red); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

.progress {
  width: min(600px, 90vw);
  height: 4px;
  background: #4d4d4d;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 36px;
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: var(--red);
  transition: width .25s linear;
}

.controls { display: flex; gap: 12px; }

.btn {
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
}
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { background: rgba(255,255,255,.75); }
.btn-secondary { background: rgba(109,109,110,.7); color: var(--text); }
.btn-secondary:hover { background: rgba(109,109,110,.4); }

.done-msg { margin-top: 24px; color: var(--red); font-size: 20px; font-weight: 700; }

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero { height: 50vh; }
  .card-big { font-size: 36px; }
}
