/* ================================
   Win Overlay
   ================================ */

.overlay {
    position: absolute;
    width: 105%;
    height: 105%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.overlay.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.win-container {
    text-align: center;
    padding: 40px;
    background: #ecf0f1;
    border-radius: 24px;
    border: 6px solid #bdc3c7;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
    max-width: 1000px;
}

.win-title {
    font-size: 50px;
    line-height: 1.2;
    padding: 0 10px;
    margin-bottom: 25px;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2));
    text-transform: uppercase;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.win-image-container {
    width: 900px;
    height: 900px;
    margin: 0 auto 25px;
    border-radius: 16px;
    overflow: hidden;
    border: 8px solid #2c3e50;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.3);
}

.win-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.win-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.win-stat {
    background: #2c3e50;
    padding: 15px 25px;
    border-radius: 12px;
    border: 2px solid #34495e;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.win-stat-label {
    display: block;
    font-size: 60px;
    color: #bdc3c7;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.win-stat-value {
    font-size: 60px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.win-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Ad Confirm Dialog */
.ad-confirm-container {
    text-align: center;
    padding: 60px 70px;
    background: #ecf0f1;
    border-radius: 32px;
    border: 6px solid #bdc3c7;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    min-width: 800px;
}

.ad-confirm-icon {
    font-size: 120px;
    line-height: 1;
    margin-bottom: 20px;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.2));
    animation: pulse 1.8s ease infinite;
}

.ad-confirm-title {
    font-size: 80px;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.15));
    margin-bottom: 25px;
}

.ad-confirm-text {
    font-size: 52px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 45px;
}

.ad-confirm-reward {
    font-size: 72px;
    font-weight: 900;
    color: #e67e22;
}

.ad-confirm-coin {
    width: 56px;
    height: 56px;
    vertical-align: middle;
    margin-left: 6px;
}

.ad-confirm-buttons {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ad-confirm-yes-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: 4px solid #1e8449;
    box-shadow: 0 8px 0 #145a32, 0 12px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 54px;
    font-weight: 900;
    padding: 24px;
    border-radius: 20px;
    text-transform: uppercase;
    transition: transform 0.12s, box-shadow 0.12s;
}

.ad-confirm-yes-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 11px 0 #145a32, 0 16px 30px rgba(0, 0, 0, 0.35);
}

.ad-confirm-yes-btn:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #145a32;
}

.ad-confirm-no-btn {
    background: #95a5a6;
    border: 4px solid #7f8c8d;
    box-shadow: 0 6px 0 #5d6d7e;
    color: #fff;
    font-size: 46px;
    font-weight: 700;
    padding: 20px;
    border-radius: 20px;
    text-transform: uppercase;
    transition: transform 0.12s, box-shadow 0.12s;
}

.ad-confirm-no-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #5d6d7e;
}

.ad-confirm-no-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #5d6d7e;
}

/* "+100 🪙" flash animation */
.ad-reward-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 9999;
    animation: rewardFlash 1.4s ease forwards;
}

@keyframes rewardFlash {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.6);
    }

    30% {
        opacity: 1;
        transform: translate(-50%, -70%) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -130%) scale(1);
    }
}

.ad-flash-coin {
    width: 72px;
    height: 72px;
    vertical-align: middle;
    margin-left: 10px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* ================================
   Settings Overlay
   ================================ */

/* (settings-btn positioning now handled by #global-header flexbox) */

.settings-container {
    text-align: center;
    padding: 40px 50px;
    background: #ecf0f1;
    border-radius: 32px;
    border: 8px solid #bdc3c7;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
    min-width: 900px;
}

.settings-title {
    font-size: 100px;
    margin-bottom: 40px;
    background: linear-gradient(to bottom, #9b59b6, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.2));
    text-transform: uppercase;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.setting-item {
    background: #2c3e50;
    padding: 20px 25px;
    border-radius: 16px;
    border: 3px solid #34495e;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #ecf0f1;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.setting-icon {
    font-size: 42px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-slider {
    flex: 1;
    height: 32px;
    -webkit-appearance: none;
    appearance: none;
    background: #1a1a2e;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 58px;
    height: 58px;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.volume-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(to bottom, #f1c40f, #f39c12);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.slider-value {
    min-width: 70px;
    font-size: 46px;
    font-weight: 900;
    color: #f1c40f;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Confetti */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    top: -20px;
    animation: confettiFall 3s ease-in-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(600px) rotate(720deg);
        opacity: 0;
    }
}