* ==========================================================================

   Play Zone - Estilos Globales, Header & Footer (main_layout.css)

   ========================================================================== */



/* Importación de fuentes tipográficas */

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



:root {

  --bg: #F5F6FB;

  --bg-2: #ECEEF7;

  --surface: #FFFFFF;

  --surface-2: #EEF0FA;

  --ink: #12131C;

  --muted: #6B7080;

  --accent: #6C4CF0;

  --accent-glow: rgba(108, 76, 240, 0.22);

  --accent-2: #0FAE9B;

  --accent-2-glow: rgba(15, 174, 155, 0.22);

  --line: #E4E5F1;

  --topbar-bg: rgba(255, 255, 255, 0.9);

  --radius: 14px;

  --notch: 16px;

}



html[data-tema="oscuro"] {

  --bg: #0B0E17;

  --bg-2: #0F1320;

  --surface: #141926;

  --surface-2: #191f30;

  --ink: #ECEEF7;

  --muted: #8890A6;

  --accent: #7C5CFC;

  --accent-glow: rgba(124, 92, 252, 0.45);

  --accent-2: #17E3B8;

  --accent-2-glow: rgba(23, 227, 184, 0.4);

  --line: #232a3d;

  --topbar-bg: rgba(20, 25, 38, 0.85);

}



* { box-sizing: border-box; }



html, body { height: 100%; }



body {

  margin: 0;

  display: flex;

  flex-direction: column;

  min-height: 100vh;

  background:

    radial-gradient(circle at 15% -10%, var(--accent-glow), transparent 45%),

    radial-gradient(circle at 100% 0%, var(--accent-2-glow), transparent 40%),

    var(--bg);

  color: var(--ink);

  font-family: 'Inter', system-ui, -apple-system, sans-serif;

  -webkit-font-smoothing: antialiased;

  transition: background-color 0.2s ease, color 0.2s ease;

}



.visually-hidden {

  position: absolute;

  width: 1px; height: 1px;

  overflow: hidden;

  clip: rect(0 0 0 0);

}



/* ---------- TOPBAR / HEADER ---------- */

.topbar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 16px;

  padding: 18px 28px;

  background: var(--topbar-bg);

  backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--line);

  flex-wrap: wrap;

  position: sticky;

  top: 0;

  z-index: 50;

}



.topbar-left { display: flex; align-items: center; gap: 14px; }



.brand-link {

  display: flex;

  align-items: center;

  gap: 14px;

  text-decoration: none;

  color: inherit;

}



.logo { height: 42px; width: auto; }



.brand-text { display: flex; flex-direction: column; }



.brand-title {

  font-family: 'Orbitron', sans-serif;

  font-weight: 800;

  font-size: 1.15rem;

  letter-spacing: 0.02em;

  background: linear-gradient(90deg, var(--ink), var(--accent-2));

  -webkit-background-clip: text;

  background-clip: text;

  -webkit-text-fill-color: transparent;

}



.brand-subtitle { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }



.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }



.select-metodo {

  appearance: none;

  background: var(--surface-2);

  border: 1.5px solid var(--line);

  color: var(--ink);

  font-family: 'Inter', sans-serif;

  font-weight: 600;

  font-size: 0.9rem;

  padding: 10px 36px 10px 14px;

  border-radius: 10px;

  cursor: pointer;

  background-image: linear-gradient(45deg, transparent 50%, var(--accent-2) 50%), linear-gradient(135deg, var(--accent-2) 50%, transparent 50%);

  background-position: calc(100% - 18px) center, calc(100% - 13px) center;

  background-size: 5px 5px, 5px 5px;

  background-repeat: no-repeat;

}



.select-metodo:focus-visible,

.btn-auth:focus-visible,

.btn-tema:focus-visible {

  outline: 2.5px solid var(--accent-2);

  outline-offset: 2px;

}



/* Botón Tema */

.btn-tema {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 38px;

  height: 38px;

  border-radius: 10px;

  border: 1.5px solid var(--line);

  background: var(--surface-2);

  color: var(--ink);

  cursor: pointer;

  transition: border-color 0.15s ease, transform 0.15s ease;

}



.btn-tema:hover { border-color: var(--accent-2); transform: translateY(-1px); }

.btn-tema svg { width: 18px; height: 18px; }

.btn-tema .icon-luna { display: none; }

html[data-tema="oscuro"] .btn-tema .icon-sol { display: none; }

html[data-tema="oscuro"] .btn-tema .icon-luna { display: block; }



/* Botones Auth */

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



.btn-auth {

  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 9px 16px;

  border-radius: 10px;

  font-family: 'Inter', sans-serif;

  font-weight: 700;

  font-size: 0.88rem;

  text-decoration: none;

  border: 1.5px solid transparent;

  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;

  white-space: nowrap;

}



.btn-auth svg { width: 16px; height: 16px; flex-shrink: 0; }



.btn-auth-login { background: transparent; border-color: var(--line); color: var(--ink); }

.btn-auth-login:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }



.btn-auth-registro {

  background: linear-gradient(135deg, var(--accent), #5A3CE0);

  color: #fff;

  box-shadow: 0 6px 16px -6px var(--accent-glow);

}

.btn-auth-registro:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px var(--accent-glow); }



.btn-auth-panel {

  background: linear-gradient(135deg, var(--accent-2), #0C8F80);

  color: #fff;

  box-shadow: 0 6px 16px -6px var(--accent-2-glow);

}

.btn-auth-panel:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -6px var(--accent-2-glow); }



/* ---------- FOOTER ---------- */

.site-footer {

  flex-shrink: 0;

  border-top: 1px solid var(--line);

  background: var(--bg-2);

  padding: 32px 28px 24px;

  margin-top: auto;

}



.footer-inner {

  display: flex;

  justify-content: space-between;

  align-items: center;

  flex-wrap: wrap;

  gap: 16px;

  max-width: 1100px;

  margin: 0 auto;

}



.footer-brand { font-family: 'Orbitron', sans-serif; font-weight: 800; font-size: 1rem; color: var(--ink); }



.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.88rem; }

.footer-links a:hover { color: var(--accent-2); }



.footer-copy { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 18px; }



/* Responsive Base Header */

@media (max-width: 560px) {

  .topbar { padding: 14px 16px; }

  .topbar-right { width: 100%; justify-content: space-between; }

  .auth-actions { width: 100%; justify-content: flex-end; }

}





/* ==========================================================================

   BLOQUE MÓVIL — Play Zone

   Todo lo de aquí para abajo SOLO aplica si <html> tiene la clase "es-movil"

   (la agrega header.php según el hardware real, funcione o no el modo

   "Sitio web para computadoras"). Si borras este bloque, todo vuelve a

   comportarse exactamente como en desktop.

   ========================================================================== */



html.es-movil {

  --header-h: 56px; /* valor de respaldo; el JS lo corrige con la medida real */

}



/* ---- Header: todo en UNA sola fila, compacto ---- */

html.es-movil .topbar {

  padding: 8px 12px;

  gap: 8px;

  flex-wrap: nowrap;           /* nunca más una 2da fila con hueco */

}

html.es-movil .topbar-left { gap: 8px; }

html.es-movil .topbar-right { gap: 8px; flex-wrap: nowrap; }

html.es-movil .logo { height: 26px; }

html.es-movil .brand-subtitle { display: none; }

html.es-movil .brand-title { font-size: 0.85rem; }



/* Anula la regla vieja de 560px que forzaba el hueco enorme */

html.es-movil .topbar-right { width: auto; justify-content: flex-end; }

html.es-movil .auth-actions { width: auto; justify-content: flex-end; gap: 6px; }



html.es-movil .select-metodo {

  padding: 5px 22px 5px 8px;

  font-size: 0.7rem;

  border-radius: 8px;

}



html.es-movil .btn-tema { width: 30px; height: 30px; }

html.es-movil .btn-tema svg { width: 15px; height: 15px; }



/* Botones de auth (Panel/Login/Registro): quedan solo con el ícono,

   sin tocar el HTML — el texto se colapsa con font-size:0 y el SVG

   no se afecta porque su tamaño está en px fijos, no en em/rem */

html.es-movil .btn-auth {

  font-size: 0;

  padding: 8px;

  gap: 0;

  border-radius: 10px;

}

html.es-movil .btn-auth svg { width: 18px; height: 18px; }



/* ---- Scroll y footer: la página crece con el contenido, nada se recorta ---- */

html.es-movil,

html.es-movil body {

  height: auto;          /* antes era height:100% fijo -> cortaba contenido */

}

html.es-movil .panel-layout {

  min-height: 0;          /* sin piso forzado -> adiós hueco antes del footer */

}

html.es-movil .panel-content {

  overflow: visible;      /* antes era "hidden" -> eso bloqueaba el scroll */

}



/* ---- Sidebar: oculto por defecto, arranca DEBAJO del header ---- */

html.es-movil .side-menu {

  position: fixed;

  top: var(--header-h);

  left: -100%;

  height: calc(100vh - var(--header-h));

  width: min(220px, 78vw);

  min-width: min(220px, 78vw);

  padding: 60px 14px 18px;

  z-index: 45;

  transition: left 0.2s ease;

}

html.es-movil .side-menu:not(.colapsado) {

  left: 0;

  box-shadow: 8px 0 24px -12px rgba(0,0,0,0.4);

}



/* ---- Botón hamburguesa: flota fijo en el hueco de la izquierda,

        debajo del header, siempre visible para abrir/cerrar el menú ---- */

html.es-movil .side-menu .btn-menu-toggle {

  position: fixed !important;

  top: calc(var(--header-h) + 10px);

  right: 12px;

  z-index: 55;

  margin-bottom: 0;

  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.35);

  width: 48px;              /* 👈 antes 38px por defecto */

  height: 48px;              /* 👈 antes 38px por defecto */

}



/* Blindaje: si CUALQUIER otra regla le mete "transform" al sidebar,

   lo anulamos siempre en móvil — eso es lo que atrapa al botón fijo */

html.es-movil .side-menu {

  transform: none !important;

}







/* El header ya NO persigue el scroll en móvil: se va con la página normalmente */

html.es-movil .topbar {

  position: static;

  padding: 8px 12px;

  gap: 6px;

}



/* Logo arriba, nombre de la plataforma debajo (marca en columna) */

html.es-movil .brand-link {

  flex-direction: column;

  align-items: flex-start;

  gap: 2px;

}

html.es-movil .logo { height: 22px; }

html.es-movil .brand-title { font-size: 0.78rem; line-height: 1; }



/* Controles (select de precio, tema, auth) en una sola fila compacta */

html.es-movil .topbar-right { gap: 6px; }