/* ─────────────────────────────────────────────────────────────────────────────
   TÍTULO (js/ui/screens/screens-title.js)
   Una hoja por zona, como js/ui/screens/. Ver "Estilos (CSS)" en AGENTS.md.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── TITLE SCREEN ──────────────────────────────────────────────────────────── */
.screen--title {
  position: relative;
  background: linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  align-items: center;
  /* safe: si no cabe en pantallas bajas, se desplaza en vez de recortar arriba y abajo */
  justify-content: safe center;
  overflow-y: auto;
  gap: var(--sp-xl);
  padding: var(--sp-xl) var(--sp-lg);
}

@media (max-height: 700px) {
  .screen--title { gap: var(--sp-md); padding-top: var(--sp-lg); padding-bottom: var(--sp-lg); }
}

/* Insignias de Experto (Kanto, Johto…) en fila arriba a la izquierda */
.expert-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  gap: 6px;
}

.kanto-expert-badge {
  position: relative;
  cursor: default;
}

.kanto-expert-badge__tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 130px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-pixel);
  font-size: var(--fs-6);
  line-height: 1.7;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  z-index: 50;
  pointer-events: none;
  white-space: normal;
}

.kanto-expert-badge__tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 14px;
  border: 4px solid transparent;
  border-bottom-color: var(--black);
}

.kanto-expert-badge:hover .kanto-expert-badge__tooltip,
.kanto-expert-badge--open .kanto-expert-badge__tooltip { display: block; }

.title-logo {
  text-align: center;
}

.title-logo__main {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--yellow);
  text-shadow:
    3px 3px 0 var(--yellow-dark),
    6px 6px 0 rgba(0,0,0,.3);
  letter-spacing: 2px;
  line-height: 1.5;
  display: block;
}

.title-logo__sub {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: rgba(255,255,255,.7);
  margin-top: var(--sp-sm);
  letter-spacing: 3px;
}

.title-pokeball {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 5px solid var(--black);
  position: relative;
  overflow: hidden;
  animation: spin 8s linear infinite;
  cursor: pointer; /* CONTINUAR o JUGAR */
  /* En la columna flex del título se encogía solo en alto (un óvalo) cuando no cabía en
     pantallas bajas: no se encoge, y en ellas es más pequeña (abajo) */
  flex-shrink: 0;
}

@media (max-height: 700px) {
  .title-pokeball { width: 72px; height: 72px; }
}

.title-pokeball__top { position: absolute; top: 0; left: 0; right: 0; height: 50%; background: var(--white); }
.title-pokeball__bot { position: absolute; bottom: 0; left: 0; right: 0; height: 50%; background: var(--red); }
.title-pokeball__band { position: absolute; top: 50%; left: 0; right: 0; height: 5px; background: var(--black); transform: translateY(-50%); }
.title-pokeball__center {
  position: absolute; top: 50%; left: 50%;
  width: 24px; height: 24px;
  background: var(--white);
  border: 4px solid var(--black);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  z-index: 1;
}

@keyframes spin { to { transform: rotate(360deg); } }

.title-actions { display: flex; flex-direction: column; align-items: center; gap: var(--sp-sm); width: 100%; max-width: 240px; }

/* ── BOTÓN DE NOTAS — flotante abajo a la izquierda (main.js) ─────────────────── */
#global-controls {
  position: fixed;
  bottom: 12px;
  left: 12px;
  z-index: 9999;
  display: flex;
  gap: 6px;
  align-items: center;
}
.global-btn {
  font-size: 14px;
  line-height: 1;
  padding: 6px 8px;
  color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  cursor: pointer;
}
.global-btn:hover { background: rgba(0,0,0,.6); }
/* Solo se ve en el título: en las demás pantallas taparía los botones de abajo */
body:not(:has(.screen--title)) #btn-notes-global { display: none; }

/* ── NOTAS DE LA VERSIÓN (NotesPopup, js/ui/notes-popup.js) ─────────────────── */
.notes-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.notes-panel {
  background: #1a1814;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  max-width: 360px;
  max-height: 82vh;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.notes-panel__head { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
.notes-panel__title { font-family: 'Press Start 2P', monospace; font-size: 11px; color: rgba(255,255,255,.9); }
.notes-panel__close { font-size: 15px; color: rgba(255,255,255,.5); background: none; cursor: pointer; border-radius: 4px; }
.notes-panel__body { padding: 18px 18px; }
.notes-panel__version { font-family: 'Press Start 2P', monospace; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.notes-panel__list { padding: 0; gap: 14px; }
.notes-panel__item { align-items: flex-start; gap: 12px; }
.notes-panel__bullet { color: rgba(255,255,255,.4); font-size: 12px; }
.notes-panel__line { font-family: 'Press Start 2P', monospace; color: rgba(255,255,255,.8); }

/* Insignias de Experto y botón SINCRONIZAR del menú DATOS */
.kanto-expert-badge__img { height: auto; display: block; }
.datos-sync-btn { margin-top: 12px; }
