/* Tecnopoly — página de bienvenida y contenedor del juego */
:root {
  --bg: #0d1220;
  --bg-2: #141b2e;
  --card: #1a2238;
  --line: #2a3452;
  --text: #e8ecf6;
  --muted: #a6b0c8;
  --accent: #f2c14e;       /* dorado de las cartas especiales */
  --accent-ink: #2b1d02;
  --blue: #2f7df6;
  --green: #34c26b;
  --red: #e2574c;
  --radius: 16px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }

/* ── Barra superior ───────────────────────────────── */
.tp-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 18, 32, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tp-nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 24px;
}
.tp-logo { font-weight: 800; font-size: 22px; letter-spacing: 3px; color: #fff; text-decoration: none; }
.tp-logo span { color: var(--red); }
.tp-nav__links { display: flex; gap: 20px; margin-left: auto; }
.tp-nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.tp-nav__links a:hover { color: #fff; }

/* ── Botones ───────────────────────────────────────── */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 800; letter-spacing: 2px; text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  padding: 14px 34px; font-size: 18px;
  box-shadow: 0 6px 0 #b8892a, 0 12px 28px rgba(242, 193, 78, 0.25);
  transition: transform .12s ease, box-shadow .12s ease;
}
.tp-btn:hover { transform: translateY(-2px); }
.tp-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #b8892a; }
.tp-btn--small { padding: 8px 20px; font-size: 14px; box-shadow: 0 4px 0 #b8892a; }
.tp-btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); box-shadow: none; letter-spacing: 1px; font-weight: 600;
}

/* ── Portada ───────────────────────────────────────── */
.tp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.tp-hero__bg {
  position: absolute; inset: 0;
  background: url("tablero.jpg") center / cover no-repeat;
  filter: saturate(1.1);
}
.tp-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,18,32,.96) 0%, rgba(13,18,32,.85) 45%, rgba(13,18,32,.35) 100%);
}
.tp-hero__inner {
  position: relative; max-width: var(--max); margin: 0 auto;
  padding: 88px 20px 96px;
}
.tp-hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1; margin: 0 0 12px; letter-spacing: 4px; }
.tp-hero h1 span { color: var(--red); }
.tp-hero .tp-lead { font-size: clamp(18px, 2.2vw, 22px); max-width: 560px; margin: 0 0 28px; color: #d7ddeb; }
.tp-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tp-chip {
  font-size: 14px; color: var(--text);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  padding: 6px 14px; border-radius: 999px;
}

/* ── Secciones ─────────────────────────────────────── */
.tp-section { max-width: var(--max); margin: 0 auto; padding: 72px 20px; }
.tp-section--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tp-section--alt > .tp-wrap { max-width: var(--max); margin: 0 auto; padding: 72px 20px; }
.tp-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 3px; font-size: 13px; text-transform: uppercase; margin: 0 0 8px; }
.tp-section h2, .tp-section--alt h2 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 12px; line-height: 1.2; }
.tp-intro { color: var(--muted); max-width: 720px; margin: 0 0 36px; font-size: 17px; }

/* Pasos */
.tp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: paso; }
.tp-step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; position: relative;
}
.tp-step::before {
  counter-increment: paso; content: counter(paso);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.tp-step h3 { margin: 0 0 6px; font-size: 17px; }
.tp-step p { margin: 0; color: var(--muted); font-size: 15px; }

/* Tarjetas de reglas */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px;
}
.tp-card h3 { margin: 0 0 8px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.tp-card .tp-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tp-card p, .tp-card li { color: var(--muted); font-size: 15px; }
.tp-card p { margin: 0 0 8px; }
.tp-card ul { margin: 0; padding-left: 18px; }
.tp-card li { margin-bottom: 4px; }
.tp-card strong { color: var(--text); }
.tp-card--gold { border-color: rgba(242,193,78,.45); background: linear-gradient(180deg, rgba(242,193,78,.12), var(--card) 60%); }

/* Fila con imagen */
.tp-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.tp-split img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.tp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tp-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--muted); }
.tp-list li b { color: var(--text); display: block; }
.tp-list .tp-ico {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(47,125,246,.18); color: #8db8ff; font-weight: 800; font-size: 14px;
}

/* Nota final */
.tp-score {
  margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 18px 28px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.tp-score__formula { font-family: Consolas, "Courier New", monospace; font-size: 15px; color: var(--text); }
.tp-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; min-width: 240px; }
.tp-bar span:first-child { background: var(--green); flex: 70; }
.tp-bar span:last-child { background: var(--accent); flex: 30; }
.tp-legend { display: flex; gap: 18px; font-size: 14px; color: var(--muted); margin-top: 8px; }
.tp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* Tecnologías */
.tp-tech { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tp-tech div {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.tp-tech b { display: block; font-size: 17px; margin-bottom: 4px; }
.tp-tech small { color: var(--muted); font-size: 14px; }
.tp-tech em { font-style: normal; color: var(--accent); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }

/* Llamado final y pie */
.tp-cta { text-align: center; padding: 80px 20px; }
.tp-cta h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); }
.tp-cta p { color: var(--muted); margin: 0 0 28px; }
.tp-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.tp-footer__inner { max-width: var(--max); margin: 0 auto; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }

/* ── Pantalla de juego ─────────────────────────────── */
#tp-juego { display: none; position: fixed; inset: 0; background: #000; }
body.tp-jugando { overflow: hidden; }
body.tp-jugando #tp-landing { display: none; }
body.tp-jugando #tp-juego { display: block; }
#unity-container { position: absolute; inset: 0; }
#unity-canvas { width: 100%; height: 100%; display: block; background: #000; }
#unity-loading-bar {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: none; text-align: center; width: min(420px, 80vw);
}
#unity-loading-bar .tp-load-title { font-weight: 800; letter-spacing: 4px; font-size: 28px; margin-bottom: 18px; }
#unity-loading-bar .tp-load-title span { color: var(--red); }
#unity-progress-bar-empty { height: 12px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
#unity-progress-bar-full { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
#tp-load-text { margin-top: 12px; color: var(--muted); font-size: 14px; }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: #fff; color: #000; padding: 10px; display: none; }
#unity-fullscreen-button {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(13,18,32,.6); color: #fff; cursor: pointer; font-size: 20px; line-height: 1;
}

/* ── Celulares ─────────────────────────────────────── */
@media (max-width: 820px) {
  .tp-nav__links { display: none; }
  .tp-nav__inner .tp-btn--small { margin-left: auto; }
  .tp-hero__inner { padding: 56px 20px 64px; }
  .tp-hero__bg::after { background: linear-gradient(180deg, rgba(13,18,32,.88), rgba(13,18,32,.95)); }
  .tp-split { grid-template-columns: 1fr; }
  .tp-score { grid-template-columns: 1fr; }
  .tp-section, .tp-section--alt > .tp-wrap { padding: 52px 20px; }
}
