@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Orbitron', sans-serif;
}

/* =====================
   CARDS BASE
   ===================== */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn img.card-bg {
  display: block;
  width: 100%;
  height: auto;
}
.btn .btn-inner {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn:active {
  transform: scale(0.95);
  opacity: 0.85;
  transition: transform 0.1s, opacity 0.1s;
}

/* =====================
   TAMAÑOS DE CARD
   ===================== */

.btn-recurso {
  width: 14vw;
  max-width: 64px;
}
.btn-recurso .btn-inner img {
  width: 50%;
}
.btn-recurso .btn-inner span {
  font-size: 2.8vw;
  font-weight: 900;
  color: red;
  line-height: 1;
}

.btn-mejora {
  width: 36vw;
  max-width: 160px;
}
.btn-mejora .btn-inner span {
  font-size: 3.5vw;
  font-weight: 900;
  color: #111;
  letter-spacing: 1px;
}

.btn-cantidad {
  width: 28vw;
  max-width: 120px;
}
.btn-cantidad .btn-inner img {
  width: 35%;
}
.btn-cantidad .btn-inner span {
  font-size: 3.5vw;
  font-weight: 900;
  color: white;
}

.btn-edificio {
  width: 18vw;
  max-width: 80px;
}
.btn-edificio .btn-inner img {
  width: 55%;
}
.btn-edificio .btn-inner span {
  font-size: 2.5vw;
  font-weight: 700;
  color: #eee;
  text-align: center;
}

.btn-opcion {
  width: 14vw;
  max-width: 60px;
}
.btn-opcion .btn-inner img {
  width: 55%;
}

.btn-informe {
  width: 18vw;
  max-width: 80px;
}
.btn-informe .btn-inner img {
  width: 55%;
}
.btn-informe .btn-inner span {
  font-size: 2.5vw;
  font-weight: 700;
  color: #111;
  text-align: center;
}

/* =====================
   COLORES RECURSO
   ===================== */
.recurso-ok    { color: #44ff88 !important; }
.recurso-nook  { color: red !important; }

/* =====================
   BOTÓN ATRÁS
   ===================== */
.btn-atras {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-atras img {
  width: 9vw;
  max-width: 40px;
  display: block;
}
.btn-atras:active { opacity: 0.7; }

/* =====================
   TÍTULO (caja frosted)
   ===================== */
.titulo-card {
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 8px 20px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}
.titulo-card h2 {
  font-size: 4vw;
  color: #111;
  letter-spacing: 1px;
  margin-bottom: 3px;
}
.titulo-card p {
  font-size: 2vw;
  color: #222;
  line-height: 1.4;
  font-weight: 700;
}

/* =====================
   ICONOS RECURSO CSS
   (sin imágenes — reutilizable en todas las páginas)
   ===================== */

/* Contenedor base */
.icon-recurso {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* Titanio — letra T Orbitron azul */
.icon-titanio {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 900;
  color: #7ecfff;
  line-height: 1;
  letter-spacing: -1px;
  width: 14px;
  height: 14px;
}

/* Energía — rayo SVG amarillo */
.icon-energia svg {
  width: 10px;
  height: 14px;
}

/* Munición — 3 balas SVG naranja */
.icon-municion {
  width: 20px;
  height: 14px;
}
.icon-municion svg {
  width: 20px;
  height: 14px;
}

/* =====================
   PANEL RECURSOS — estilos compartidos
   ===================== */
.recurso-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.recurso-label { font-size: 1.8vw; font-weight: 700; letter-spacing: .04em; }
.r-cantidad    { font-size: 2.8vw; font-weight: 900; line-height: 1; }
.r-hora        { font-size: 2.2vw; color: rgba(255,255,255,0.85); line-height: 1; font-weight: 700; }
.recurso-sep   { width: 1px; height: 36px; background: rgba(255,255,255,0.2); }

.ok   { color: #44ff88; }
.nook { color: #ff4444; }
.lbl-titanio  { color: #7ecfff; }
.lbl-energia  { color: #ffe066; }
.lbl-municion { color: #ff8c66; }

/* =====================
   ESCRITORIO — simular móvil centrado
   ===================== */
@media (min-width: 1024px) {
  html {
    background: #000;
    height: 100%;
  }
  body {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a0a1a 0%, #000 70%);
  }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(0,180,255,0.025) 60px, rgba(0,180,255,0.025) 61px),
      repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(0,180,255,0.025) 60px, rgba(0,180,255,0.025) 61px);
    pointer-events: none;
    z-index: 0;
  }
  #pantalla {
    position: relative !important;
    width: 390px !important;
    height: 844px !important;
    max-height: 100vh;
    border-radius: 36px;
    overflow: hidden !important;
    box-shadow:
      0 0 0 1px rgba(0,180,255,0.15),
      0 0 40px rgba(0,100,255,0.2),
      0 30px 80px rgba(0,0,0,0.8);
    z-index: 1;
    flex-shrink: 0;
  }

  /* ── Fix recursos: px fijos proporcionales a 390px ── */
  .recurso-label { font-size: 7px !important; }
  .r-cantidad    { font-size: 11px !important; }
  .r-hora        { font-size: 9px !important; }
  .rec-valor     { font-size: 11px !important; }
}
