/* ═══════════════════════════════════════════════════════════════
   App Juegos — hoja de estilos única
   Sin frameworks, sin fuentes externas: todo local y liviano.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:         #0d1017;
  --surface:    #151a23;
  --surface-2:  #1c222d;
  --surface-3:  #242c39;
  --border:     #262e3b;

  --text:       #e8ecf3;
  --muted:      #8b95a7;
  --dim:        #5d6675;

  --accent:     #ff5c35;
  --accent-dim: #c9411f;
  --online:     #22d3a7;
  --queue:      #f5b942;
  --danger:     #ef4444;

  --radius:     10px;
  --radius-sm:  6px;

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }

.muted { color: var(--muted); }
.dim   { color: var(--dim); }
.mono  { font-family: var(--mono); }

/* ─── Layout ──────────────────────────────────────────────── */
.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
}

.card--wide { max-width: 720px; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  flex-shrink: 0;
}

.brand__name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand__sub {
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:hover:not(:disabled) { background: #2c3644; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: #ff6f4d; }

.btn--block { width: 100%; }

.btn--steam {
  background: #1b2838;
  border-color: #2a3f5a;
  font-size: 1rem;
  padding: 0.95rem 1.4rem;
}
.btn--steam:hover:not(:disabled) { background: #223449; }

.btn__icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ─── Formularios ─────────────────────────────────────────── */
.field { margin-bottom: 1.15rem; }

.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.field__hint {
  font-size: 0.8rem;
  color: var(--dim);
  margin-top: 0.35rem;
}

.field__error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.35rem;
  min-height: 1rem;
}

input[type='text'],
input[type='email'],
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

input[aria-invalid='true'], select[aria-invalid='true'] {
  border-color: var(--danger);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%238b95a7' d='M6 8.5 1.5 4h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 1.5rem; }
}

/* ─── Selector de horarios ────────────────────────────────── */
.schedule {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

.schedule table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.schedule th {
  font-weight: 600;
  color: var(--muted);
  padding: 0.55rem 0.4rem;
  text-align: center;
  background: var(--surface-2);
  white-space: nowrap;
}

.schedule th:first-child { text-align: left; padding-left: 0.85rem; }

.schedule td {
  padding: 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.schedule td:first-child {
  text-align: left;
  padding: 0.5rem 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.slot {
  display: block;
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.slot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background: var(--surface-3);
  transition: background 0.12s;
}

.slot:hover::after { background: #333e4e; }

.slot[aria-pressed='true']::after {
  background: var(--accent);
}

/* ─── Perfil de Steam confirmado ──────────────────────────── */
.steam-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.75rem;
}

.steam-badge img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
}

.steam-badge__name { font-weight: 600; }
.steam-badge__meta { font-size: 0.8rem; color: var(--muted); }

/* ─── Avisos ──────────────────────────────────────────────── */
.notice {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
}

.notice--warn   { background: rgba(245,185,66,0.08); border-color: rgba(245,185,66,0.3); color: #f2cd7b; }
.notice--error  { background: rgba(239,68,68,0.08);  border-color: rgba(239,68,68,0.3);  color: #f5a3a3; }
.notice--info   { background: rgba(34,211,167,0.07); border-color: rgba(34,211,167,0.25); color: #7fe0c5; }

.notice a { color: inherit; text-decoration: underline; }

/* ─── Landing ─────────────────────────────────────────────── */
.hero__title {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}

.hero__lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 2rem;
}

.features {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.9rem;
}

.features li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--muted);
}

.features .tick {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.footnote {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--dim);
}

/* Dónde ver la partida después: enlaces externos + cómo bajar el replay. */
.replay-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.replay-links a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.replay-links a:hover { border-color: var(--accent); color: var(--accent); }

/* La nota ocupa el ancho completo y va debajo de los dos enlaces. */
.replay-links .footnote {
  flex-basis: 100%;
  margin-top: 0.25rem;
  padding-top: 0;
  border-top: 0;
}
