:root {
  --accent: #16d6ec;
  --accent2: #7fe9f5;
  --gold: #ffce54;
  --red: #e5142b;
  --bg: #070a10;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: #eef4f6;
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}
.page { max-width: 1200px; margin: 0 auto; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 2px solid rgba(22, 214, 236, 0.35);
}
.hero-img {
  position: absolute; inset: 0;
  background: url('/assets/subathon.png') center / cover no-repeat;
  filter: saturate(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 30%, rgba(22, 214, 236, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(7, 10, 16, 0.55), rgba(7, 10, 16, 0.9));
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 60px 24px; }
.eyebrow { font-size: 14px; letter-spacing: 6px; color: var(--accent); font-weight: 700; }
.hero h1 {
  font-size: 72px; font-weight: 900; letter-spacing: 14px; margin: 8px 0 4px;
  text-shadow: 0 0 30px rgba(22, 214, 236, 0.4);
}
.clock {
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: 4px;
  font-variant-numeric: tabular-nums; margin: 14px 0 6px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.clock.paused { opacity: 0.6; }
.clock.low { color: #ff5a5a; }
.stat { font-size: 18px; letter-spacing: 2px; color: #b9c7cd; }
.stat #subCount { color: var(--accent2); font-weight: 700; }
.happy {
  display: inline-block; margin-bottom: 10px;
  font-size: 20px; font-weight: 800; letter-spacing: 4px;
  color: #1a1206; padding: 6px 16px; border-radius: 8px;
  background: linear-gradient(90deg, #ffce54, #ff9d2f);
  box-shadow: 0 0 26px rgba(255, 206, 84, 0.6);
  animation: happyPulse 1.3s ease-in-out infinite;
}
.happy.hidden { display: none; }
@keyframes happyPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.ended { display: none; margin-top: 8px; font-size: 30px; font-weight: 800; letter-spacing: 6px; color: #ff5a5a; }
.clock.is-ended ~ .ended { display: block; }
.cta {
  display: inline-block; margin-top: 26px; text-decoration: none;
  background: var(--red); color: #fff; font-weight: 800; font-size: 16px;
  padding: 14px 28px; border-radius: 10px; letter-spacing: 1px;
  transition: filter .15s, transform .15s;
}
.cta:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ---------- DÉFIS ---------- */
.challenges-section { padding: 48px 24px 20px; }
.challenges-section h2 { font-size: 30px; letter-spacing: 4px; text-align: center; color: var(--gold); }
.challenges-section .sub { text-align: center; color: #8598a2; margin: 8px 0 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.card {
  position: relative;
  display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 18px;
  padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid rgba(255,255,255,0.09);
  border-left: 4px solid rgba(255,255,255,0.16);
}
.card .badge {
  width: 70px; height: 70px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 800;
  background: rgba(22,214,236,0.1); border: 1px solid rgba(22,214,236,0.35); color: var(--accent);
}
.card .txt { font-size: 20px; font-weight: 700; color: #eef4f6; line-height: 1.15; }
.card .bar { height: 8px; margin-top: 10px; background: rgba(255,255,255,0.08); border-radius: 5px; overflow: hidden; }
.card .fill { height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .6s cubic-bezier(.16,1,.3,1); }
.card .status { font-family: 'JetBrains Mono', monospace; font-size: 18px; font-weight: 700; color: #7f97a1; white-space: nowrap; }

.card.current { border-color: rgba(22,214,236,0.5); border-left-color: var(--accent); box-shadow: 0 0 30px rgba(22,214,236,0.14); }
.card.current .status { color: var(--accent2); }
.card.done { opacity: 0.62; border-left-color: #3ba55d; }
.card.done .badge { background: rgba(59,165,93,0.15); border-color: rgba(59,165,93,0.45); color: #5fd08a; }
.card.done .txt { color: #7c8b91; text-decoration: line-through; text-decoration-thickness: 2px; }
.card.done .status { color: #5fd08a; }
.card.done .fill { background: linear-gradient(90deg, #3ba55d, #5fd08a); }
.card.locked { opacity: 0.5; }

.foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 24px 40px; color: #6f8791; font-size: 14px; letter-spacing: 1px;
}
.foot a { color: var(--accent2); text-decoration: none; }

@media (max-width: 600px) {
  .hero h1 { font-size: 46px; letter-spacing: 8px; }
  .clock { font-size: 60px; }
}
