:root {
  --pokedex-red: #d32f2f;
  --pokedex-dark-red: #8b0000;
  --screen-bg: #8b956d;
  --screen-dark: #737c59;
  --retro-text: #0f380f;
  --btn-yellow: #f1c40f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Courier New', Courier, monospace;
}

body {
  background-color: #121212;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 15px;
}

.hidden { display: none !important; }

/* OVERLAY INTRO */
.overlay-screen {
  position: fixed;
  top: 0; left: 0; 
  width: 100vw; height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}

.card-intro {
  background-color: var(--pokedex-red);
  border: 5px solid #000;
  border-radius: 15px;
  padding: 30px 20px;
  text-align: center;
  max-width: 380px; width: 90%;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
  display: flex; flex-direction: column; align-items: center; gap: 15px;
}

.pokeball-badge {
  width: 60px; height: 60px;
  background: linear-gradient(to bottom, #ff0000 50%, #ffffff 50%);
  border: 4px solid #000; border-radius: 50%;
  position: relative;
}
.pokeball-badge::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 6px; background: #000; transform: translateY(-50%);
}

.flash-title {
  color: #ffcc00; font-size: 1.1rem;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 2px 2px #000;
}

.sub-text { color: #00ffcc; font-size: 0.85rem; font-weight: bold; }

/* COMUNICADOR PRINCIPAL */
.communicator-container {
  background-color: var(--pokedex-red);
  border: 6px solid var(--pokedex-dark-red);
  border-radius: 20px;
  width: 100%; max-width: 550px;
  padding: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.top-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 3px solid var(--pokedex-dark-red);
}

.led-group { display: flex; align-items: center; gap: 8px; }
.led-blue {
  width: 35px; height: 35px;
  background: radial-gradient(circle at 30% 30%, #00d2ff, #004080);
  border: 3px solid #fff; border-radius: 50%;
}
.led-small { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #000; }
.led-small.red { background: #ff2222; }
.led-small.yellow { background: #ffcc00; }
.led-small.green { background: #2ecc71; }

.pulse { animation: pulseAnim 1.5s infinite; }
@keyframes pulseAnim {
  0% { box-shadow: 0 0 4px #00d2ff; }
  50% { box-shadow: 0 0 15px #00d2ff; }
  100% { box-shadow: 0 0 4px #00d2ff; }
}

.header-text { display: flex; flex-direction: column; font-weight: bold; font-size: 0.8rem; text-align: right; }
.status-badge { color: #2ecc71; font-size: 0.7rem; }

/* PANTALLA VERDE RETRO */
.screen-casing {
  background-color: #dedede;
  border: 4px solid #999; border-radius: 10px;
  padding: 10px;
}

.green-screen {
  background-color: var(--screen-bg);
  border: 4px solid var(--screen-dark);
  border-radius: 6px; padding: 15px;
  color: var(--retro-text);
  display: flex; flex-direction: column; gap: 15px;
}

.hero-header { text-align: center; }
.tagline { font-size: 0.75rem; font-weight: bold; letter-spacing: 1px; }

.birthday-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 1.1rem; margin: 8px 0; color: #000;
}

.badge-age {
  display: inline-block; background-color: #000; color: #ffcc00;
  padding: 4px 10px; font-weight: bold; border-radius: 4px; font-size: 0.85rem;
}

/* COUNTDOWN */
.countdown-box {
  background-color: rgba(0, 0, 0, 0.08);
  border: 2px dashed var(--retro-text);
  padding: 10px; border-radius: 6px; text-align: center;
}
.box-label { font-size: 0.7rem; font-weight: bold; margin-bottom: 5px; display: block; }
.timer-digits {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem; color: #800000;
}

/* SELECCIÓN Y BUSCADOR DE POKÉMON */
.starter-selection { text-align: center; background: rgba(0,0,0,0.05); padding: 10px; border-radius: 8px; }

.pokemon-display-box {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid var(--retro-text);
  border-radius: 8px; padding: 8px; margin: 8px 0;
}

.sprite-container img {
  width: 75px; height: 75px;
  filter: drop-shadow(2px 4px 0px rgba(0,0,0,0.2));
  object-fit: contain;
}

.poke-info-display { text-align: left; }
.poke-info-display span { font-size: 0.75rem; font-weight: bold; color: #555; }
.poke-info-display h3 { font-family: 'Press Start 2P', cursive; font-size: 0.85rem; color: #000; text-transform: uppercase; }

.search-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.search-input-wrapper { display: flex; flex: 1; min-width: 180px; }

.search-input-wrapper input {
  width: 100%; padding: 6px 8px; border: 2px solid #000;
  border-right: none; border-radius: 4px 0 0 4px; font-size: 0.8rem; outline: none;
}

.btn-small-retro {
  background: #fff; border: 2px solid #000; padding: 6px 10px;
  font-weight: bold; cursor: pointer; font-size: 0.8rem;
  border-radius: 0 4px 4px 0;
}
.btn-random { border-radius: 4px; background: var(--btn-yellow); }
.btn-small-retro:active { transform: translateY(1px); }

/* DETALLES */
.details-grid { display: flex; flex-direction: column; gap: 8px; }
.detail-card {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.3);
  padding: 8px 12px; border-radius: 6px; border-left: 4px solid #000;
}
.detail-card .icon { font-size: 1.3rem; }
.detail-card .info strong { font-size: 0.75rem; display: block; color: #000; }
.detail-card .info p { font-size: 0.8rem; font-weight: bold; }
.detail-card .info small { font-size: 0.7rem; color: #333; }

/* TICKET CONFIRMACIÓN */
.ticket-box {
  background: #fff; border: 3px dashed #000; padding: 12px;
  text-align: center; border-radius: 8px; animation: popIn 0.3s ease-out;
}
@keyframes popIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ticket-header { font-weight: bold; color: #d32f2f; font-size: 0.8rem; margin-bottom: 4px; }
.ticket-body { font-size: 0.75rem; color: #333; }
.ticket-code { font-family: 'Press Start 2P', cursive; font-size: 0.9rem; margin-top: 6px; color: #000; }

/* BOTONES RETRO */
.btn-retro {
  background-color: var(--btn-yellow); color: #000;
  border: 3px solid #000; border-radius: 8px;
  padding: 12px; font-weight: bold; font-size: 0.85rem;
  cursor: pointer; box-shadow: 0 4px 0 #000;
  text-decoration: none; text-align: center; display: block; width: 100%;
}
.btn-retro:active { transform: translateY(4px); box-shadow: 0 0 0 #000; }
.btn-whatsapp { background-color: #25d366; color: #fff; }
.btn-maps { background-color: #3498db; color: #fff; margin-top: 8px; }
.actions-box { margin-top: 5px; }