:root{
  --bg:#0b0f16; --card:#111826; --soft:#151e2b; --text:#e8eef6; --muted:#9fb0c7;
  --accent:#1B4B82; --gold:#C9A53B; --ok:#2bd48f; --danger:#ef4444;
}

/* Base */
*{box-sizing:border-box}
html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
}

/* ===== HEADER COMPACTO & HORIZONTAL ===== */
.header{
  padding:10px 16px;
  border-bottom:1px solid #1a2431;
  background:linear-gradient(180deg, rgba(27,75,130,0.25), transparent);
}
.header-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

/* BRAND: logo + título */
.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.header .logo{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius:10px;        /* integra mejor el logo */
}
.header h1{
  margin:0;
  font-size:22px;
  line-height:1.2;
  letter-spacing:.2px;
  font-weight:800;
  white-space:nowrap;
}
.header h1 span{
  color:var(--gold);
  text-shadow:0 0 8px rgba(201,165,59,.35);
}

/* MÉTRICAS: contador + progreso radial */
.metrics{
  display:flex;
  align-items:center;
  gap:18px;
}

/* Contador */
.countdown{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  max-width:520px;
}
.cd-box{
  background:var(--soft);
  border:1px solid #223047;
  border-radius:12px;
  padding:6px 10px;
  min-width:64px;
  text-align:center;
}
.cd-number{ font-size:18px; font-weight:800; line-height:1; }
.cd-label{ color:var(--muted); font-size:11px; }
.cd-deadline{
  flex-basis:100%;
  text-align:right;
  color:var(--muted);
  font-size:12px;
  margin-top:-2px;
}

/* Progreso radial (compacto) */
.progress-wrap{
  position:relative;
  width:120px; height:120px;
}
.progress-wrap.compact{ width:110px; height:110px; }
.radial{ width:100%; height:100%; transform:rotate(-90deg); }
.radial .bg{ fill:none; stroke:#213149; stroke-width:12; }
.radial .fg{
  fill:none; stroke:#2f7dd1; stroke-linecap:round; stroke-width:12;
  stroke-dasharray:339.292; stroke-dashoffset:339.292; transition:stroke-dashoffset .4s ease;
}
.radial-center{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.radial-center span{ font-size:22px; font-weight:800; }
.radial-center small{ color:var(--muted); }

/* ===== CONTROLS ===== */
.controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  padding:14px;
}
.controls input,
.controls select{
  background:var(--soft);
  color:var(--text);
  border:1px solid #223047;
  border-radius:10px;
  padding:10px 12px;
  font-size:14px;
}
.status{ align-self:center; font-size:12px; color:var(--muted); }

/* ===== GRID DE TARJETAS ===== */
.board{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
  max-width:1100px;
  margin:12px auto 40px;
  padding:0 16px;
}
.card{
  background:var(--card);
  border:1px solid #1a2431;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 14px 32px rgba(0,0,0,.25);
}
.card h2{
  margin:0;
  padding:14px 16px;
  background:linear-gradient(90deg, rgba(27,75,130,.25), rgba(201,165,59,.15));
  border-bottom:1px solid #1a2431;
  font-size:16px;
}
.list{ padding:10px 10px; }

/* Ítems */
.item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px;
  border-bottom:1px dashed #233145;
}
.item:last-child{ border-bottom:none; }
.item .left{ display:flex; gap:10px; align-items:center; }
.item .title{ font-weight:600; }
.item .desc{ color:var(--muted); font-size:13px; margin-top:2px; }

/* Toggle iOS-like */
.toggle{
  position:relative;
  width:48px; height:28px;
  background:#1f2a3b;
  border:1px solid #2a3a55;
  border-radius:999px;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease;
  flex:0 0 auto;
}
.toggle:before{
  content:"";
  position:absolute;
  top:3px; left:3px;
  width:22px; height:22px;
  background:#fff; border-radius:999px;
  box-shadow:0 2px 6px rgba(0,0,0,.3);
  transition:left .2s ease, background .2s ease;
}
.toggle.on{ background:#0d6efd; border-color:#0d6efd; }
.toggle.on:before{ left:23px; background:#e6f0ff; }

/* ===== FOOTER ===== */
.footer{
  padding:14px;
  text-align:center;
  color:var(--muted);
  border-top:1px solid #1a2431;
}

/* ===== RESPONSIVE ===== */
@media (max-width:900px){
  .header-inner{ flex-direction:column; align-items:center; gap:10px; }
  .metrics{ gap:12px; }
  .cd-deadline{ text-align:center; }
}
@media (max-width:600px){
  .header .logo{ width:48px; height:48px; }
  .header h1{ font-size:20px; white-space:normal; text-align:center; }
  .progress-wrap.compact{ width:96px; height:96px; }
}


/* ===== CELEBRACIÓN 100% (con fade) ===== */
.celebrate{
  display:none;
  align-items:center;
  gap:16px;
  justify-content:center;
  padding:14px;
  margin:10px auto 0;
  max-width:1200px;
  background:linear-gradient(90deg, rgba(27,75,130,.25), rgba(201,165,59,.20));
  border:1px solid #1a2431;
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  overflow:hidden;
  position:relative;

  opacity:0;
  transition:opacity .35s ease;  /* <- fade */
}
.celebrate.show{
  display:flex;
  opacity:1;
}
.celebrate video{
  width:100%;
  max-height:220px;
  object-fit:cover;
  border-radius:16px;
}
.celebrate-text{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:800; color:#fff;
  text-shadow:0 0 12px rgba(0,0,0,0.8);
  background:rgba(0,0,0,0.3);
  text-align:center;
  padding:8px 12px;
  pointer-events:none;
}

