/* =============================================
   JUNGLO GAME
   ============================================= */

/* ---- Loading Screen ---- */
.junglo-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFEEB3;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.6s ease;
}

.junglo-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.junglo-loading img {
    width: 60px;
    height: 60px;
    animation: bananaSpinner 1.2s linear infinite;
}

@keyframes bananaSpinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---- Game Wrapper ---- */
.junglo-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none !important;
    border: 1px solid var(--color-border);
}

.junglo-canvas-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #2a1a0a;
}

.junglo-canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ---- HTML Overlay Controls ---- */
.junglo-overlay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 420px;
    padding: 24px 28px;
    background: url('../assets/junglo/woodentexture.png') center/cover no-repeat;
    border: 3px solid #C8A23C;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    box-shadow: none !important;
}

/* PLAY button */
.junglo-play-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: #C8A23C;
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 6px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 0 12px rgba(200, 162, 60, 0.3);
    transition: transform 0.15s ease, text-shadow 0.15s ease;
    text-transform: uppercase;
}

.junglo-play-btn:hover {
    transform: scale(1.08);
    text-shadow:
        0 2px 6px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(200, 162, 60, 0.5);
}

.junglo-play-btn:active {
    transform: scale(0.96);
}

/* BET label */
.junglo-bet-label {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #C8A23C;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Sound + Bet input row */
.junglo-bet-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.junglo-volume-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.junglo-volume-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.junglo-sound-icon {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.junglo-bet-input {
    font-family: 'Poppins', sans-serif;
    width: 140px;
    padding: 8px 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #3b2511;
    background: #C8A23C;
    border: 2px solid #A68428;
    border-radius: 8px;
    outline: none;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.junglo-bet-input:focus {
    border-color: #E0C050;
    box-shadow: 0 0 8px rgba(200, 162, 60, 0.4);
}

.junglo-bet-input::placeholder {
    color: rgba(59, 37, 17, 0.4);
}

/* Level buttons row */
.junglo-modes-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    flex-wrap: wrap;
}

.junglo-mode-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #C8A23C;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #C8A23C;
    border-radius: 20px;
    padding: 5px 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-align: center;
}

.junglo-mode-btn:hover {
    background: rgba(200, 162, 60, 0.2);
    border-color: #E0C050;
}

.junglo-mode-btn.active {
    background: #C8A23C;
    color: #3b2511;
    border-color: #C8A23C;
    box-shadow: 0 0 8px rgba(200, 162, 60, 0.5);
    font-weight: 800;
}

/* ---- Cashout Popup ---- */
#junglo-cashout-popup {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 20;
    animation: popupFadeIn 0.4s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cashout-popup-content {
    background: url('../assets/junglo/woodentexture.png') center/cover no-repeat;
    border: 3px solid #C8A23C;
    border-radius: 20px;
    padding: 36px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: none !important;
    animation: popupBounce 0.5s ease;
    min-width: 260px;
}

@keyframes popupBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    70% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cashout-popup-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #C8A23C;
    letter-spacing: 3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.cashout-popup-amount {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.cashout-popup-mult {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #C8A23C;
    opacity: 0.8;
}

.cashout-popup-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #3b2511;
    background: #C8A23C;
    border: 2px solid #A68428;
    border-radius: 12px;
    padding: 12px 40px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: 8px;
}

.cashout-popup-btn:hover {
    transform: scale(1.05);
}

.cashout-popup-btn:active {
    transform: scale(0.96);
}

/* ---- Win History Section ---- */
.junglo-history {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 16px;
    background: var(--color-surface);
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.junglo-history-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.junglo-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.junglo-history-item {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
}

.junglo-history-item.win {
    background: rgba(51, 204, 51, 0.1);
    color: #33cc33;
    border: 1px solid rgba(51, 204, 51, 0.2);
}

.junglo-history-item.loss {
    background: rgba(255, 70, 70, 0.1);
    color: #ff4646;
    border: 1px solid rgba(255, 70, 70, 0.2);
}