/* Custom Variables for Mariachi Fest - Premium Mexican Theme */
:root {
    --bg-dark: #0f0a0d;       /* Negro muy oscuro con tono vino */
    --bg-wine: #3c0c21;       /* Vino / Burdeos profundo */
    --bg-wine-light: #5c1435; /* Vino más claro para hover/tarjetas */
    --primary: #ffd700;       /* Dorado brillante de gala */
    --primary-glow: rgba(255, 215, 0, 0.4);
    --secondary: #d11a2a;     /* Rojo mexicano festivo */
    --green: #1f8a48;         /* Verde bandera */
    --white: #f5f2eb;         /* Blanco hueso / papel envejecido */
    --text-muted: #cbb8ac;    /* Texto secundario apagado */
    --font-fancy: 'Cinzel', Georgia, serif;
    --font-sans: 'Montserrat', Helvetica, Arial, sans-serif;
    --shadow-premium: 0 12px 40px rgba(0, 0, 0, 0.7);
    --border-gold: 2px solid var(--primary);
}

/* Reset Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--white);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(92, 20, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-wine);
    border: 2px solid var(--bg-dark);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--bg-wine-light);
}

/* ==========================================================================
   DECORACIONES: Papel Picado y Luces
   ========================================================================== */

/* Papel Picado */
.papel-picado-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 130px;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.papel-banderilla {
    width: 13%;
    max-width: 110px;
    min-width: 50px;
    height: 110px;
    transform-origin: top center;
    animation: swing 3.5s ease-in-out infinite alternate;
    animation-delay: var(--delay);
}

.papel-banderilla svg {
    width: 100%;
    height: 100%;
}

.papel-banderilla svg path {
    fill: var(--color);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
}

@keyframes swing {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

/* Luces de Fiesta */
.luces-fiesta {
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    pointer-events: none;
    z-index: 11;
}

.foco {
    width: 14px;
    height: 22px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background-color: var(--color);
    position: relative;
    box-shadow: 0 0 10px var(--color);
    animation: flicker var(--time) infinite alternate;
}

.foco::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 3px;
    width: 8px;
    height: 6px;
    background: #333;
    border-radius: 2px;
}

@keyframes flicker {
    0%, 100% {
        opacity: 0.4;
        box-shadow: 0 0 2px var(--color);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 18px var(--color), 0 0 30px var(--color);
    }
}

/* Partículas Flotantes */
.decoraciones-flotantes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.nota-flotante, .particula-dorada {
    position: absolute;
    color: var(--primary);
    opacity: 0;
    pointer-events: none;
    animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(105vh) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* ==========================================================================
   ESTILOS COMUNES Y TARJETAS MEXICANAS
   ========================================================================== */

.mexican-card {
    background: linear-gradient(135deg, var(--bg-wine) 0%, #200411 100%);
    border: 3px solid var(--primary);
    border-radius: 12px;
    box-shadow: var(--shadow-premium);
    padding: 30px;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Marco tradicional mexicano en esquinas */
.mexican-card::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed var(--primary);
    pointer-events: none;
    border-radius: 8px;
    opacity: 0.5;
}

.gold-text {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    font-weight: bold;
}

/* Botones */
button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

.btn-standard {
    background-color: var(--secondary);
    color: var(--white);
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 25px;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(209, 26, 42, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-standard:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: #e32b3b;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.btn-standard:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Brillo deslizable en hover */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 100%
    );
    transform: skewX(-25deg);
    transition: 0.75s;
    pointer-events: none;
}

button:hover .btn-shine {
    left: 150%;
}

/* ==========================================================================
   HERO / PRESENTACIÓN
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 20px 60px 20px;
    text-align: center;
    z-index: 2;
}

/* Silueta de plaza colonial de fondo */
.skyline-plaza {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 350px;
    background-image: linear-gradient(to top, var(--bg-dark) 20%, transparent 100%);
    pointer-events: none;
    opacity: 0.45;
}

/* Dibujamos siluetas coloniales sencillas mediante CSS */
.skyline-plaza::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: currentColor;
    color: #080507;
    clip-path: polygon(
        0% 100%, 0% 40%, 5% 40%, 5% 20%, 8% 20%, 8% 40%, 12% 40%, 15% 10%, 18% 40%,
        25% 40%, 25% 30%, 32% 30%, 32% 40%, 40% 40%, 45% 0%, 50% 40%, 58% 40%,
        62% 25%, 65% 25%, 65% 40%, 75% 40%, 78% 15%, 83% 40%, 90% 40%, 93% 30%, 100% 30%, 100% 100%
    );
}

.hero-content {
    max-width: 850px;
    background: rgba(15, 10, 13, 0.85);
    border: 3px double var(--primary);
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: var(--shadow-premium), inset 0 0 30px rgba(92, 20, 53, 0.4);
    position: relative;
    backdrop-filter: blur(8px);
}

.decorative-border-mexican {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid var(--primary);
    pointer-events: none;
    opacity: 0.4;
}

.logo-title {
    font-family: var(--font-fancy);
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--primary);
    text-shadow: 
        0 2px 4px #000, 
        0 0 15px rgba(255, 215, 0, 0.6), 
        0 0 30px rgba(199, 0, 57, 0.4);
    margin-bottom: 20px;
}

.pulse {
    animation: textPulse 2.5s infinite alternate;
}

@keyframes textPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.03); }
}

.subtitle {
    font-size: 1.25rem;
    color: var(--white);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

/* Botón Jugar Hero */
.btn-jugar-ahora {
    position: relative;
    background: linear-gradient(135deg, var(--secondary) 0%, #990022 100%);
    color: var(--white);
    padding: 20px 50px;
    font-size: 1.6rem;
    font-family: var(--font-fancy);
    font-weight: 900;
    border-radius: 50px;
    border: 3px solid var(--primary);
    box-shadow: 
        0 10px 30px rgba(199, 0, 57, 0.5), 
        0 0 15px var(--primary-glow);
    text-transform: uppercase;
    letter-spacing: 2px;
    overflow: hidden;
    margin-bottom: 50px;
}

.btn-jugar-ahora:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(199, 0, 57, 0.7), 
        0 0 25px rgba(255, 215, 0, 0.8);
    background: linear-gradient(135deg, #e32b3b 0%, var(--secondary) 100%);
}

/* Cartas de stats en Hero */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(92, 20, 53, 0.4);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(92, 20, 53, 0.7);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.stat-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==========================================================================
   VIDEOJUEGO CONTENEDOR
   ========================================================================== */

.game-section-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.game-card {
    background: linear-gradient(180deg, #240513 0%, var(--bg-dark) 100%);
    padding: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 10, 13, 0.9);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 15px;
    font-weight: bold;
    z-index: 3;
}

.game-score-board {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
}

.multiplier-badge {
    background-color: var(--secondary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
    animation: pulseGlow 1s infinite alternate;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 3px var(--secondary); }
    100% { box-shadow: 0 0 10px var(--secondary); }
}

.game-status-center {
    font-size: 1rem;
}

.mode-indicator {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-hud-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lives-container {
    display: flex;
    gap: 5px;
    font-size: 1.3rem;
}

.heart {
    filter: drop-shadow(0 0 3px red);
    transition: transform 0.2s ease;
}

.heart.lost {
    transform: scale(0);
    width: 0;
    margin: 0;
    opacity: 0;
}

.sound-toggle {
    background: var(--bg-wine);
    border: 1px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    transition: 0.2s;
}

.sound-toggle:hover {
    background: var(--bg-wine-light);
    transform: scale(1.1);
}

/* Envoltura del Canvas y overlays */
.canvas-wrapper {
    position: relative;
    width: 100%;
    background-color: #000;
    border: 3px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 800 / 500;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #2e0817 0%, #000000 100%);
}

/* Overlays en pantalla */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 10, 13, 0.93);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 30px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.game-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.overlay-title {
    font-family: var(--font-fancy);
    font-size: 2.8rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.overlay-desc {
    font-size: 1.1rem;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--white);
}

.overlay-stats {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#recordInputContainer {
    margin-bottom: 25px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px dashed var(--primary);
    padding: 15px 25px;
    border-radius: 8px;
}

.congrats-text {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

#playerNameInput {
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    color: var(--white);
    padding: 8px 15px;
    font-size: 1rem;
    border-radius: 4px;
    text-align: center;
    margin-right: 10px;
    font-weight: bold;
}

#playerNameInput:focus {
    outline: none;
    box-shadow: 0 0 10px var(--primary-glow);
}

.overlay-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Controles Móviles */
.mobile-controls {
    display: none; /* Se activa en móviles por CSS responsivo */
    justify-content: space-around;
    gap: 20px;
    margin-top: 15px;
    width: 100%;
}

.btn-control {
    flex: 1;
    background: var(--bg-wine);
    border: 2px solid var(--primary);
    color: var(--white);
    padding: 15px 0;
    font-size: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    user-select: none;
    -webkit-user-select: none;
}

.btn-control:active {
    background: var(--bg-wine-light);
    transform: scale(0.95);
}

/* Tabla de Posiciones */
.leaderboard-section {
    margin-top: 30px;
    background: rgba(15, 10, 13, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
}

.leaderboard-section h3 {
    font-family: var(--font-fancy);
    color: var(--primary);
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.leaderboard-list {
    list-style: none;
    max-width: 400px;
    margin: 0 auto;
}

.leaderboard-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 15px;
    margin-bottom: 5px;
    background: rgba(92, 20, 53, 0.2);
    border-radius: 4px;
    font-weight: 600;
}

.leaderboard-list li:nth-child(odd) {
    background: rgba(15, 10, 13, 0.4);
}

.leaderboard-list li.highlight {
    border: 1px solid var(--primary);
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary);
}

/* Guía / Leyenda */
.game-legend {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    padding-top: 20px;
}

.game-legend h4 {
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
}

.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(92, 20, 53, 0.2);
    padding: 6px 10px;
    border-radius: 4px;
}

.legend-icon {
    font-size: 1.2rem;
}

.legend-item.special {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.legend-item.bad {
    background: rgba(209, 26, 42, 0.15);
}

/* ==========================================================================
   SECCIÓN DE MÚSICA / RADIO RETRO
   ========================================================================== */

.music-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.music-section h2 {
    font-family: var(--font-fancy);
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.music-section p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Chasis de radio retro */
.radio-player {
    max-width: 450px;
    margin: 0 auto;
    background: linear-gradient(180deg, #5c200c 0%, #290d04 100%);
    border: 4px solid var(--primary);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    padding: 25px;
    position: relative;
}

.radio-retro {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.radio-dial {
    height: 60px;
    background-color: #1a0803;
    border: 2px solid #5c200c;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dial-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 140, 0, 0.25) 0%, transparent 80%);
}

.dial-needle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background-color: var(--secondary);
    box-shadow: 0 0 5px var(--secondary);
    transition: left 0.5s ease;
}

.frequency {
    font-family: monospace;
    font-size: 1.1rem;
    color: #ff9900;
    letter-spacing: 2px;
    z-index: 2;
    text-shadow: 0 0 5px #ff9900;
}

.radio-speaker-grill {
    height: 80px;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0, 0, 0, 0.4) 4px, rgba(0, 0, 0, 0.4) 8px),
        linear-gradient(to bottom, #1e0903, #0f0401);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 6px;
}

.radio-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn-radio-play {
    background-color: var(--green);
    color: var(--white);
    padding: 12px 30px;
    font-weight: bold;
    font-size: 1rem;
    border-radius: 25px;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 10px rgba(31, 138, 72, 0.4);
    text-transform: uppercase;
    width: 100%;
}

.btn-radio-play:hover {
    background-color: #27a256;
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.btn-radio-play.playing {
    background-color: var(--secondary);
    box-shadow: 0 4px 10px rgba(209, 26, 42, 0.4);
}

.radio-select {
    background: #110502;
    border: 1px solid var(--primary);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    cursor: pointer;
}

/* Visualizador de ondas */
.visualizer-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    height: 40px;
    margin-top: 15px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.visualizer-container.active {
    opacity: 1;
}

.bar {
    width: 8px;
    height: 5px;
    background-color: var(--primary);
    border-radius: 4px 4px 0 0;
    transition: height 0.1s ease;
}

/* ==========================================================================
   SECCIÓN DE CONTRATACIÓN / RESERVA
   ========================================================================== */

.booking-section {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.booking-section h2 {
    font-family: var(--font-fancy);
    font-size: 2.2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 10px;
}

.booking-section p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 35px;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(15, 10, 13, 0.8);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    color: var(--white);
    padding: 12px 15px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.btn-reservar {
    background-color: var(--secondary);
    color: var(--white);
    padding: 15px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 8px;
    border: 2px solid var(--primary);
    box-shadow: 0 6px 15px rgba(209, 26, 42, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.btn-reservar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background-color: #e32b3b;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer-section {
    background-color: #080507;
    border-top: 4px solid var(--primary);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-decoration {
    height: 10px;
    background: linear-gradient(to right, var(--green) 33.3%, var(--white) 33.3%, var(--white) 66.6%, var(--secondary) 66.6%);
    margin-bottom: 20px;
    border-radius: 4px;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ==========================================================================
   RESPONSIVO / DISEÑO ADAPTATIVO
   ========================================================================== */

@media (max-width: 768px) {
    .logo-title {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.05rem;
    }
    
    .btn-jugar-ahora {
        font-size: 1.3rem;
        padding: 15px 35px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
    }
    
    .stat-icon {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    .game-overlay h2 {
        font-size: 2rem;
    }

    /* Ajustes específicos para los overlays en celular */
    .game-overlay {
        padding: 15px;
    }

    .overlay-title {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    .overlay-desc {
        font-size: 0.85rem !important;
        margin-bottom: 15px !important;
        max-width: 90%;
        line-height: 1.3;
    }

    .overlay-stats {
        font-size: 1.1rem !important;
        margin-bottom: 15px !important;
        gap: 6px !important;
    }

    #recordInputContainer {
        margin-bottom: 12px !important;
        padding: 6px 12px !important;
    }

    .congrats-text {
        font-size: 0.85rem !important;
        margin-bottom: 5px !important;
    }

    #playerNameInput {
        padding: 5px 10px !important;
        font-size: 0.85rem !important;
        width: 130px;
    }

    .overlay-buttons {
        gap: 8px !important;
    }

    .btn-standard {
        padding: 8px 20px !important;
        font-size: 0.8rem !important;
        border-width: 1.5px !important;
    }

    /* Activar los controles en móviles */
    .mobile-controls {
        display: flex;
    }

    .legend-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo-title {
        font-size: 2.2rem;
    }

    .game-header {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

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

    /* Ajustes extremos de pantalla pequeña para que quepan todos los elementos en el Canvas */
    .overlay-desc {
        display: none !important; /* Esconder la descripción para ahorrar valioso espacio vertical */
    }

    .overlay-title {
        font-size: 1.15rem !important;
        margin-bottom: 8px !important;
    }

    .btn-standard {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
    }

    .overlay-stats {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
        gap: 4px !important;
    }

    #recordInputContainer {
        padding: 4px 8px !important;
        margin-bottom: 8px !important;
    }

    #playerNameInput {
        padding: 3px 6px !important;
        font-size: 0.8rem !important;
        width: 110px;
    }
}

/* Embedded inside portal container optimizations */
body.embedded {
    min-height: auto !important;
    background-image: none;
    background-color: transparent;
}
body.embedded .hero-section {
    display: none !important;
}
body.embedded .papel-picado-container,
body.embedded .luces-fiesta {
    display: none !important;
}
body.embedded .game-section-container {
    margin-top: 10px;
    padding: 0 5px;
}
body.embedded .game-card {
    padding: 10px;
}
body.embedded .game-header {
    padding: 8px 12px;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    body.embedded .game-header {
        font-size: 0.8rem;
    }
    body.embedded .game-score-board {
        font-size: 0.95rem;
    }
}
