/* Reset Básico para coexistência Bootstrap/Tailwind */
:root {
    --bs-body-bg: #0f0f13;
    --bs-body-color: #e0e0e0;
    --bs-border-color: #27272a;
    --font-primary: 'Outfit', sans-serif;
}

body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--font-primary);
    overflow-x: hidden; /* Previne scroll horizontal indesejado */
}

/* Scrollbar Bonita */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #18181b;
}
::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* --- HOME GAME GRID --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas no mobile por padrão */
    gap: 15px;
    padding: 20px 0;
}

@media (min-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsivo em telas maiores */
        gap: 25px;
    }
}

.game-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    border: 2px solid transparent;
    aspect-ratio: 4/5; /* Mantém proporção de card vertical */
}

.game-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 255, 135, 0.3);
    z-index: 10;
    border-color: #00ff87;
}

.game-card:hover img {
    transform: scale(1.1);
}

/* Background com Overlay */
body.with-background::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 15, 19, 0.85), rgba(15, 15, 19, 0.95));
    z-index: -1;
    pointer-events: none;
}

/* --- AVIATOR STYLES --- */
#aviator-graph {
    position: relative;
    height: 500px; /* Altura fixa para Desktop */
    max-height: 60vh; /* Máximo relativo para Mobile */
    width: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.5);
    z-index: 10;
    pointer-events: none;
}

/* --- FORTUNE TIGER STYLES --- */
.fortune-container {
    background: radial-gradient(circle at center, #2a1b0a 0%, #000000 100%);
    border-radius: 20px;
    padding: 4px;
    box-shadow: 0 0 50px rgba(255, 165, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 450px; /* Limita largura no desktop */
    margin: 0 auto;
}

.fortune-container::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.12), transparent 60%);
    z-index: 0;
}

.slot-machine-frame {
    background: linear-gradient(180deg, #d4af37 0%, #fcd34d 20%, #b45309 50%, #fcd34d 80%, #d4af37 100%);
    border-radius: 18px;
    padding: 8px;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    z-index: 1;
}

.slot-screen {
    background: #1a0f05;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 5px;
    box-shadow: inset 0 0 30px #000;
    height: clamp(260px, 40vw, 340px);
}

/* Colunas (Reels) */
.reel-col {
    flex: 1;
    height: 100%; 
    position: relative;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.05);
}

/* A tira que se move */
.reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
}

/* Célula individual */
.slot-symbol {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.5));
}

/* Efeito de Blur APENAS quando gira rápido */
.reel-moving .slot-symbol {
    filter: blur(0px); /* Removido blur excessivo, deixa apenas o movimento rápido cuidar disso */
    opacity: 0.8;
}

.slot-symbol svg {
    width: 100%;
    height: 100%;
    max-width: 78px;
    max-height: 78px;
    shape-rendering: geometricPrecision; /* Melhora nitidez */
}

/* Animação de Vitória */
@keyframes winPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.3) drop-shadow(0 0 15px gold); }
    100% { transform: scale(1); filter: brightness(1); }
}

.slot-symbol.winner {
    animation: winPulse 1.5s infinite;
    z-index: 10;
}

/* Botão Girar */
.btn-spin {
    background: radial-gradient(circle at center, #fbbf24, #d97706);
    border: 4px solid #78350f;
    box-shadow: 0 6px 0 #451a03, 0 10px 15px rgba(0,0,0,0.5);
    transition: all 0.1s;
    text-shadow: 0 2px 2px rgba(0,0,0,0.3);
    cursor: pointer;
}
.btn-spin:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #451a03, 0 5px 10px rgba(0,0,0,0.5);
}
.btn-spin:disabled {
    filter: grayscale(0.8);
    cursor: not-allowed;
    transform: translateY(4px);
    box-shadow: 0 2px 0 #451a03;
}

/* --- MINES GAME --- */
.mines-container {
    max-width: 1100px;
    margin: 0 auto;
}

.mines-header {
    text-align: center;
    margin-bottom: 20px;
}

.mines-header h2 {
    font-weight: 800;
    letter-spacing: 0.5px;
}

.mines-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .mines-layout {
        grid-template-columns: 1fr;
    }
}

.mines-sidebar .card {
    background: rgba(24, 24, 27, 0.9);
    border-radius: 14px;
}

.mines-prize-info {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.mines-action-bar {
    margin-top: 12px;
}

.btn-cashout {
    background: linear-gradient(180deg, #fbbf24, #d97706);
    border: none;
    color: #0b0b0f;
    font-weight: 800;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.btn-cashout:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.mines-board {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9));
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

#mines-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    gap: 10px;
}

@media (max-width: 576px) {
    #mines-grid {
        grid-template-columns: repeat(5, minmax(46px, 1fr));
        gap: 8px;
    }
}

.mine-cell {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background: linear-gradient(180deg, #111827, #0b0f1a);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.08s ease, background 0.2s ease, border 0.2s ease;
    user-select: none;
}

.mine-cell:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 135, 0.6);
}

.mine-cell.revealed {
    background: radial-gradient(circle at center, #1f2937, #0f172a);
    border-color: rgba(255, 255, 255, 0.12);
    cursor: default;
}

.mine-cell.bomb {
    background: radial-gradient(circle at center, #7f1d1d, #3f0a0a);
    border-color: rgba(248, 113, 113, 0.8);
}

#mines-grid.disabled .mine-cell {
    opacity: 0.5;
    pointer-events: none;
}

/* --- BALLOON GAME --- */
.balloon-wrapper-full {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    height: 80vh;
    min-height: 500px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.game-area-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.the-balloon {
    width: 120px;
    height: 140px;
    background: radial-gradient(circle at 30% 30%, #ff5e5e, #c0392b);
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    position: relative;
    box-shadow: inset -10px -10px 20px rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: center;
}

.the-balloon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #c0392b;
}

.the-balloon::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 20%;
    width: 20px;
    height: 10px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    transform: rotate(-45deg);
}

.balloon-popped {
    background: transparent;
    box-shadow: none;
    transform: scale(1.5) !important;
}
.balloon-popped::after, .balloon-popped::before { display: none; }
.balloon-popped .balloon-text { display: none; }

.balloon-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 20;
}

@keyframes pumpPulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.02); filter: brightness(1.1); }
}

.game-controls-bar {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.bet-input-group {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.5);
    border-radius: 8px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,0.1);
}

.bet-input-field {
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    text-align: center;
    width: 80px;
    font-size: 1.2rem;
}
.bet-input-field:focus { outline: none; }

.bet-btn-value {
    background: #3f3f46;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}
.bet-btn-value:hover { background: #52525b; }

.action-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1rem;
    transition: all 0.2s;
    color: white;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.action-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.3); }

.btn-play { background: #00ff87; color: #000; box-shadow: 0 4px 0 #00cc6a; }
.btn-inflate { background: #3b82f6; box-shadow: 0 4px 0 #2563eb; }
.btn-collect { background: #fbbf24; color: #000; box-shadow: 0 4px 0 #d97706; }

.active-pump {
    transform: scale(0.98);
    background-color: #2563eb !important;
}

/* Toast */
.message-toast {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 100;
    display: none;
    pointer-events: none;
    white-space: nowrap;
}