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

html {
    touch-action: manipulation;
}
body {
    overflow: hidden;
    font-family: Arial, sans-serif;
    width: 100vw;
    height: 100vh;
    touch-action: manipulation;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('jungle-bg.png') center/cover;
    z-index: -1;
}

.logout-btn {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #d4a02e;
    background: rgba(42,26,10,0.9);
    color: #f4d03f;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
}
.logout-btn:hover {
    background: rgba(212,168,75,0.3);
    color: #fff;
}

.character {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 25%;
    max-width: 150px;
    z-index: 10;
}

.character img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.character.character-bonus {
    width: 38%;
    max-width: 220px;
}

.logo {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 40%;
    max-width: 200px;
    z-index: 10;
}

.logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.slot-machine {
    position: relative;
    margin-top: 15%;
    width: 98%;
    max-width: 720px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bamboo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6% 5%;
    aspect-ratio: 0.75;
    width: 100%;
}

.frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('moldura.png') center/contain no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 5;
}

.reels-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    background: linear-gradient(180deg, rgba(40,65,40,0.95) 0%, rgba(25,50,25,0.98) 100%);
    border-radius: 6px;
    padding: 2%;
    box-sizing: border-box;
}

.reel {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(180deg, rgba(35,55,35,0.95) 0%, rgba(22,45,22,0.98) 100%);
    border-radius: 6px;
    padding: 4% 2%;
    position: relative;
    overflow: hidden;
}

.symbol {
    width: 80%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}

.symbol img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.symbol.winning {
    animation: winPulse 0.5s ease-in-out 4;
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); filter: brightness(1.5); }
}

.reel.spinning .symbol {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.controls {
    width: 90%;
    max-width: 520px;
    margin-bottom: 1%;
    margin-top: 2px;
}

.main-controls {
    margin-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3%;
}

.control-btn {
    background: radial-gradient(circle at 30% 30%, #f4d03f 0%, #c6941d 50%, #8b6914 100%);
    border: 3px solid #d4a02e;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #5a3a0f;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.4),
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
    aspect-ratio: 1;
    width: 50px;
}
.control-btn i {
    font-size: inherit;
}

.control-btn.small {
    width: 40px;
    font-size: 1.2rem;
}

.control-btn.spin-btn {
    width: 80px;
    font-size: 2.5rem;
    border-width: 4px;
}

.control-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(255,255,255,0.4);
}

.control-btn:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 2px 6px rgba(0,0,0,0.3);
}

.spin-btn.spinning {
    animation: pulse 0.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.info-bar {
    display: flex;
    justify-content: space-around;
    width: 90%;
    max-width: 520px;
    margin-bottom: 4px;
    margin-top: -32px;
}

.info-item {
    background: linear-gradient(180deg, #3a2a1a 0%, #2a1a0a 100%);
    border: 2px solid #d4a02e;
    border-radius: 12px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    min-width: 100px;
}

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

.info-value {
    font-size: 0.9rem;
    font-weight: bold;
    color: #f4d03f;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

@media (max-width: 600px) {
    .slot-machine {
        margin-top: 10%;
        width: 95%;
        max-width: 95%;
    }
    
    .character {
        width: 20%;
        max-width: 120px;
    }
    
    .logo {
        width: 35%;
        max-width: 180px;
    }
    
    .control-btn {
        width: 45px;
        font-size: 1.3rem;
    }
    
    .control-btn.spin-btn {
        width: 70px;
        font-size: 2.2rem;
    }
    
    .info-item {
        padding: 6px 8px;
        min-width: 85px;
    }
    
    .info-value {
        font-size: 0.75rem;
    }
}

.win-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: radial-gradient(circle at 30% 30%, #f4d03f 0%, #ff9500 50%, #d4770d 100%);
    border: 4px solid #ffd700;
    border-radius: 20px;
    padding: 20px 40px;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        inset 0 2px 10px rgba(255, 255, 255, 0.5),
        inset 0 -2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.win-notification.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: winGlow 0.5s ease-in-out infinite alternate;
}

@keyframes winGlow {
    0% { 
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.8),
            0 0 40px rgba(255, 215, 0, 0.6),
            inset 0 2px 10px rgba(255, 255, 255, 0.5);
    }
    100% { 
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 1),
            0 0 60px rgba(255, 215, 0, 0.8),
            inset 0 2px 10px rgba(255, 255, 255, 0.7);
    }
}

.win-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.8);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .win-notification {
        padding: 15px 30px;
    }
    
    .win-amount {
        font-size: 2rem;
    }
}

@media (max-height: 700px) {
    .character {
        top: 2%;
        width: 20%;
    }
    
    .logo {
        top: 2%;
        width: 35%;
    }
    
    .slot-machine {
        margin-top: 12%;
    }
    
    .info-bar {
        margin-bottom: 2px;
        margin-top: -28px;
    }
    
    .controls {
        margin-bottom: 0.5%;
    }
}

.bonus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.bonus-modal.show {
    opacity: 1;
    pointer-events: all;
}

.bonus-content {
    background: radial-gradient(circle at 30% 30%, #f4d03f 0%, #ff9500 50%, #d4770d 100%);
    border: 6px solid #ffd700;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 1),
        0 0 80px rgba(255, 215, 0, 0.8),
        inset 0 4px 20px rgba(255, 255, 255, 0.5);
    animation: bonusPulse 1s ease-in-out infinite;
}

@keyframes bonusPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.8),
            inset 0 4px 20px rgba(255, 255, 255, 0.5);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 
            0 0 60px rgba(255, 215, 0, 1),
            0 0 120px rgba(255, 215, 0, 0.9),
            inset 0 4px 20px rgba(255, 255, 255, 0.7);
    }
}

.bonus-title {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 1);
    margin-bottom: 20px;
}

.bonus-text {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.bonus-spins {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 215, 0, 1);
    margin: 20px 0;
}

.bonus-multiplier {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ff3333;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 51, 51, 0.8);
}

@media (max-width: 600px) {
    .bonus-content {
        padding: 30px 20px;
    }
    
    .bonus-title {
        font-size: 2rem;
    }
    
    .bonus-spins {
        font-size: 3rem;
    }
    
    .bonus-text {
        font-size: 1.2rem;
    }
    
    .bonus-multiplier {
        font-size: 1.4rem;
    }
}

.free-spins-counter {
    position: fixed;
    top: 5%;
    left: 5%;
    background: radial-gradient(circle at 30% 30%, #f4d03f 0%, #ff9500 50%, #d4770d 100%);
    border: 4px solid #ffd700;
    border-radius: 20px;
    padding: 15px 25px;
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        inset 0 2px 10px rgba(255, 255, 255, 0.5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    text-align: center;
}

.free-spins-counter.show {
    opacity: 1;
}

.free-spins-text {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
}

.free-spins-number {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 1);
}

@media (max-width: 600px) {
    .free-spins-counter {
        padding: 10px 20px;
    }
    
    .free-spins-text {
        font-size: 0.7rem;
    }
    
    .free-spins-number {
        font-size: 2rem;
    }
}

.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('jungle-bg.png') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    transition: opacity 0.5s;
}

.auth-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-container {
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 40px;
}

.auth-logo img {
    width: 80%;
    max-width: 250px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.auth-forms {
    position: relative;
}

.auth-form {
    background: linear-gradient(180deg, rgba(58, 42, 26, 0.95) 0%, rgba(42, 26, 10, 0.95) 100%);
    border: 4px solid #d4a02e;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    transition: opacity 0.3s, transform 0.3s;
}

.auth-form.hidden {
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.auth-form h2 {
    font-size: 2rem;
    color: #f4d03f;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    margin-bottom: 25px;
    font-weight: bold;
}

.auth-input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #d4a02e;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.auth-input:focus {
    border-color: #f4d03f;
    box-shadow: 0 0 10px rgba(244, 208, 63, 0.5);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    background: radial-gradient(circle at 30% 30%, #f4d03f 0%, #c6941d 50%, #8b6914 100%);
    border: 3px solid #d4a02e;
    border-radius: 15px;
    color: #5a3a0f;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.4),
        inset 0 2px 4px rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.auth-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.5),
        inset 0 2px 4px rgba(255,255,255,0.4);
}

.auth-btn:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.4),
        inset 0 2px 6px rgba(0,0,0,0.3);
}

.auth-switch {
    margin-top: 20px;
    color: #f4d03f;
    font-size: 0.9rem;
}

.auth-switch span {
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.auth-switch span:hover {
    color: #f4d03f;
}

@media (max-width: 600px) {
    .auth-container {
        width: 95%;
    }
    
    .auth-logo {
        margin-bottom: 30px;
    }
    
    .auth-form {
        padding: 25px 20px;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .auth-input {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .auth-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}
.wallet-modal.show {
    display: flex;
}
.wallet-modal-content {
    background: linear-gradient(180deg, rgba(58,42,26,0.98) 0%, rgba(42,26,10,0.98) 100%);
    border: 4px solid #d4a02e;
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.wallet-modal-header h2 {
    font-size: 1.4rem;
    color: #f4d03f;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wallet-modal-header h2 i {
    font-size: 1.2rem;
}
.wallet-close {
    background: none;
    border: none;
    color: #f4d03f;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.wallet-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.wallet-tab {
    flex: 1;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 2px solid #d4a02e;
    border-radius: 10px;
    color: #f4d03f;
    font-weight: bold;
    cursor: pointer;
}
.wallet-tab.active {
    background: #d4a02e;
    color: #5a3a0f;
}
.wallet-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 12px 0;
}
.wallet-panel .auth-input {
    margin-bottom: 12px;
}
.wallet-panel .auth-btn {
    margin-top: 8px;
}
.wallet-pix-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(212,168,46,0.4);
}
.wallet-pix-result p {
    color: #f4d03f;
    margin: 0 0 8px 0;
    font-size: 14px;
}

.deposit-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 20px;
}
.deposit-loading p {
    color: rgba(255,255,255,0.9);
    margin-top: 16px;
    font-size: 14px;
}
.deposit-loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(212,168,46,0.3);
    border-top-color: #f4d03f;
    border-radius: 50%;
    animation: deposit-spin 0.8s linear infinite;
}
@keyframes deposit-spin {
    to { transform: rotate(360deg); }
}
.deposit-qr-ready {
    animation: deposit-qr-appear 0.4s ease-out;
}
@keyframes deposit-qr-appear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.deposit-qr-img {
    width: 200px;
    height: 200px;
    margin: 10px 0;
}
.deposit-code {
    word-break: break-all;
    font-size: 11px;
    padding: 8px;
    margin: 10px 0;
    background: #222;
    border-radius: 8px;
}