/* reel-game.css - v1.0.6 */
/* Styles for the 5-Reel Game */

* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

#reel-game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 200;
    display: flex;
}

.reel-game-container {
    position: relative;
    width: 100%;
    height: 100%;
    padding: calc(200px + env(safe-area-inset-top)) 15px calc(40px + env(safe-area-inset-bottom)) 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#reel-game-back-button {
    position: absolute;
    top: calc(25px + env(safe-area-inset-top));
    right: 15px;
    width: 30px;
    height: 29px;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.reel-game-window {
    width: 100%;
    height: 240px;
    background-image: url('./images/slotreelbackground.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.reel-game-column {
    overflow: hidden;
    height: 240px;
    border-right: 2px solid #b16c27;
    transition: box-shadow 0.5s ease-out;
}

.reel-game-column:last-child {
    border-right: none;
}

.reel-game-strip {
    display: flex;
    flex-direction: column;
    transition: transform 2.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: top left;
}

.reel-game-symbol {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    font-size: 20px;
    font-family: 'Graduate', serif;
    color: white;
}

.symbol-icon-wrapper {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
}

.symbol-icon-wrapper.win {
    animation: pulseWin 0.6s infinite alternate;
    position: relative;
    z-index: 10;
    background: rgba(255, 215, 0, 0.1);
    outline: 2px solid #FFD700;
    box-shadow: 0 0 15px #FFD700, 0 0 5px #FFFFFF inset;
    text-shadow: 0 0 10px #000, 0 0 15px #FFD700;
    color: #fff;
}

.reel-game-controls {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 15px 0 0 0;
    margin-top: auto;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.reel-game-info-bar {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 400px;
    gap: 10px;
}

.info-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #444;
}

.info-label {
    display: block;
    font-family: 'Rye', cursive;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 4px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.info-value {
    font-family: 'Graduate', serif;
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
}

#reel-game-spin-button {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    padding: 5px 25px;
    width: 180px;
    height: 65px;
    cursor: pointer;
    font-size: 20px;
    font-family: 'Graduate', serif;
    position: relative;
}

#reel-game-spin-button span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dfc117;
    width: 100%;
    text-align: center;
    line-height: 1.2;
}

#reel-game-spin-button:active {
    transform: scale(0.95);
}

.spin-subtext {
    font-size: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: normal;
    color: #ccc;
    margin-top: 15px;
    display: inline-block;
}

.spin-button-row {
    width: 100%;
    max-width: 400px;
    position: relative;
    height: 65px;
}

.spin-col {
    display: flex;
    align-items: center;
}

.spin-col-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    gap: 5px;
}

.spin-col-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.spin-col-right {
    gap: 5px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.bet-adjust-button {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #b16c27;
    border-radius: 50%;
    color: #FFD700;
    font-family: 'Graduate', serif;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;

}

.bet-adjust-button:active {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(0.95);
}

.bet-adjust-button:disabled {
    color: #777;
    border-color: #555;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    transform: none;
}

@keyframes reel-game-fast-spin {
    from {
        transform: translateY(-3600px);
    }

    to {
        transform: translateY(-1200px);
    }
}

.reel-game-strip.reel-game-spinning {
    filter: blur(3px);
    animation: reel-game-fast-spin 0.5s linear infinite;
}

@keyframes pulseWin {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.05);
    }
}

#reel-game-win-display {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#reel-game-win-title {
    font-family: 'Graduate', serif;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    /* Default 'You Win' style */
    font-size: 30px;
    color: #ffffff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease-out;
}

#reel-game-win-number {
    font-family: 'Graduate', serif;
    font-size: 52px;
    font-weight: bold;
    color: #FFD700;
    text-shadow:
        0 0 20px rgba(0, 0, 0, 1),
        0 0 15px #FFD700,
        3px 3px 3px rgba(0, 0, 0, 0.8);
    transition: font-size 0.3s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* This is the same rule you had, but now targets the number */
#reel-game-win-display.large-number #reel-game-win-number {
    font-size: 40px;
}

/* These are copies of your overlay styles, but for the in-game win title */
#reel-game-win-title.win-tier-1 {
    font-size: 30px;
    color: #FFD700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
}

#reel-game-win-title.win-tier-2 {
    font-size: 40px;
    color: #FFD700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
}

#reel-game-win-title.win-tier-3 {
    font-size: 50px;
    color: #FFD700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
    animation: pulse-soft 1.5s infinite;
}

#reel-game-win-title.win-tier-4 {
    font-size: 60px;
    color: #FFD700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
    animation: pulse-strong 1s infinite;
}

#reel-game-win-display.large-number {
    font-size: 40px;
}

#reel-game-win-display.visible {
    opacity: 1;
    visibility: visible;
}

.reel-game-win-icon {
    height: 40px;
    width: 40px;
    margin-right: 5px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

#reel-game-status-bar {
    position: absolute;
    top: calc(160px + env(safe-area-inset-top));
    left: 15px;
    right: 15px;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 0 12px;
    box-sizing: border-box;
}

.reel-game-counters-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

#reel-game-dust-counter {
    display: flex;
    align-items: center;
    padding: 5px 0 5px 5px;
    font-family: 'Lilita One', cursive;
    color: #fff;
    font-size: 1.1em;
    text-shadow: 1px 1px 1px #000;
}

#reel-game-ticket-counter {
    display: flex;
    align-items: center;
    font-family: 'Lilita One', cursive;
    color: #fff;
    font-size: 1.1em;
    text-shadow: 1px 1px 1px #000;
}

#reel-game-ticket-counter img {
    width: 35px;
    height: 20px;
    margin-right: 5px;
}

#reel-game-level-container {
    display: flex;
    align-items: center;
    font-family: 'Lilita One', cursive;
    color: #fff;
    font-size: 1.1em;
    text-shadow: 1px 1px 1px #000;
    padding: 5px 0;
}

#reel-game-dust-counter img {
    width: 28px;
    height: 28px;
    margin-right: 6px;
}

#reel-game-jackpot-text {
    position: absolute;
    top: calc(25px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    font-family: 'Graduate', serif;
    font-size: 1.2em;
    color: #FFD700;
    font-weight: bold;
    animation: pulse-text-glow 3s infinite;
}

@keyframes pulse-text-glow {

    0%,
    100% {
        text-shadow:
            0 0 0px #FFD700,
            0 0 5px #FFD700,
            0 0 10px rgba(255, 215, 0, 0.5),
            2px 2px 2px rgba(0, 0, 0, 0.8);
    }

    50% {
        text-shadow:
            0 0 10px #FFD700,
            0 0 15px #FFD700,
            0 0 20px rgba(255, 215, 0, 0.7),
            2px 2px 2px rgba(0, 0, 0, 0.8);
    }
}

#reel-game-level-text {
    margin-right: 8px;
}

.level-bar-outer {
    width: 60px;
    height: 18px;
    background-color: #333;
    border: 2px solid #000;
    border-radius: 9px;
    padding: 2px;
    box-sizing: border-box;
}

#reel-game-level-bar-inner {
    width: 0%;
    height: 100%;
    background-color: #FFD700;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.reel-game-frame-wrapper {
    width: 100%;
    max-width: 400px;
    background: #4a2c0c;
    border: 5px solid transparent;
    border-radius: 15px;
    padding: 15px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    background-image: linear-gradient(#2e1c05, #2e1c05),
        linear-gradient(110deg, #5c3a1e 35%, #b38040 50%, #5c3a1e 65%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    background-size: 200% 100%;

    animation: shimmer-idle 3s linear infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* --- ANIMATIONS --- */

@keyframes shimmer-idle {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@keyframes neon-race {
    0% {
        background-position: 0% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes window-fever-pulse {
    0% {
        box-shadow: inset 0 0 20px #000;
        border-color: #aa00aa;
    }

    100% {
        box-shadow: inset 0 0 60px #000;
        border-color: #ff00ff;
    }
}

/* --- FEVER MODE (Free Spins) --- */

#reel-game-screen.free-spin-active .reel-game-frame-wrapper {
    background-image: linear-gradient(#1a051a, #1a051a),
        linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 200% 100%;
    animation: neon-race 1s linear infinite;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.6), inset 0 0 30px #1a051a;
    border-width: 6px;
}

#reel-game-screen.free-spin-active .reel-game-window {
    animation: window-fever-pulse 1.5s ease-in-out infinite alternate;
    background-color: #111;
}

#reel-game-screen.free-spin-active .reel-game-column {
    border-right: 1px solid rgba(255, 0, 255, 0.4);
}

.reel-ticket-button {
    width: 60px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #b16c27;
    border-radius: 10px;
    color: #FFD700;
    font-family: 'Graduate', serif;
    font-size: 9.5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;

}

.max-bet-button {
    width: 60px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #b16c27;
    border-radius: 10px;
    color: #FFD700;
    font-family: 'Graduate', serif;
    font-size: 9.5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;

}

.max-bet-button:active {
    background-color: #c00000;
    transform: scale(0.95);
}

.max-bet-button:disabled {
    color: #777;
    border-color: #555;
    background-color: rgba(160, 0, 0, 0.3);
    cursor: not-allowed;
    transform: none;
}

.reel-ticket-button.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 0 10px #FFD700;
}

.reel-ticket-button:disabled {
    color: #777;
    border-color: #555;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.bet-increment-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.bet-increment-button {
    flex-grow: 1;
    max-width: 120px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid #b16c27;
    border-radius: 10px;
    color: #FFD700;
    font-family: 'Graduate', serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;

}

.bet-increment-button.active {
    background-color: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 0 10px #FFD700;
}

.bet-increment-button:disabled {
    color: #777;
    border-color: #555;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: not-allowed;
    box-shadow: none;
}

.reel-reward-bar-wrapper {
    width: 100%;
    max-width: 400px;
    background-image: url('./images/slotreelbackground.jpg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 20px;
    padding: 10px 15px;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    color: #000;
    border: 2px solid #FFD700;
}

.reel-reward-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 5px;
}

.reel-reward-titles {
    display: flex;
    flex-direction: column;
}

.reel-reward-title {
    font-weight: 700;
    font-size: 13px;
    color: #dfc117;
    font-family: 'Rye', serif;
}

.reel-reward-subtitle {
    font-size: 11px;
    color: #ebebeb;
    font-family: 'Graduate', serif;
}

.reel-reward-timer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 10px;
    font-weight: 700;
    color: #dfc117;
    flex-shrink: 0;
    margin-left: 10px;
    font-family: 'Rye', serif;
}

#reel-reward-timer-value {
    font-size: 10px;
    color: #ebebeb;
    font-family: 'Graduate', serif;
}

.reel-reward-track-container {
    position: relative;
    width: 100%;
    height: 100px;
    margin-top: 15px;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    padding-top: 70px;
}

.reel-reward-track {
    position: relative;
    width: 100%;
    height: 6px;
    background-color: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    z-index: 1;
}

#reel-reward-progress-bar {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 72px;
    height: 5px;
    background-color: #dfc117;
    border-radius: 5px;
    z-index: 1;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.5s ease-out;
    border: 0.8px solid #000000;
    box-sizing: border-box;
}

.reel-reward-star {
    width: 26px;
    height: 26px;
}

.reel-reward-milestone {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
}

#reel-milestone-0 {
    left: 10%;
}

#reel-milestone-1 {
    left: 30%;
}

#reel-milestone-2 {
    left: 50%;
}

#reel-milestone-3 {
    left: 70%;
}

#reel-milestone-4 {
    left: 90%;
}

.reel-reward-treasure {
    width: 35px;
    height: 35px;
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
}

.reel-reward-claim-button {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 20px;
    font-size: 7.5px;
    font-weight: 700;
    font-family: 'Graduate', serif;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: not-allowed;
    z-index: 3;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.reel-reward-claim-button.claimable {
    background-color: #2ecc71;
    cursor: pointer;
    color: #ffd55c;

}

.reel-reward-claim-button:disabled:not(.claimable) {
    color: #ffd55c;
    background-color: #464646;
}

.reel-reward-claim-button.claimed {
    background-color: #34495e;
    color: #ffd55c;
    cursor: not-allowed;
}

.reel-reward-star {
    width: 26px;
    height: 26px;
    z-index: 2;
    position: relative;
}

.reel-reward-cost {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    color: #87CEEB;
    text-shadow: 0 0 3px black, 0 0 5px #00BFFF;
}

.reel-reward-cost img {
    width: 8px;
    height: 8px;
    vertical-align: middle;
}

.reel-reward-star.completed {
    filter: drop-shadow(0 0 5px #FFD700) brightness(1.2);
}

@keyframes wobble-treasure {

    0%,
    100% {
        transform: translateX(-50%) rotate(0deg);
    }

    25% {
        transform: translateX(-50%) rotate(-5deg);
    }

    75% {
        transform: translateX(-50%) rotate(5deg);
    }
}

.reel-reward-treasure.wobbling {
    animation: wobble-treasure 0.7s infinite;
}

.reel-reward-treasure.claimed {
    filter: grayscale(100%);
    opacity: 0.7;
}

.reel-game-symbol .symbol-icon-wrapper {
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1;
    text-align: center;
    padding: 5px;
}

.reel-game-symbol .symbol-wild {
    color: #ffd700;
    font-size: 1.0em;
}

.reel-game-symbol .symbol-scatter {
    color: #ff4d4d;
    font-size: 0.7em;
}

.reel-game-symbol .symbol-bar3,
.reel-game-symbol .symbol-bar2,
.reel-game-symbol .symbol-bar1 {
    color: #ffffff;
    font-size: 1.4em;
}

.reel-game-symbol .symbol-icon-wrapper:not(.symbol-wild):not(.symbol-scatter):not(.symbol-bar1):not(.symbol-bar2):not(.symbol-bar3) {
    font-size: 1.2em;
}

.reel-game-column.reel-column-hunting {
    box-shadow: inset 0 0 10px 3px #FFD700,
        inset 0 0 20px 5px rgba(255, 215, 0, 0.5);
}

#reel-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.90);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

#reel-game-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#reel-game-overlay-text {
    font-family: 'Graduate', serif;
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
    text-align: center;
    line-height: 1.3;
    text-shadow:
        0 0 15px #FFD700,
        3px 3px 3px rgba(0, 0, 0, 0.8);
    transform: scale(1);
    transition: font-size 0.3s ease-out;
}

#reel-game-overlay-text.large-number {
    font-size: 42px;
}

#reel-game-overlay-title {
    font-family: 'Graduate', serif;
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
    margin-bottom: 10px;
    font-size: 36px;
    color: #ffffff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease-out;
}

#reel-game-overlay-title.win-tier-1 {
    font-size: 36px;
    color: #ffffff;
}

#reel-game-overlay-title.win-tier-2 {
    font-size: 42px;
    color: #87CEEB;
    text-shadow: 0 0 10px #00BFFF;
}

#reel-game-overlay-title.win-tier-3 {
    font-size: 48px;
    color: #a335ee;
    text-shadow: 0 0 15px #a335ee;
    animation: pulse-soft 1.5s infinite;
}

#reel-game-overlay-title.win-tier-4 {
    font-size: 54px;
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700, 0 0 30px #FFD700;
    animation: pulse-strong 1s infinite;
}


@keyframes pulse-soft {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes pulse-strong {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

#reel-game-free-spins-counter {
    position: absolute;
    top: calc(100px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-family: 'Graduate', serif;
    font-size: 24px;
    color: #FFD700;
    text-shadow: 0 0 10px #FFD700, 2px 2px 2px rgba(0, 0, 0, 0.8);
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

#reel-game-free-spins-counter.hidden {
    opacity: 0;
    pointer-events: none;
}