/* EcoTrack · TeclaVerde — estilos (extraídos y limpiados de rafa_vs_gdl_v2.html) */
/* ==========================================================================
   AISLAMIENTO DE ESTILOS: Todos los estilos usan el prefijo .ecotrack-game-
   ========================================================================== */
:root {
  --et-game-bg: #121212;
  --et-game-card: rgba(255, 255, 255, 0.06);
  --et-game-glass-brd: rgba(255, 255, 255, 0.12);
  --et-game-leaf: #7BC67E;
  --et-game-leaf-dark: #4C8F52;
  --et-game-sage: rgba(123, 198, 126, 0.14);
  --et-game-clay: #E08A52;
  --et-game-ink: #FFFFFF;
  --et-game-ink-soft: #A1A1AA;
  --et-game-water: #38BDF8;
}

body.ecotrack-game-body {
  margin: 0;
  padding: 0;
  background-color: var(--et-game-bg);
  color: var(--et-game-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ecotrack-game-wrapper {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px 40px;
  box-sizing: border-box;
  flex: 1;
}

/* Header & Barra Superior */
.ecotrack-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--et-game-glass-brd);
}

.ecotrack-game-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.ecotrack-game-subtitle {
  color: var(--et-game-ink-soft);
  font-size: 13.5px;
  margin-top: 4px;
  display: block;
}

.ecotrack-game-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Botones con prefijo */
.ecotrack-game-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ecotrack-game-btn:hover {
  transform: translateY(-1px);
}

.ecotrack-game-btn-primary {
  background: var(--et-game-leaf);
  color: #111;
}

.ecotrack-game-btn-primary:hover {
  box-shadow: 0 8px 18px rgba(85, 107, 47, 0.32);
}

.ecotrack-game-btn-ghost {
  background: transparent;
  color: var(--et-game-ink);
  border: 1.5px solid var(--et-game-glass-brd);
}

.ecotrack-game-btn-ghost:hover {
  background: var(--et-game-sage);
}

/* Tarjetas y Contenedores */
.ecotrack-game-card {
  background: var(--et-game-card);
  border: 1px solid var(--et-game-glass-brd);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ecotrack-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.ecotrack-game-mode-card {
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.ecotrack-game-mode-card:hover {
  transform: translateY(-4px);
  border-color: var(--et-game-leaf);
}

.ecotrack-game-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.ecotrack-game-tag-normal {
  background: var(--et-game-sage);
  color: var(--et-game-leaf);
}

.ecotrack-game-tag-funny {
  background: rgba(56, 189, 248, 0.18);
  color: #38BDF8;
}

/* HUD / Métricas del juego */
.ecotrack-game-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .ecotrack-game-hud {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ecotrack-game-kpi {
  text-align: center;
  padding: 14px 10px;
}

.ecotrack-game-kpi b {
  font-size: 22px;
  display: block;
  color: var(--et-game-leaf);
}

.ecotrack-game-kpi span {
  font-size: 11px;
  font-weight: 700;
  color: var(--et-game-ink-soft);
  text-transform: uppercase;
}

/* Barra de progreso */
.ecotrack-game-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 18px;
}

.ecotrack-game-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--et-game-leaf);
  transition: width 0.2s ease;
}

/* ==========================================================================
   MODO FUNNY · minijuegos (todo con prefijo .ecotrack-game-arc-)
   ========================================================================== */
.ecotrack-game-arc-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ecotrack-game-arc-top h2 { margin: 0; font-size: 18px; color: var(--et-game-water); }
.ecotrack-game-arc-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--et-game-ink-soft); }
.ecotrack-game-arc-tools input[type=range] { width: 80px; accent-color: var(--et-game-leaf); }
.ecotrack-game-arc-stage { position: relative; border-radius: 18px; overflow: hidden; border: 2px solid rgba(56,189,248,.35); background: #0b1118; cursor: text; }
.ecotrack-game-arc-stage canvas { display: block; width: 100%; height: auto; }
.ecotrack-game-arc-input { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0.01; border: 0; padding: 0; font-size: 16px; }
.ecotrack-game-arc-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 18px; background: rgba(8,14,20,.88); gap: 10px; }
.ecotrack-game-arc-intro h3 { margin: 0; font-size: 26px; }
.ecotrack-game-arc-intro p { margin: 0; max-width: 520px; color: #d4d4d8; font-size: 14.5px; line-height: 1.55; }
@media (max-width: 600px) { .ecotrack-game-arc-intro { padding: 10px; gap: 6px; justify-content: flex-start; overflow-y: auto; } .ecotrack-game-arc-intro h3 { font-size: 19px; } .ecotrack-game-arc-intro p { font-size: 12px; line-height: 1.4; } }
.ecotrack-game-funny-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.ecotrack-game-funny-card .big { font-size: 40px; line-height: 1; display: block; margin-bottom: 8px; }
.ecotrack-game-btn:focus-visible { outline: 3px solid #FFE28A; outline-offset: 2px; }
.ecotrack-game-shake { animation: etShake .35s ease; }
@keyframes etShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .ecotrack-game-shake { animation: none !important; } }

/* Área central de mecanografía */
.ecotrack-game-typing-box {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 26px 20px;
  cursor: text;
  border: 1.5px solid var(--et-game-glass-brd);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ecotrack-game-typing-box.focused {
  border-color: var(--et-game-leaf);
  box-shadow: 0 0 24px rgba(123, 198, 126, 0.16);
}

.ecotrack-game-ctx-line {
  color: #55555C;
  font-size: 14px;
  min-height: 1.4em;
  user-select: none;
}

.ecotrack-game-cline {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.6;
  margin: 10px 0;
  word-break: break-word;
  user-select: none;
}

.ecotrack-game-char-pending {
  color: #55555C;
}

.ecotrack-game-char-ok {
  color: var(--et-game-leaf);
}

.ecotrack-game-char-bad {
  color: var(--et-game-clay);
  background: rgba(224, 138, 82, 0.2);
  border-radius: 3px;
  text-decoration: underline;
}

.ecotrack-game-caret {
  position: relative;
}

.ecotrack-game-caret::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 10%;
  bottom: 10%;
  width: 2.5px;
  background: var(--et-game-leaf);
  animation: ecotrack-game-blink 1s steps(1) infinite;
}

@keyframes ecotrack-game-blink {
  50% { opacity: 0; }
}

#ecotrack-game-hidden-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: text;
}

/* Teclado en pantalla interactivo */
.ecotrack-game-kbd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
}

.ecotrack-game-krow {
  display: flex;
  gap: 5px;
}

.ecotrack-game-key {
  width: 38px;
  height: 38px;
  background: var(--et-game-card);
  border: 1px solid var(--et-game-glass-brd);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--et-game-ink-soft);
  text-transform: uppercase;
  transition: all 0.1s ease;
  user-select: none;
}

.ecotrack-game-key.space {
  width: 240px;
}

.ecotrack-game-key.next {
  border-color: var(--et-game-leaf);
  color: var(--et-game-leaf);
  box-shadow: 0 0 0 2px rgba(123, 198, 126, 0.25);
}

.ecotrack-game-key.lit {
  background: var(--et-game-leaf);
  color: #111;
  transform: translateY(2px);
}

.ecotrack-game-key.err {
  background: var(--et-game-clay);
  color: #fff;
}

@media (max-width: 760px) {
  .ecotrack-game-kbd {
    display: none;
  }
}

/* Pantalla de Resultados */
.ecotrack-game-grade-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 800;
  border: 3px solid var(--et-game-leaf);
  background: var(--et-game-sage);
  color: var(--et-game-leaf);
}

.ecotrack-game-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0D0D0D;
  border: 1px solid var(--et-game-glass-brd);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.ecotrack-game-hidden {
  display: none !important;
}

/* ===== Pulido de diseño (computadora y celular) ===== */
body.ecotrack-game-body {
  background: radial-gradient(900px 520px at 8% -8%, rgba(123,198,126,.16), transparent 60%),
              radial-gradient(800px 500px at 100% 0%, rgba(56,189,248,.11), transparent 55%), var(--et-game-bg);
  background-attachment: fixed;
  min-height: 100vh; min-height: 100dvh;
}
.ecotrack-game-card { box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.ecotrack-game-btn { min-height: 40px; justify-content: center; }
.ecotrack-game-cline { white-space: pre-wrap; }
.ecotrack-game-arc-stage { scroll-margin-top: 6px; }
@media (max-width: 699px) {
  #et-game-screen-arcade .ecotrack-game-hud { display: none; }
  #et-game-screen-arcade .ecotrack-game-progress-track { margin-bottom: 10px; }
}
@media (max-width: 600px) {
  .ecotrack-game-wrapper { padding: 12px 12px 28px; }
  .ecotrack-game-header { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; }
  .ecotrack-game-title { font-size: 19px; }
  .ecotrack-game-subtitle { font-size: 12px; margin-top: 2px; }
  .ecotrack-game-actions { gap: 8px; }
  .ecotrack-game-actions .ecotrack-game-btn { flex: 1; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .ecotrack-game-card { padding: 16px; border-radius: 16px; }
  .ecotrack-game-grid, .ecotrack-game-funny-grid { gap: 12px; margin-top: 14px; }
  .ecotrack-game-hud { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
  .ecotrack-game-kpi { padding: 8px 4px; border-radius: 12px; }
  .ecotrack-game-kpi b { font-size: 16px; }
  .ecotrack-game-kpi span { font-size: 9px; }
  .ecotrack-game-typing-box { min-height: 170px; padding: 18px 12px; }
  .ecotrack-game-cline { font-size: 21px; }
  .ecotrack-game-ctx-line { font-size: 12.5px; }
  #et-game-screen-play > div:last-child { flex-wrap: wrap; gap: 8px; }
  .ecotrack-game-arc-top h2 { font-size: 16px; }
  .ecotrack-game-arc-tools { gap: 6px; width: 100%; justify-content: space-between; }
  .ecotrack-game-arc-tools input[type=range] { width: 70px; }
  .ecotrack-game-funny-card .big { font-size: 34px; }
}

/* ===== Ajustes extra celular ===== */
.ecotrack-game-char-pending { color: #8E8E98; }
.ecotrack-game-ctx-line { color: #6E6E78; }
@media (max-width: 600px) {
  .ecotrack-game-arc-intro { justify-content: center; background: rgba(8,14,20,.94); overflow-y: auto; }
  .ecotrack-game-arc-intro h3 { font-size: 20px; }
  .ecotrack-game-arc-intro p { font-size: 13px; line-height: 1.5; }
  #et-game-screen-menu h2 { font-size: 16px !important; }
  #et-game-screen-records .ecotrack-game-card { padding: 14px 10px; }
  #et-game-screen-records table { font-size: 12px !important; }
  #et-game-screen-records th, #et-game-screen-records td { padding: 8px 4px !important; white-space: nowrap; }
  #et-game-screen-records .ecotrack-game-tag { font-size: 9.5px; padding: 3px 7px; margin: 0; }
  .ecotrack-game-typing-box { min-height: 150px; }
  #et-game-screen-results .ecotrack-game-btn { width: 100%; }
  #et-game-screen-results .ecotrack-game-card { padding: 24px 14px !important; }
  .ecotrack-game-btn-primary, .ecotrack-game-btn-ghost { -webkit-tap-highlight-color: transparent; }
}

/* ==========================================================================
   DISEÑO CELULAR v3 (app-like) + pausa de minijuegos
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; }
.ecotrack-game-btn, .ecotrack-game-mode-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ecotrack-game-btn .ic { font-size: 15px; line-height: 1; }
.ecotrack-game-mode-card { position: relative; overflow: hidden; }
.ecotrack-game-grid .ecotrack-game-mode-card:nth-child(1) { background: linear-gradient(135deg, rgba(123,198,126,.20), rgba(255,255,255,.04) 60%); }
.ecotrack-game-grid .ecotrack-game-mode-card:nth-child(2) { background: linear-gradient(135deg, rgba(56,189,248,.20), rgba(255,255,255,.04) 60%); }
.ecotrack-game-grid .ecotrack-game-mode-card::after { position: absolute; right: 16px; top: 14px; font-size: 52px; line-height: 1; opacity: .95; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.ecotrack-game-grid .ecotrack-game-mode-card:nth-child(1)::after { content: "📖"; }
.ecotrack-game-grid .ecotrack-game-mode-card:nth-child(2)::after { content: "🎮"; }
.ecotrack-game-arc-tap { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; background: rgba(8,14,20,.78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); cursor: pointer; padding: 14px; }
.ecotrack-game-arc-tap b { font-size: 22px; }
.ecotrack-game-arc-tap span { color: #d4d4d8; font-size: 14px; }
.ecotrack-game-arc-stage canvas { object-fit: contain; max-height: calc(var(--vvh, 100vh) - 130px); background: #0b1118; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.ecotrack-game-typing-box:not(.focused)::after { content: "⌨️ Toca aquí para escribir"; position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--et-game-leaf); opacity: .9; }

@media (max-width: 600px) {
  .ecotrack-game-header { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; }
  .ecotrack-game-header > div:first-child { min-width: 0; }
  .ecotrack-game-title { font-size: 17px; white-space: nowrap; }
  .ecotrack-game-subtitle { display: none; }
  .ecotrack-game-actions { gap: 8px; flex: none; width: auto; }
  .ecotrack-game-actions .ecotrack-game-btn, .ecotrack-game-arc-tools .ecotrack-game-btn { flex: none; width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
  .ecotrack-game-btn .lbl { display: none; }
  .ecotrack-game-btn .ic { font-size: 18px; }
  .ecotrack-game-arc-tools input[type=range] { display: none; }
  .ecotrack-game-arc-tools label { display: none; }

  /* Menú */
  #et-game-screen-menu > .ecotrack-game-card:first-child { padding: 14px 16px; }
  .ecotrack-game-grid .ecotrack-game-mode-card { padding: 18px 16px; }
  .ecotrack-game-grid .ecotrack-game-mode-card h3 { font-size: 19px; max-width: 70%; }
  .ecotrack-game-grid .ecotrack-game-mode-card p { max-width: 100%; }
  .ecotrack-game-grid .ecotrack-game-mode-card .ecotrack-game-btn { width: 100%; min-height: 46px; font-size: 14px !important; }
  .ecotrack-game-grid .ecotrack-game-mode-card::after { font-size: 44px; right: 14px; top: 38px; }

  /* Hub funny: filas compactas, toda la tarjeta se toca */
  .ecotrack-game-funny-grid { grid-template-columns: 1fr; gap: 10px; }
  .ecotrack-game-funny-card { display: grid; grid-template-columns: 56px 1fr 18px; column-gap: 12px; align-items: center; padding: 12px 14px; }
  .ecotrack-game-funny-card .big { grid-row: 1 / span 2; font-size: 38px; margin: 0; text-align: center; }
  .ecotrack-game-funny-card h3 { margin: 0 !important; font-size: 16px; }
  .ecotrack-game-funny-card p { margin: 2px 0 0 !important; font-size: 12px !important; line-height: 1.35; grid-column: 2; }
  .ecotrack-game-funny-card .go { display: none; }
  .ecotrack-game-funny-card::after { content: "›"; grid-column: 3; grid-row: 1 / span 2; font-size: 26px; color: var(--et-game-leaf); }

  /* Historia: barra compacta */
  .ecotrack-game-typing-box { min-height: 0; padding: 22px 14px 34px; }
  .ecotrack-game-cline { font-size: 22px; margin: 8px 0; }
  .ecotrack-game-ctx-line { font-size: 12.5px; }
  #et-game-screen-play > div:last-child { display: none !important; }
  body.et-play-on .ecotrack-game-wrapper { padding-bottom: 12px; }

  /* Minijuego a pantalla casi completa */
  body.et-arcade-on .ecotrack-game-header { display: none; }
  body.et-arcade-on .ecotrack-game-wrapper { padding: 8px 8px 8px; }
  body.et-arcade-on .ecotrack-game-arc-top { margin-bottom: 8px; flex-wrap: nowrap; }
  body.et-arcade-on .ecotrack-game-arc-top h2 { font-size: 16px; }
  body.et-arcade-on .ecotrack-game-arc-tools { width: auto; gap: 8px; }
  body.et-arcade-on #et-game-screen-arcade > p { display: none; }
  body.et-arcade-on .ecotrack-game-progress-track { margin-bottom: 8px; height: 6px; }
  body.et-arcade-on .ecotrack-game-arc-stage { border-radius: 14px; border-width: 1.5px; }
  .ecotrack-game-arc-stage canvas { max-height: calc(var(--vvh, 100vh) - 92px); }
}
/* Celular acostado */
@media (max-height: 520px) and (orientation: landscape) {
  body.et-arcade-on .ecotrack-game-header { display: none; }
  body.et-arcade-on .ecotrack-game-wrapper { padding: 6px 12px; }
  body.et-arcade-on #et-game-screen-arcade > p, body.et-arcade-on .ecotrack-game-hud { display: none; }
  body.et-arcade-on .ecotrack-game-arc-top { margin-bottom: 6px; }
  .ecotrack-game-arc-stage canvas { max-height: calc(var(--vvh, 100vh) - 76px); }
}
.ecotrack-game-btn { box-sizing: border-box; }
.ecotrack-game-cline { word-break: normal; overflow-wrap: break-word; max-width: 100%; }

/* ===== DISEÑO EcoTrack (igual que la portada) + juegos Funny ===== */
body.ecotrack-game-body {
  background: radial-gradient(900px 560px at 88% 38%, rgba(46,160,110,.20), transparent 60%),
              radial-gradient(800px 520px at 4% -8%, rgba(123,198,126,.18), transparent 60%),
              radial-gradient(600px 400px at 50% 110%, rgba(56,189,248,.08), transparent 60%), #0e1511;
  background-attachment: fixed;
}
.ecotrack-game-wrapper { position: relative; z-index: 1; }
.et-orbs { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.et-orbs i { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.38), rgba(123,198,126,.30) 38%, rgba(30,80,55,.16) 72%); box-shadow: inset -8px -10px 22px rgba(0,0,0,.25), 0 0 40px rgba(123,198,126,.12); animation: etFloat 9s ease-in-out infinite; }
.et-orbs i:nth-child(1) { width: 96px; height: 96px; left: 3%; top: 16%; }
.et-orbs i:nth-child(2) { width: 54px; height: 54px; right: 6%; top: 10%; animation-delay: -3s; }
.et-orbs i:nth-child(3) { width: 130px; height: 130px; right: 3%; bottom: 8%; animation-delay: -5s; opacity: .8; }
.et-orbs i:nth-child(4) { width: 38px; height: 38px; left: 10%; bottom: 14%; animation-delay: -2s; }
.et-orbs i:nth-child(5) { width: 64px; height: 64px; left: 46%; top: 4%; animation-delay: -6s; opacity: .6; }
@keyframes etFloat { 50% { transform: translateY(-18px) translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .et-orbs i, .et-planet { animation: none !important; } }
.ecotrack-game-title { background: linear-gradient(90deg, #fff, #9be59e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.et-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; overflow: hidden; background: linear-gradient(135deg, rgba(123,198,126,.16), rgba(255,255,255,.04) 60%); }
.et-chip { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--et-game-leaf); background: var(--et-game-sage); padding: 5px 12px; border-radius: 999px; margin-bottom: 10px; }
.et-planet { flex: none; width: 108px; height: 108px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 60px; position: relative; margin-right: 18px; background: radial-gradient(circle at 35% 30%, rgba(120,220,255,.35), rgba(20,90,140,.45) 60%, rgba(8,30,50,.5)); box-shadow: 0 0 50px rgba(56,189,248,.35), 0 0 0 8px rgba(123,198,126,.10); animation: etFloat 7s ease-in-out infinite; }
.et-planet::after { content: ""; position: absolute; inset: -12px -24px; border: 3px solid rgba(123,198,126,.55); border-radius: 50%; transform: rotate(-18deg) scaleY(.34); box-shadow: 0 0 18px rgba(123,198,126,.5); }
.et-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.et-tile { text-align: center; padding: 14px 8px 10px; border-radius: 18px; border: 1px solid var(--et-game-glass-brd); background: linear-gradient(180deg, rgba(123,198,126,.10), rgba(0,0,0,.25)); box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.et-tile span { display: block; font-size: 30px; margin-bottom: 6px; }
.et-tile b { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--et-game-ink-soft); }
.ecotrack-game-fun-best { font-size: 12px; color: var(--et-game-ink-soft); font-weight: 700; }
@media (max-width: 600px) {
  .et-hero { padding: 14px 16px; }
  .et-planet { width: 64px; height: 64px; font-size: 34px; margin-right: 10px; }
  .et-hero h2 { font-size: 17px !important; }
  .et-tiles { gap: 8px; }
  .et-tile span { font-size: 24px; }
  .ecotrack-game-funny-card .ecotrack-game-fun-best { display: none; }
}

/* ===== HUD dentro del canvas · pantalla completa en PC ===== */
body.et-arcade-on .ecotrack-game-header { display: none; }
#et-game-screen-arcade .ecotrack-game-hud, #et-game-screen-arcade .ecotrack-game-progress-track { display: none; }
@media (min-width: 700px) {
  body.et-arcade-on .ecotrack-game-wrapper { max-width: 1240px; padding: 10px 14px 14px; }
  body.et-arcade-on .ecotrack-game-arc-stage canvas { max-height: calc(var(--vvh, 100vh) - 24px); }
  body.et-arcade-on .et-arc-help { display: none; }
}
.et-arc-tools { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: rgba(8,16,12,.72); border: 1px solid var(--et-game-glass-brd); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: .78; transition: opacity .2s; font-size: 12px; color: var(--et-game-ink-soft); }
.et-arc-tools:hover { opacity: 1; }
.et-arc-tools .ecotrack-game-btn { min-height: 34px; padding: 6px 12px; font-size: 12px; }
@media (max-width: 699px) { .et-arc-tools { top: 32px; bottom: auto; right: 6px; padding: 4px 6px; } }

/* ==========================================================================
   MEJORAS · accesibilidad, tarjetas con teclado, dificultad, escenario unificado
   ========================================================================== */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ecotrack-game-mode-card[role="button"] { cursor: pointer; }
.ecotrack-game-mode-card[role="button"]:focus-visible,
.ecotrack-game-btn:focus-visible, a:focus-visible, input[type=range]:focus-visible, .et-diff button:focus-visible {
  outline: 3px solid #FFE28A; outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }
.et-noscript { max-width: 560px; margin: 40px auto; padding: 20px; border-radius: 16px; border: 1px solid var(--et-game-glass-brd); background: rgba(255,255,255,.06); text-align: center; line-height: 1.5; }

/* Escenario único para los 3 minijuegos */
.ecotrack-game-arc-stage.is-fixed canvas { aspect-ratio: 720 / 420; }
.ecotrack-game-arc-stage.is-fixed .et-arc-tools { position: static; justify-content: center; flex-wrap: wrap; border-radius: 0; border: 0; border-top: 1px solid var(--et-game-glass-brd); background: rgba(8,16,12,.92); opacity: 1; padding: 8px 10px; }
.ecotrack-game-arc-tools .ecotrack-game-btn[aria-pressed="true"] { border-color: var(--et-game-leaf); }
.et-howto { margin: 0; padding: 0; list-style: none; max-width: 520px; text-align: left; color: #d4d4d8; font-size: 13.5px; line-height: 1.5; }
.et-howto li::before { content: "▸ "; color: var(--et-game-leaf); }
@media (max-width: 600px) { .et-howto { font-size: 12px; line-height: 1.35; } }
.et-diff { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; border: 0; margin: 0; padding: 0; }
.et-diff legend { width: 100%; text-align: center; font-size: 12px; font-weight: 700; color: var(--et-game-ink-soft); margin-bottom: 6px; padding: 0; }
.et-diff button { min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--et-game-glass-brd); background: rgba(255,255,255,.06); color: #fff; font: 700 13px "Plus Jakarta Sans", system-ui, sans-serif; cursor: pointer; }
.et-diff button[aria-checked="true"] { background: var(--et-game-leaf); color: #111; border-color: var(--et-game-leaf); }
.et-seed { margin: 14px 0 0; font-size: 11px; color: var(--et-game-ink-soft); }
.et-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.et-table th { padding: 8px; text-align: left; color: var(--et-game-ink-soft); border-bottom: 1px solid var(--et-game-glass-brd); }
.et-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
.et-table td.wpm { font-weight: 700; color: var(--et-game-leaf); }
.et-empty { text-align: center; padding: 16px; color: var(--et-game-ink-soft); }
.et-hero h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.02em; }
.et-hero p, .et-lead { margin: 0; color: var(--et-game-ink-soft); font-size: 13.5px; line-height: 1.5; }
.et-card-text { color: var(--et-game-ink-soft); font-size: 13px; margin: 0 0 16px; }
.et-card-title { margin: 0 0 6px; }
.et-card-funny { border-color: rgba(56,189,248,.4); }
.et-card-funny h3 { color: #38BDF8; }
.et-meme { display: none; margin: 16px auto; max-width: 280px; text-align: center; border-radius: 16px; overflow: hidden; border: 2px solid var(--et-game-leaf); background: rgba(0,0,0,.5); box-shadow: 0 8px 24px rgba(123,198,126,.25); }
.et-meme img { width: 100%; display: block; object-fit: cover; }
.et-meme div { padding: 10px; background: rgba(123,198,126,.12); color: var(--et-game-leaf); font-weight: 800; font-size: 14px; letter-spacing: .05em; }
.et-meme small { font-size: 12px; font-weight: 600; color: var(--et-game-ink-soft); }
.et-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.et-small-btn { padding: 6px 14px !important; font-size: 12.5px !important; }
@media (prefers-reduced-motion: reduce) { .ecotrack-game-progress-fill { transition: none; } * { scroll-behavior: auto !important; } }
