/* Portada (public/index.html) */

body.home {
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(47, 168, 101, 0.16) 0%, transparent 60%),
    radial-gradient(900px 600px at 10% -10%, #1b2a3c 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
}

.home .container { max-width: 1160px; padding-top: 28px; }

/* ---- indicador en vivo */
.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6b7686;
}
.live-pill.online .live-dot { background: var(--ok); }
.live-pill.has-rooms { color: var(--text); border-color: rgba(63, 185, 80, 0.45); }
.live-pill.has-rooms .live-dot { animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.7); }
  100% { box-shadow: 0 0 0 9px rgba(63, 185, 80, 0); }
}

/* ---- portada */
.home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: center;
  padding: 24px 0 36px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(242, 179, 61, 0.1);
  border: 1px solid rgba(242, 179, 61, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.home .hero h1 {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.home .hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent-2), #4fd18b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home .hero .lead {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 26px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn.big {
  padding: 13px 22px;
  font-size: 17px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(242, 179, 61, 0.25);
}
.btn.big span { display: inline-block; transition: transform 0.15s; }
.btn.big:hover span { transform: translateX(4px); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.join-form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
}
.join-form:focus-within { border-color: var(--accent); }
.join-form input {
  border: 0;
  border-radius: 0;
  background: transparent;
  width: 112px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.join-form input::placeholder { letter-spacing: 0.04em; font-family: inherit; font-weight: 500; }
.join-form .btn { border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.join-form input.shake { animation: shake 0.35s; }
@keyframes shake {
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.hero-feats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 0;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.hero-feats b { color: var(--text); display: block; font-size: 18px; }

/* ---- mesa ilustrada */
.hero-art { position: relative; }
.lamp-glow {
  position: absolute;
  inset: -10% 5% 20%;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 220, 150, 0.22), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
}
.table-svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.55));
  transform: perspective(1400px) rotateX(9deg);
  transform-origin: 50% 100%;
}
.ball-num {
  font: 800 8px system-ui, sans-serif;
  text-anchor: middle;
  fill: #111;
}
.guide-line {
  stroke: #fff;
  stroke-opacity: 0.7;
  stroke-width: 1.4;
  stroke-dasharray: 5 5;
  animation: dash 1.2s linear infinite;
}
.guide-ghost { fill: none; stroke: #fff; stroke-opacity: 0.55; stroke-width: 1.2; stroke-dasharray: 3 3; }
.guide-out { stroke: #ffd36b; stroke-opacity: 0.6; stroke-width: 1.4; stroke-dasharray: 3 4; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.cue-move { animation: stroke-cue 2.4s ease-in-out infinite; }
@keyframes stroke-cue {
  0%, 100% { transform: translateX(-4px); }
  55% { transform: translateX(-30px); }
  70% { transform: translateX(0); }
}

/* ---- bloques */
.block { padding: 28px 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.block-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.block-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- bolas mini */
.mball {
  --c: #fff;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 33% 28%, rgba(255, 255, 255, 0.75) 0 6%, transparent 30%), var(--c);
  box-shadow: inset -4px -5px 9px rgba(0, 0, 0, 0.45), 0 4px 8px rgba(0, 0, 0, 0.4);
}
.mball.stripe {
  background:
    radial-gradient(circle at 33% 28%, rgba(255, 255, 255, 0.75) 0 6%, transparent 30%),
    linear-gradient(#f6f3e8 0 22%, var(--c) 22% 78%, #f6f3e8 78%);
}
.mball[data-n]::after {
  content: attr(data-n);
  position: absolute;
  inset: 27%;
  border-radius: 50%;
  background: #fbf8ef;
  color: #111;
  font: 800 10px/1 system-ui, sans-serif;
  display: grid;
  place-items: center;
}

/* ---- modalidades */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 14px;
}
.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(31, 122, 70, 0.22), transparent 55%), var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.mode-card.carom { background: linear-gradient(160deg, rgba(36, 86, 160, 0.25), transparent 55%), var(--panel); }
.mode-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35); }
.mode-balls { display: flex; margin-bottom: 4px; }
.mode-balls .mball + .mball { margin-left: -8px; }
.mode-card h3 { margin: 0; font-size: 18px; }
.mode-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }
.mode-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.mode-links-label { font-size: 12px; color: var(--muted); }
.chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--accent); background: rgba(242, 179, 61, 0.12); }

/* ---- mesas abiertas */
.open-rooms { display: grid; gap: 10px; }
.room-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.room-row:hover { border-color: var(--accent); background: var(--panel-2); }
.room-row .mball { width: 28px; height: 28px; }
.room-row .mball[data-n]::after { font-size: 9px; }
.room-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.room-info b, .room-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-info small { color: var(--muted); }
.room-row code {
  font: 700 14px ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.15em;
  color: var(--accent-2);
}
.rooms-empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.rooms-empty a { color: var(--accent-2); font-weight: 600; }

/* ---- pasos */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.steps li {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.step-n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1205;
  font-weight: 800;
  margin-bottom: 10px;
}
.steps h3 { margin: 0 0 4px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ---- próximamente */
.soon {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
  color: var(--muted);
}
.soon-icon { font-size: 30px; filter: grayscale(0.3); }
.soon h3 { margin: 0 0 2px; color: var(--text); font-size: 16px; }
.soon p { margin: 0; font-size: 14px; }

/* ---- responsive */
@media (max-width: 900px) {
  .home .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .hero-art { order: -1; max-width: 560px; margin: 0 auto; width: 100%; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .live-pill span { display: none; }
  .room-row code { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn.big { text-align: center; }
  .join-form input { flex: 1; width: auto; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cue-move, .guide-line, .live-pill.has-rooms .live-dot { animation: none; }
}
