@font-face {
    font-family: 'Sink';
    src: url('../fonts/Sink.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

html,
body,
* {
    font-family: 'Sink', sans-serif !important;
}
/* --- Estilos Globales de la Marca --- */
:root {
    --irrestricta-green: #1b3022;
    --irrestricta-gold: #d4a373;
    --background-light: #fdfcf9;
    --text-dark: #333;
    --brand-font: 'Sink', sans-serif;
    --body-font: 'Sink', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-dark);
    font-family: var(--body-font);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

h1, h2, h3, .brand-font {
    font-family: var(--brand-font);
    text-transform: uppercase;
    font-weight: 700;
}

/* --- Panel Superior (Header) --- */
header {
    background-color: var(--irrestricta-green);
    padding: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--irrestricta-gold);
}

.brand-wrapper img {
    max-width: 120px;
    height: auto;
    margin-bottom: 10px;
}

.brand-wrapper h1 {
    color: #fff;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

/* --- Navegación --- */
.nav-pills {
    justify-content: center;
    padding: 20px 0;
}

.nav-pills .nav-link {
    color: var(--text-dark);
    font-family: var(--brand-font);
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-pills .nav-link.active {
    background-color: var(--irrestricta-green) !important;
    color: #fff !important;
}

/* --- EL CONTENEDOR DE LA ARCADE (Responsivo) --- */
#game-container {
    width: 100%;           
    max-width: 800px;      /* Se mantiene centrado en PC */
    margin: 0 auto;        
    background-color: #2d1e16; 
    border: 15px solid #3d2b1f; 
    border-radius: 20px;
    padding: 10px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7);
    box-sizing: border-box; /* Crucial para que el borde no rompa el ancho */
}

.marquee {
    border-bottom: 3px solid var(--irrestricta-gold);
    padding: 8px 0;
    background: rgba(0,0,0,0.5);
    margin-bottom: 10px;
    border-radius: 5px 5px 0 0;
}

.marquee h3 {
    color: var(--irrestricta-gold);
    font-size: 1.1rem;
}

/* --- ÁREA DE PANTALLA DEL JUEGO --- */
.contenedor-juego {
    width: 100%;
    height: 350px; /* Aumentamos de 250px a 350px para darle más altura */
    position: relative;
    background: linear-gradient(#fdfcf9, #e9e4d7);
    overflow: hidden;
    border: 6px solid #111;
    border-radius: 5px;
}

/* Colores de niveles */
.mediodia { background-color: #f1dca7 !important; }
.tarde { background-color: #e67e22 !important; }
.noche { background-color: #1b3022 !important; }
.noche .score { color: #fdfcf9; }

/* --- ENTIDADES DEL JUEGO --- */
.dino {
    width: 84px;
    height: 84px;
    position: absolute;
    bottom: 22px;
    left: 42px;
    z-index: 2;
    background: url(../img/kegpet.png) repeat-x 0px 0px;
    background-size: 336px 84px;
    /* transform: scaleX(-1); Refleja la imagen para que mire al frente */
}

.dino-corriendo {
    animation: animarDino 0.25s steps(2) infinite;
}

.dino-estrellado {
    background-position-x: -252px;
}

.suelo {
    width: 200%;
    height: 42px;
    position: absolute;
    bottom: 0;
    left: 0;
    background: url(../img/suelo.png) repeat-x 0px 0px;
    background-size: 50% 42px;
}

/* --- OBSTÁCULOS VARIADOS --- */
.cactus {
    width: 50px;
    height: 80px;
    position: absolute;
    bottom: 22px;
    z-index: 10;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
}

/* Clases específicas para cada imagen - Tamaños incrementados */
.obs-botella { background-image: url(../img/botella.png); width: 48px; height: 100px; }
.obs-lupulo { background-image: url(../img/lupulo.png); width: 65px; height: 65px; }
.obs-taphead { background-image: url(../img/taphead.png); width: 75px; height: 85px; }
.obs-foamhead { background-image: url(../img/foamhead.png); width: 75px; height: 85px; }

/* Obstáculo volador */
.volador {
    bottom: 140px !important; /* Aumentado de 90px a 140px para dar más espacio abajo */
    animation: flotar 0.6s ease-in-out infinite alternate;
}

@keyframes flotar {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

/* --- DECORACIÓN DE FONDO (Tótems en las Esquinas) --- */
.totem-corner {
    position: absolute;
    width: 120px;
    height: 120px;
    z-index: 1; /* Por encima del fondo pero bajo KegPet */
    opacity: 0; /* Ocultos por defecto */
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none; /* No interfieren con los clics */
    transition: opacity 1s, transform 1s;
}

.totem-corner.visible {
    opacity: 0.4; /* Se vuelven visibles */
}

.totem-tl {
    top: -20px;
    left: -20px;
    background-image: url(../img/totem1.png);
    transform: rotate(15deg);
}
.totem-tr {
    top: -20px;
    right: -20px;
    background-image: url(../img/totem2.png);
    transform: rotate(-15deg);
}
.totem-bl {
    bottom: 10px;
    left: -30px;
    background-image: url(../img/totem3.png);
    transform: rotate(-10deg);
    height: 150px;
}
.totem-br {
    bottom: 10px;
    right: -30px;
    background-image: url(../img/totem4.png);
    transform: rotate(10deg);
    height: 150px;
}

/* Mostrar más los tótems cuando el juego está parado o en Game Over */
.contenedor-juego.pausado .totem-corner {
    opacity: 0.6;
}

/* Nubes normales */
.nube {
    width: 110px;
    height: 32px;
    position: absolute;
    z-index: 0;
    background: url(../img/nube.png) no-repeat;
    background-size: contain;
}

.nubei {
    width: 120px;
    height: 60px;
    position: absolute;
    z-index: 0;
    background: url(../img/nubei.png) no-repeat;
    background-size: contain;
}

/* --- INTERFAZ (UI) --- */
.score {
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: var(--brand-font);
    font-size: 32px;
    color: #e67e22; /* Naranja Irrestricta */
    font-weight: bold;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
    z-index: 10;
}

.game-over {
    display: none;
    position: absolute;
    top: 40%; /* Un poco más arriba del centro */
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--brand-font);
    font-size: 42px; /* Un poco más grande para resaltar */
    color: #e74c3c;
    text-align: center;
    z-index: 20;
    width: 100%;
    background: none; /* Quitamos el fondo blanco/transparente */
    padding: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Sombra para que se lea bien sobre cualquier fondo */
}

/* --- CONTROLES ARCADE --- */
.arcade-controls {
    border-top: 3px solid var(--irrestricta-gold);
    padding-top: 15px;
    margin-top: 10px;
}

.control-text {
    color: #fff;
    font-size: 0.8rem;
}

.btn-arcade {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.2);
}

/* --- MEDIA QUERIES PARA MÓVILES (Borde a Borde) --- */
@media (max-width: 600px) {
    #game-container {
        width: 100vw;      /* Ocupa el 100% del ancho de la ventana */
        border-left: none; /* Eliminamos bordes laterales para ganar espacio */
        border-right: none;
        border-radius: 0;  /* Quitamos redondeo para pegar a los bordes */
        padding: 5px;
        margin: 0;         
    }

    .contenedor-juego {
        height: 280px;     /* Pantalla más compacta */
        border-width: 3px; 
    }

    .marquee h3 {
        font-size: 0.9rem;
    }

    .score {
        font-size: 26px;
        top: 5px;
        right: 10px;
    }
}

/* --- ANIMACIONES --- */
@keyframes animarDino {
    from { background-position-x: -84px; }
    to { background-position-x: -252px; }
}

/* --- MENÚ PREMIUM (ESTILO IRRESTRICTA) --- */
.menu-premium {
    background-color: var(--irrestricta-green);
    color: #fff;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    border: 2px solid var(--irrestricta-gold);
}

.category-header {
    display: inline-block;
    background-color: var(--irrestricta-gold);
    color: var(--irrestricta-green);
    padding: 10px 40px;
    font-family: var(--brand-font);
    font-size: 1.6rem;
    letter-spacing: 3px;
    border-radius: 50px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.menu-item {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.menu-item h4 {
    font-family: var(--brand-font);
    font-size: 1.3rem;
    color: var(--irrestricta-gold);
    margin-bottom: 2px;
}

.menu-item p, .menu-item small {
    color: #e0e0e0;
}

.price-box {
    text-align: right;
    font-family: var(--brand-font);
}

.price-main {
    color: var(--irrestricta-gold);
    font-size: 1.3rem;
    font-weight: bold;
}

.tap-number {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--irrestricta-gold);
    color: var(--irrestricta-green);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 15px;
}

.tap-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: 0.3s;
}

.tap-item:hover {
    background: rgba(255,255,255,0.1);
}

.border-end-gold {
    border-right: 1px solid rgba(212, 163, 115, 0.3);
}

.menu-deco-icon {
    width: 40px;
    height: auto;
    opacity: 0.8;
}

.menu-watermark {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 250px;
    opacity: 0.1;
    pointer-events: none;
}

.kegpet-deco {
    width: 60px;
    height: auto;
    position: absolute;
    top: -45px;
    left: 40px;
    z-index: 5;
}

.brewer-bg {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 300px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 768px) {
    .border-end-gold {
        border-right: none;
        border-bottom: 1px solid rgba(212, 163, 115, 0.3);
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }
}

/* --- FOOTER PREMIUM --- */
.site-footer {
    position: relative;
    background: linear-gradient(180deg, #1b3022 0%, #142218 100%);
    color: rgba(255, 255, 255, 0.88);
    padding: 3.5rem 0 0;
    margin-top: auto;
    overflow: hidden;
}

.footer-accent {
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--irrestricta-gold) 20%,
        #e8c9a0 50%,
        var(--irrestricta-gold) 80%,
        transparent 100%
    );
}

.footer-main {
    padding: 2.5rem 0 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 992px) {
    .footer-brand {
        align-items: flex-start;
    }
}

.footer-logo {
    width: 88px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.footer-brand-name {
    font-family: var(--brand-font);
    font-size: 1.05rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 0.35rem;
}

.footer-brand-tagline {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--irrestricta-gold);
    margin: 0;
    opacity: 0.95;
}

.footer-label {
    font-family: var(--brand-font);
    font-size: 0.75rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--irrestricta-gold);
    margin-bottom: 1.25rem;
}

.footer-social-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 992px) {
    .footer-social-list {
        align-items: flex-start;
    }
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(212, 163, 115, 0.25);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.88rem;
    transition: border-color 0.25s, background-color 0.25s, transform 0.25s, color 0.25s;
}

.footer-social-link:hover {
    color: var(--irrestricta-gold);
    border-color: var(--irrestricta-gold);
    background: rgba(212, 163, 115, 0.08);
    transform: translateY(-1px);
}

.footer-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--irrestricta-gold);
    flex-shrink: 0;
}

.footer-social-icon svg {
    width: 100%;
    height: 100%;
}

.footer-social-text {
    letter-spacing: 0.3px;
}

.footer-address {
    font-style: normal;
    line-height: 1.7;
}

.footer-address strong {
    display: block;
    font-family: var(--brand-font);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-address a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.25s;
}

.footer-address a:hover {
    color: var(--irrestricta-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(212, 163, 115, 0.15);
    padding: 1.25rem 0 1.75rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
}

@media (max-width: 991px) {
    .site-footer {
        padding-top: 2.5rem;
    }

    .footer-main {
        padding: 1.5rem 0 1.25rem;
    }

    .footer-label {
        margin-bottom: 1rem;
    }

    .footer-address strong {
        margin-bottom: 0.35rem;
    }
}