:root {
  --bg: #07111f;
  --bg-soft: #0c1828;
  --panel: rgba(16, 30, 49, 0.92);
  --panel-light: rgba(24, 42, 66, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7fbff;
  --muted: #9db0c7;
  --accent: #ef3e42;
  --accent-strong: #d52832;
  --cyan: #48d6d2;
  --green: #5dd39e;
  --yellow: #ffd166;
  --purple: #9b8cff;
  --blue: #6aa6ff;
  --orange: #ff9f5a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(72, 214, 210, 0.12), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(239, 62, 66, 0.13), transparent 25%),
    linear-gradient(135deg, #06101d, #07111f 55%, #09182a);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar {
  min-height: 76px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(4, 12, 22, 0.82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff5a5f, var(--accent-strong));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -1px;
  box-shadow: 0 12px 32px rgba(239, 62, 66, 0.32);
}
h1, h2, p { margin: 0; }
.brand h1 { font-size: 19px; letter-spacing: -0.5px; }
.brand p { color: var(--muted); font-size: 12px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

.button {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.12); }
.button:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.button.primary { background: linear-gradient(135deg, #f84d52, var(--accent-strong)); box-shadow: 0 10px 28px rgba(239, 62, 66, 0.22); }
.button.secondary { background: rgba(72, 214, 210, 0.1); color: #bff9f5; border-color: rgba(72, 214, 210, 0.28); }
.button.ghost { color: #dbe7f4; border-color: rgba(255,255,255,0.12); }
.button.danger-outline { color: #ffb1b4; border-color: rgba(239,62,66,0.35); background: rgba(239,62,66,0.07); }
.button.large { min-width: 150px; padding: 13px 18px; }

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  padding: 18px;
  max-width: 1680px;
  margin: auto;
}
.board-column { min-width: 0; }
.status-strip {
  display: grid;
  grid-template-columns: 1.4fr 0.45fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.status-strip > div,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 17px;
}
.status-strip > div { padding: 13px 16px; }
.status-strip strong { display: block; margin-top: 5px; font-size: 15px; }
.eyebrow { color: var(--cyan); font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; font-weight: 800; }

.board-wrap {
  overflow: auto;
  padding-bottom: 4px;
}
.board {
  min-width: 790px;
  height: min(760px, calc(100vh - 160px));
  min-height: 690px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 6px;
  position: relative;
}
.board-cell {
  position: relative;
  overflow: visible;
  padding: 9px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  box-shadow: 0 8px 20px rgba(0,0,0,0.16);
}
.board-cell::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(255,255,255,.4), transparent 52%);
  pointer-events: none;
}
.board-cell.active-cell { outline: 3px solid rgba(255,255,255,0.92); outline-offset: 2px; transform: scale(1.02); z-index: 3; }
.cell-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.cell-number { color: rgba(255,255,255,0.68); font-size: 10px; font-weight: 700; }
.cell-icon { font-size: 20px; }
.cell-title { font-weight: 800; font-size: 11px; line-height: 1.15; max-width: 95%; }
.cell-category { color: rgba(255,255,255,0.7); font-size: 9px; text-transform: uppercase; letter-spacing: 0.7px; margin-top: 4px; }
.tokens { display: flex; flex-wrap: wrap; gap: 3px; min-height: 22px; position: relative; z-index: 2; }
.token {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.86);
  font-size: 11px;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
}

.category-start { background-color: #274966; }
.category-waap { background-color: #b33743; }
.category-api { background-color: #226e7b; }
.category-bot { background-color: #6353ad; }
.category-ddos { background-color: #2564a8; }
.category-delivery { background-color: #25725d; }
.category-mcn { background-color: #397d9a; }
.category-ai { background-color: #7d4a96; }
.category-card { background-color: #a27023; }
.category-objection { background-color: #a94f25; }
.category-executive { background-color: #935255; }

.board-center {
  grid-column: 2 / 7;
  grid-row: 2 / 7;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  background:
    radial-gradient(circle at center, rgba(72,214,210,0.09), transparent 55%),
    linear-gradient(135deg, rgba(16,31,51,.96), rgba(7,17,31,.98));
  box-shadow: inset 0 0 80px rgba(0,0,0,0.15), var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 30px;
}
.board-center h2 { font-size: clamp(34px, 4vw, 58px); line-height: 0.98; letter-spacing: -3px; margin-top: 10px; }
.board-center h2 span { color: var(--cyan); }
.board-center > p:not(.eyebrow) { max-width: 570px; margin-top: 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dice-area { display: flex; align-items: center; gap: 16px; margin-top: 26px; }
.dice {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 42px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.dice.rolling { animation: wobble .55s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-5deg) scale(1); } 50% { transform: rotate(8deg) scale(1.08); } }
.helper { color: var(--muted); font-size: 11px; margin-top: 7px; }
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }

.sidebar { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { padding: 15px; }
.panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 13px; }
.panel-heading h2 { font-size: 17px; margin-top: 5px; }
.pill { padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(72,214,210,0.11); color: #bff9f5; border: 1px solid rgba(72,214,210,.21); }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: grid;
  grid-template-columns: 26px 35px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.07);
}
.rank-row.current { border-color: rgba(72,214,210,.58); background: rgba(72,214,210,.075); }
.rank-number { color: var(--muted); font-weight: 800; text-align: center; }
.rank-token { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255,255,255,0.85); }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.rank-score { font-size: 14px; color: var(--yellow); font-weight: 800; }
.panel-description { color: var(--muted); line-height: 1.45; font-size: 12px; margin-bottom: 12px; }
.moderator-controls select,
.team-name-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.13);
  padding: 10px;
  color: var(--text);
  background: rgba(4,12,22,.7);
}
.points-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 9px; }
.button.points { padding-inline: 6px; background: rgba(93,211,158,.1); color: #a9f1d2; border-color: rgba(93,211,158,.25); }
.button.points.negative { background: rgba(239,62,66,.08); color: #ffb2b4; border-color: rgba(239,62,66,.24); }
.activity-panel { flex: 1; min-height: 210px; }
.activity-log { max-height: 235px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 3px; }
.log-row { padding-left: 9px; border-left: 2px solid rgba(72,214,210,.45); color: #c9d6e3; font-size: 11px; line-height: 1.4; }
.log-row time { display:block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1,7,13,.78);
  backdrop-filter: blur(10px);
}
.modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(145deg, #14263d, #0b1829);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  padding: 22px;
}
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-heading h2 { margin-top: 6px; font-size: 24px; letter-spacing: -.7px; }
.modal-copy { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 10px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.centered { justify-content: center; }
.split-actions { justify-content: space-between; }
.icon-button { border: 0; background: rgba(255,255,255,.07); color: var(--text); border-radius: 10px; width: 34px; height: 34px; font-size: 22px; }
.team-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.team-input-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 34px; gap: 8px; align-items: center; }
.team-input-token { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.remove-team { width: 34px; height: 34px; border: 0; border-radius: 9px; color: #ffb4b8; background: rgba(239,62,66,.1); font-weight: 800; }
.timer { min-width: 56px; height: 56px; display: grid; place-items:center; border-radius: 16px; font-size: 23px; font-weight: 800; color: var(--yellow); background: rgba(255,209,102,.1); border: 1px solid rgba(255,209,102,.24); }
.timer.urgent { color: #ff999d; background: rgba(239,62,66,.12); border-color: rgba(239,62,66,.28); }
.scenario { margin-top: 16px; padding: 13px; border-radius: 12px; color: #c8d7e7; background: rgba(255,255,255,.045); border-left: 3px solid var(--cyan); font-size: 13px; line-height: 1.5; }
.question-text { margin-top: 16px; font-size: 17px; line-height: 1.4; font-weight: 700; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.answer-button { text-align: left; min-height: 62px; padding: 12px; border-radius: 11px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.055); color: var(--text); transition: .18s ease; }
.answer-button:hover { background: rgba(72,214,210,.08); border-color: rgba(72,214,210,.4); }
.answer-button.correct { background: rgba(93,211,158,.13); border-color: rgba(93,211,158,.6); }
.answer-button.wrong { background: rgba(239,62,66,.12); border-color: rgba(239,62,66,.55); }
.answer-letter { display: inline-grid; place-items:center; width: 23px; height:23px; margin-right: 6px; border-radius: 7px; color: var(--cyan); background: rgba(72,214,210,.1); font-size: 11px; font-weight: 800; }
.feedback { margin-top: 13px; padding: 12px; border-radius: 11px; color: #d8e5f2; background: rgba(255,255,255,.045); font-size: 13px; line-height: 1.5; }
.card-modal-card { text-align: center; max-width: 560px; }
.card-icon { font-size: 48px; }
.card-modal-card h2 { font-size: 28px; margin-top: 7px; }
.card-copy { margin-top: 12px; color: #d9e4ef; line-height: 1.55; }
.card-effect { margin: 16px auto 0; max-width: 450px; padding: 12px; border-radius: 12px; background: rgba(255,209,102,.09); border: 1px solid rgba(255,209,102,.22); color: #ffe9ad; font-weight: 700; font-size: 13px; }
.rules-list { color: #d3deea; font-size: 13px; line-height: 1.6; padding-left: 20px; }
.legend { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 16px; }
.legend-item { padding: 8px; border-radius: 10px; background: rgba(255,255,255,.045); font-size: 12px; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
  .activity-panel { grid-column: 1 / -1; }
  .board { height: 720px; }
}
@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; }
  .topbar-actions .button { flex: 1; padding-inline: 8px; }
  .app-shell { padding: 11px; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .status-strip > div:last-child { grid-column: 1 / -1; }
  .sidebar { display:flex; }
  .answers { grid-template-columns: 1fr; }
}


/* Elevator pitch: evaluación abierta por el moderador */
.pitch-panel {
  grid-column: 1 / -1;
  padding: 15px;
  border-radius: 13px;
  border: 1px solid rgba(255,209,102,.25);
  background: rgba(255,209,102,.065);
}
.pitch-label { color: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.pitch-copy { margin-top: 8px; color: #e2eaf3; font-size: 14px; line-height: 1.5; }
.pitch-criteria { margin: 12px 0 0 18px; color: #d0dce8; font-size: 13px; line-height: 1.55; }
.pitch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }


/* V3: coaching comercial y pitch relámpago */
.button.pitch-trigger {
  background: rgba(255, 209, 102, .12);
  color: #ffe7a1;
  border-color: rgba(255, 209, 102, .34);
}
.button.pitch-trigger:hover {
  background: rgba(255, 209, 102, .19);
}
.pitch-section {
  margin-top: 13px;
  padding: 11px;
  border-radius: 11px;
  background: rgba(255,255,255,.038);
  border: 1px solid rgba(255,255,255,.08);
}
.pitch-section-title {
  color: #ffe7a1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .45px;
  text-transform: uppercase;
}
.pitch-fields,
.pitch-criteria {
  margin: 9px 0 0 18px;
  color: #d0dce8;
  font-size: 13px;
  line-height: 1.55;
}
.coach-panel {
  margin-top: 13px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid rgba(72,214,210,.22);
  background: rgba(72,214,210,.055);
}
.coach-title {
  color: #bff9f5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .55px;
  text-transform: uppercase;
}
.coach-differential {
  margin-top: 8px;
  color: #d9e8f4;
  font-size: 12px;
  line-height: 1.55;
}
.coach-subtitle {
  margin-top: 10px;
  color: #ffe7a1;
  font-size: 12px;
  font-weight: 800;
}
.coach-list {
  margin: 7px 0 0 18px;
  color: #d0dce8;
  font-size: 12px;
  line-height: 1.55;
}
