﻿:root {
    --bg-app: #f1f5f9;
    --bg-ticket: #ffffff;
    --texto-principal: #0f172a;
    --border-color: #e2e8f0;
    --amarillo: #FFCA00;
    --texto-amarillo: #412E00;
    --azul-vibrante: #272149;
}

body.dark-mode {
    --bg-app: #0f172a;
    --bg-ticket: #1e293b;
    --texto-principal: #f8fafc;
    --border-color: #334155;
}


body {
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column; /* <--- ESTO corrige la posición del botón */
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-app);
    overflow: hidden;
}

    body.swal2-shown {
        overflow: hidden !important;
        padding-right: 0 !important; /* Evita que el scrollbar desaparezca y mueva todo */
    }

/* Fuerza al contenedor principal a mantener su posición */
#carrusel-container {
    will-change: transform;
    backface-visibility: hidden;
}

.ticket {
    background: var(--bg-ticket);
    width: 340px;
    min-height: 520px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre el texto y el switch */
}

/* Estilos para el banner de estado */
#status-alert {
    font-size: 11px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.alert-off {
    background-color: #ff4757;
    color: white;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.3);
}

.alert-on {
    background-color: #2ed573;
    color: white;
    box-shadow: 0 4px 10px rgba(46, 213, 115, 0.3);
}

/* 2. Estilos del Switch (Corregidos) */
.theme-switch {
    display: inline-block;
    height: 30px;
    position: relative;
    width: 60px; /* Un poco más ancho para los iconos */
}

    .theme-switch input {
        display: none;
    }

.slider {
    background-color: #333; /* Fondo por defecto (oscuro) */
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

    /* Círculo blanco que se mueve */
    .slider:before {
        background-color: white;
        bottom: 3px;
        content: "";
        height: 24px;
        left: 3px;
        position: absolute;
        transition: .4s;
        width: 24px;
        border-radius: 50%;
        z-index: 2;
    }

    /* Iconos de Sol y Luna */
    .slider .icon {
        font-size: 14px;
        z-index: 1;
        user-select: none;
    }

/* 3. Lógica de Animación (LO QUE FALTABA) */
input:checked + .slider {
    background-color: #f1c40f; /* Color soleado cuando está activo */
}

    input:checked + .slider:before {
        transform: translateX(30px); /* Mueve el círculo a la derecha */
    }


.main-wrapper {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Para navegadores móviles modernos */
    overflow: hidden;
    position: relative;
}

#carrusel-container {
    display: flex;
    width: 100%;
    will-change: transform;
}

.turno-card {
    min-width: 100%;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    text-align: center;
}

#status-alert {
    position: fixed;
    top: 20px;
    right: 10px;
    padding: 12px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1001;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

    #status-alert.alert-off {
        background: #FEE2E2 !important;
        color: #991B1B !important;
        border: 2px solid #FCA5A5 !important;
        font-weight: 700 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
        font-size: 0.75rem;
        animation: pulse-red 1.3s infinite;
        cursor: pointer;
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease; /* Transición suave */
}

    /* Clase para ocultar con estilo */
    .loading-overlay.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.offline-banner {
    position: fixed;
    top: 0;
    width: 100%;
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 8px;
    z-index: 10000;
    font-weight: bold;
}

body.modo-kiosko .printer-slot {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.modo-kiosko .hidden-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    opacity: 0;
    border: none;
    overflow: hidden;
    pointer-events: none;
    /* Esto evita que aparezca el teclado en la mayoría de tablets */
    inputmode: none;
    display: none !important; /* En Kiosko no los necesitamos visibles ni activos */
}

.text2-number {
    background: var(--azul-vibrante);
    color: white;
    font-size: 55px;
    font-weight: 900;
    padding: 20px;
    margin: 0 20px;
    border-radius: 12px;
}

.modo-kiosko .input-container {
    cursor: pointer;
    -webkit-user-select: none; /* Evita que el usuario seleccione el texto */
    user-select: none;
}

body.modo-kiosko .consulta-container {
    display: none !important;
}

.brand-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: all 0.5s ease-in-out;
    max-height: 80px;
}

.brand-name {
    color: var(--texto-principal);
    font-size: 1.1rem;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.btn-cancelar-turno {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
    /* Un rojo con mayor peso visual */
    color: #B91C1C !important;
    border: 2px solid #B91C1C !important;
    padding: 12px 10px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    margin: 10px auto !important;
    transition: all 0.2s ease !important;
}

    .btn-cancelar-turno:hover {
        background: #C53030 !important;
        color: #ffffff !important; /* Invertir colores al pasar el mouse es una buena práctica */
    }

/* Asegurar que el contenedor no oculte el botón al recargar */
.footer-btn-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 80px !important;
    width: 100% !important;
}

body.swal2-shown {
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.alert-title-message {
    background: var(--amarillo);
    color: var(--texto-amarillo);
    padding: 10px;
    font-weight: 900;
    transform: rotate(-1deg);
    margin: -10px 20px;
}


.area-tag {
    display: inline-block;
    background: var(--amarillo);
    color: var(--texto-amarillo);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 800;
    margin: 15px 0;
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 40px;
}

.alert-user-message {
    background: rgba(0,0,0,0.05);
    padding: 15px;
    margin: 15px 20px;
    border-radius: 10px;
    color: var(--texto-principal);
}

#visto-placeholder {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

#btn-visto {
    background: #22c55e;
    color: white;
    border: none;
    padding: 18px;
    width: 100%;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 10px 15px rgba(34, 197, 94, 0.3);
}

.swiper-counter {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    /*background: rgba(0, 0, 0, 0.05);*/
    /*padding: 4px 10px;*/
    padding-right: 10px;
    border-radius: 12px;
    color: #666;
}

.swipe-hint {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    animation: fade-in-out 3s infinite;
}

@keyframes fade-in-out {
    0%, 100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

#carrusel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .dot.active {
        width: 20px;
        border-radius: 10px;
        background: #2563eb; /* Color azul de tu tema o el que prefieras */
    }

@keyframes pulse-red {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Estado ON: Discreto y elegante */
#status-alert.alert-on {
    background: #dcfce7 !important;
    color: #16a34a !important;
    border: 1px solid #86efac !important;
    animation: none;
    opacity: 0.8;
}

.alert-off {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fca5a5;
}

.alert-on {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
}

input:checked + .slider {
    background-color: var(--azul-vibrante);
}

    input:checked + .slider:before {
        transform: translateX(24px);
    }

.btn-visto-contextual {
    background: #22c55e;
    color: white;
    border: none;
    padding: 15px;
    width: 80%;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    cursor: pointer;
}

.container-btn {
    display: flex;
    flex-direction: column;
    padding-top: 30px;
    text-align: center;
}

    .container-btn a {
        display: inline-block;
        background: var(--btn-color, #2563eb); /*Usa tu color principal */
        color: white;
        padding: 12px 25px;
        border-radius: 20px;
        text-decoration: none;
        font-weight: bold;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transition: transform 0.2s;
    }

        .container-btn a:hover {
            transform: scale(1.1);
        }

.turno-card.llamado {
    /*border: 2px solid #ef4444;*/
    background-color: #fef2f2;
}

.turno-card.notificado {
    /*border: 2px solid #f59e0b;*/ /* Color ámbar/alerta suave */
    background-color: #fffbeb;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.1);
}

    .turno-card.notificado .alert-title-message {
        color: #b45309;
    }

    .turno-card.notificado .text2-number {
        color: #92400e;
    }

.badge-visto {
    background: #dcfce7;
    color: #166534;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    border: 1px solid #bbf7d0;
}

#carrusel-container {
    display: flex; /* Cambiado de block a flex para alinear tarjetas */
    width: 100%;
    min-height: 380px;
    margin: 0 auto;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform; /* Optimiza el movimiento */
}

.turno-card {
    flex: 0 0 100%; /* Cada tarjeta ocupa exactamente el 100% del ancho */
    width: 100%;
    box-sizing: border-box;
    /* Asegúrate de que no tengan floats o posiciones absolutas que las saquen de flujo */
}

.card-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
    justify-content: center;
    min-height: 120px; /* Ajusta este valor (80px logo + 30px nombre aprox) */
    text-align: center;
}

.mini-brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain; /* Evita que logos alargados se deformen */
    background-color: #f8f9fa; /* Placeholder visual mientras descarga */
    border-radius: 8px;
    display: block;
    content-visibility: auto; /* Optimización de renderizado */
}

.mini-brand-name {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--texto-secundario);
    letter-spacing: 0.5px;
}

/* Estado de error: Rojo vibrante */
.error-field {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.05) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

/* Estado de éxito: Verde esmeralda */
.success-field {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.05) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* El prefijo +58 se ve diferente para que parezca fijo */
.prefix {
    color: var(--text-sec);
    font-weight: 800;
    font-size: 1.6rem;
    margin-right: 8px;
    opacity: 0.7;
}

.btn-spacebar {
    background-color: #f0f0f0; /* Un gris claro para diferenciarlo de las letras */
    flex: 2 !important; /* Hacerlo un poco más ancho si el layout lo permite */
    font-weight: bold;
    color: #555;
}

.consulta-container {
    margin: 30px auto;
    text-align: center;
    width: 100%;
    max-width: 400px;
}


.btn-consulta {
    background-color: #FFD700;
    border: 2px solid #007bff;
    color: #212121 !important;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .btn-consulta:active {
        background: #007bff;
        color: white;
        transform: scale(0.98);
    }

.btn-test-alert {
    background: #64748b;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .btn-test-alert.testing {
        background: #f59e0b; /* Naranja mientras prueba */
        transform: scale(0.95);
    }

    .btn-test-alert:active {
        transform: translateY(1px);
    }

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg, #ffffff);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.offline-banner {
    position: fixed;
    top: 0;
    width: 100%;
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 8px;
    z-index: 10000;
    font-weight: bold;
}

/* Modal Juegos */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 90%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.game-container {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    color: #333;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #888;
}

.game-options {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.game-opt-btn {
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: #007bff;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

/* Botón Flotante */
.btn-float-game {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffc107;
    border: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    cursor: pointer;
}

/* Memoria */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.mem-card {
    aspect-ratio: 1;
    background: #eee;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

    .mem-card.flip {
        background: white;
        border: 2px solid #007bff;
    }
    /* Modifica o añade esto a tu CSS */
    .mem-card.matched {
        background: #d4edda;
        border-color: #28a745;
        color: #155724;
        cursor: default;
        /* En lugar de visibility:hidden, lo hacemos semitransparente para que se vea el tablero completo al final */
        opacity: 0.6;
    }

/* Animación para el mensaje de victoria */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-back {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.game-wrapper {
    background: #f0f2f5;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    font-family: sans-serif;
}

.game-area {
    position: relative;
    width: 100%;
    height: 300px; /* Altura fija para el juego */
    background-image: radial-gradient(#d1d1d1 1px, transparent 1px);
    background-size: 20px 20px; /* Efecto de malla */
}

.game-target {
    position: absolute;
    width: 55px;
    height: 55px;
    padding: 5px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, opacity 0.3s;
    animation: spawnLogo 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

@keyframes spawnLogo {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

.player-logo {
    position: absolute;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
    z-index: 5;
    /* Quitamos transition para que sea 1:1 con el dedo */
    transition: none;
    /* Forzamos a la GPU a renderizar el objeto independientemente */
    will-change: transform;
    pointer-events: none; /* El logo no recibe clics, los recibe el layer transparente */
}

.obstacle {
    position: absolute;
    width: 35px;
    height: 35px;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: none;
    will-change: top;
}

/*BUSCAMINAS*/
.mines-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    background: #bbb;
    border: 3px solid #777;
    margin: 0 auto;
    max-width: 320px;
}

.mine-cell {
    aspect-ratio: 1;
    background: #eee;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #999;
}

    .mine-cell.revealed {
        background: #ddd;
        box-shadow: none;
        border: 1px solid #bbb;
    }

    .mine-cell.flagged {
        background: #ffeaa7;
    }

    /* Colores de los números */
    .mine-cell[data-num="1"] {
        color: blue;
    }

    .mine-cell[data-num="2"] {
        color: green;
    }

    .mine-cell[data-num="3"] {
        color: red;
    }

    .mine-cell[data-num="4"] {
        color: darkblue;
    }

/* Animación de Sacudida */
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.explosion-shake {
    animation: shake 0.5s;
    background-color: rgba(255, 0, 0, 0.2) !important;
    transition: background-color 0.1s;
}

/* Mejora visual de las minas al explotar */
.mine-cell.revealed.mine-bomb {
    background-color: #ff7675 !important;
    animation: pulseRed 0.5s infinite alternate;
}

@keyframes pulseRed {
    from {
        box-shadow: inset 0 0 10px #d63031;
    }

    to {
        box-shadow: inset 0 0 20px #ff7675;
    }
}

/* Overlay de estado final (Victoria/Derrota) */
#mines-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.mines-final-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mejora visual de las celdas */
.mine-cell {
    transition: background-color 0.2s, transform 0.1s;
}

    .mine-cell:active {
        transform: scale(0.9);
    }

    .mine-cell.revealed.mine-bomb {
        background-color: #ff7675 !important;
        font-size: 1.3rem;
    }

/*snake*/
.snake-main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #2f3542;
    padding: 15px;
    border-radius: 15px;
    max-height: 95vh; /* Evita que se salga de la pantalla */
    overflow-y: auto;
}

.game-score-label {
    color: white;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.canvas-wrapper {
    border: 4px solid #57606f;
    line-height: 0;
    box-shadow: inset 0 0 10px #000;
}

/* Estilo de la Cruceta / D-Pad */
.snake-dpad {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dpad-row {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dpad-btn {
    width: 60px;
    height: 60px;
    background: #57606f;
    border: none;
    color: white;
    font-size: 1.5rem;
    border-radius: 10px;
    margin: 5px;
    box-shadow: 0 4px #2f3542;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul al tocar en móviles */
    user-select: none;
    touch-action: manipulation; /* Optimiza el botón para toques rápidos */
}

    .dpad-btn:active {
        box-shadow: 0 0 #2f3542;
        transform: translateY(4px);
        background: var(--primary, #007bff);
    }

.dpad-center {
    width: 60px;
    height: 60px;
}
