/* ============================================================
   GIFT SPIN – Modern Casino Slot Machine
   Premium Dark Theme with Neon Accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

/* ── Reset & Base ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #ffd700;
    --gold-light: #ffe566;
    --gold-dark: #b8860b;
    --neon-blue: #00d4ff;
    --neon-purple: #b44fff;
    --neon-green: #00ff88;
    --neon-red: #ff4466;
    --dark-bg: #050a1a;
    --dark-panel: #0a1428;
    --dark-card: #0d1a35;
    --chrome: linear-gradient(135deg, #8a8a8a 0%, #d4d4d4 30%, #ffffff 50%, #c0c0c0 70%, #888 100%);
    --chrome-border: #c0c0c0;
    --reel-bg: #060e22;
    --reel-cell-bg: #0a1530;
    --reel-cell-border: #1a3060;
    --font-display: 'Orbitron', monospace;
    --font-body: 'Rajdhani', sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    font-family: var(--font-body);

    position: relative;
}

/* ── Background Video ── */
.page-bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -10;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

/*.video-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(5, 10, 26, 0.4) 0%, rgba(5, 10, 26, 0.8) 100%);
    pointer-events: none;
    z-index: -9;
}*/

/* ── Animated Background ── */
.bg-particles {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 100, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 79, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 60% 80%, rgba(0, 212, 255, 0.06) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.bg-particles::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 15%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 10%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 60%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 35% 85%, rgba(255, 255, 255, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 45%, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* ── Casino Wrapper ── */
.casino-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0 0;
}

/* ── Header / Logo ── */
.casino-header {
    width: 100%;
    text-align: center;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: rgba(10, 20, 40, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);*/
}

.header-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    /*opacity: 0.4;*/
}

.logo-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.header-logo-img {
    max-height: 60px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
}

.logo-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(ellipse, rgba(255, 215, 0, 0.25) 0%, transparent 70%);
    pointer-events: none;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

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

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

.logo-text {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: 6px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.logo-main {
    background: linear-gradient(180deg, #fff 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
}

.logo-sub {
    background: linear-gradient(180deg, var(--neon-blue) 0%, #0088cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.8));
}

.logo-icon {
    font-size: clamp(20px, 2.5vw, 32px);
    animation: iconBounce 1.5s ease-in-out infinite alternate;
}

@keyframes iconBounce {
    0% {
        transform: translateY(0) rotate(-5deg);
    }

    100% {
        transform: translateY(-4px) rotate(5deg);
    }
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: clamp(10px, 1.2vw, 14px);
    color: var(--gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ── Main Game Area ── */
.casino-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 1;
    width: 100%;
    padding: 0 10px;
    min-height: 0;
}

/* ── Side Panels ── */
.side-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 80px;
    height: 100%;
    flex-shrink: 0;
}

.win-line-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    animation: winLinePulse 2s ease-in-out infinite;
}

@keyframes winLinePulse {

    0%,
    100% {
        border-color: rgba(0, 212, 255, 0.3);
        box-shadow: none;
    }

    50% {
        border-color: rgba(0, 212, 255, 0.8);
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    }
}

.line-arrow {
    color: var(--neon-blue);
    font-size: 14px;
    animation: arrowPulse 1s ease-in-out infinite alternate;
}

@keyframes arrowPulse {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.line-label {
    font-family: var(--font-display);
    font-size: 8px;
    color: var(--neon-blue);
    letter-spacing: 1px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.side-lights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.side-light {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold), 0 0 16px rgba(255, 215, 0, 0.5);
    animation: lightBlink 1.5s ease-in-out infinite;
}

.side-light:nth-child(1) {
    animation-delay: 0s;
    background: #ff4466;
    box-shadow: 0 0 8px #ff4466;
}

.side-light:nth-child(2) {
    animation-delay: 0.3s;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
}

.side-light:nth-child(3) {
    animation-delay: 0.6s;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
}

.side-light:nth-child(4) {
    animation-delay: 0.9s;
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
}

.side-light:nth-child(5) {
    animation-delay: 1.2s;
    background: var(--neon-purple);
    box-shadow: 0 0 8px var(--neon-purple);
}

@keyframes lightBlink {

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

    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

/* ── Slot Machine Frame ── */
.slot-machine {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    /* wraps the 4 fixed-width columns */
    /* background: rgba(10, 20, 40, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
   border: 2px solid rgba(255, 255, 255, 0.1);*/
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.machine-top,
.machine-bottom {
    width: 100%;
    height: 18px;
    background: linear-gradient(180deg, #2a2a2a 0%, #555 30%, #888 50%, #555 70%, #333 100%);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.machine-bottom {
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg, #333 0%, #555 30%, #888 50%, #555 70%, #2a2a2a 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.machine-top-lights,
.machine-bottom-lights {
    display: flex;
    gap: 14px;
    align-items: center;
}

.top-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
    animation: topLightBlink 0.8s ease-in-out infinite;
}

.top-light:nth-child(1) {
    animation-delay: 0s;
    background: #ff4466;
    box-shadow: 0 0 6px #ff4466;
}

.top-light:nth-child(2) {
    animation-delay: 0.11s;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
}

.top-light:nth-child(3) {
    animation-delay: 0.22s;
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
}

.top-light:nth-child(4) {
    animation-delay: 0.33s;
    background: var(--neon-blue);
    box-shadow: 0 0 6px var(--neon-blue);
}

.top-light:nth-child(5) {
    animation-delay: 0.44s;
    background: var(--neon-purple);
    box-shadow: 0 0 6px var(--neon-purple);
}

.top-light:nth-child(6) {
    animation-delay: 0.55s;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
}

.top-light:nth-child(7) {
    animation-delay: 0.66s;
    background: #ff4466;
    box-shadow: 0 0 6px #ff4466;
}

@keyframes topLightBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.2;
    }
}

/* ── Reel Viewport ── */
.reel-viewport {
    position: relative;
    width: auto;
    /* shrinks to fit the 4 fixed-width columns */
    height: 480px;
    /* fixed: 3 rows × 160px = 480px */
    flex-shrink: 0;
    overflow: hidden;
    background: var(--reel-bg);
    border-left: 6px solid #444;
    border-right: 6px solid #444;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 100, 255, 0.05);
}

.reel-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.06) 0%,
            transparent 30%,
            transparent 70%,
            rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 10;
}

/* Win line overlay (horizontal bar across middle row) */
.win-line-overlay {
    position: absolute;
    top: 33.33%;
    left: 0;
    right: 0;
    height: 33.34%;
    border-top: 2px solid rgba(0, 212, 255, 0.4);
    border-bottom: 2px solid rgba(0, 212, 255, 0.4);
    pointer-events: none;
    z-index: 5;
    background: rgba(0, 212, 255, 0.03);
}

/* ── Game Area / Reels ── */
#game-area {
    display: flex;
    width: fit-content;
    /* 4 × 252px */
    height: 100%;
    overflow: hidden;
}

.c-column {
    position: relative;
    width: 252px;
    /* fixed: matches gift PNG width */
    flex-shrink: 0;
    height: 100%;
    border-right: 2px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.c-column:last-child {
    border-right: none;
}

.column {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
}

/* ── Reel Cells ── */
.column div {
    position: relative;
    width: 252px;
    /* fixed to match gift PNG width */
    height: 160px;
    /* fixed to match gift PNG height */
    /*background: var(--reel-cell-bg);
    border-bottom: 2px solid var(--reel-cell-border);*/
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.column div::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
}

/* Symbol inside cell */
.column div i {
    font-style: normal;
    font-size: 72px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s;
    user-select: none;
}

/* Symbol card (inner wrapper) — fills the full 252×160 cell */
.symbol-card {
    width: 252px;
    height: 160px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
    /*border: 1px solid rgba(255, 255, 255, 0.1);*/
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* PNG gift image inside symbol card */
.gift-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.2s;
    user-select: none;
    pointer-events: none;
}

/* Win highlight */
.column div.bg {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.18) 0%, rgba(255, 140, 0, 0.14) 55%, rgba(255, 60, 0, 0.12) 100%);
    border-color: rgba(255, 60, 0, 0.55);
    animation: winCellPulse 0.5s ease-in-out infinite alternate;
}

/* Red overlay tint on winning cells (keeps current glow/pulse) */
.column div.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 0, 0, 0.28) 0%, rgba(255, 80, 0, 0.18) 55%, rgba(0, 0, 0, 0) 100%);
    mix-blend-mode: screen;
    opacity: 0.85;
    pointer-events: none;
    z-index: 2;
}

.column div.bg .symbol-card {
    position: relative;
    z-index: 3;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.22) 0%, rgba(255, 140, 0, 0.18) 100%);
    border-color: rgba(255, 220, 220, 0.55);
    box-shadow: 0 0 18px rgba(255, 0, 0, 0.45), 0 0 42px rgba(255, 140, 0, 0.28);
}

.column div.bg i,
.column div.bg .gift-img {
    filter: drop-shadow(0 0 12px rgba(255, 60, 0, 0.75)) drop-shadow(0 0 26px rgba(255, 150, 0, 0.55));
    transform: scale(1.1);
}

@keyframes winCellPulse {
    0% {
        box-shadow: inset 0 0 18px rgba(255, 0, 0, 0.22);
    }

    100% {
        box-shadow: inset 0 0 42px rgba(255, 90, 0, 0.28), 0 0 24px rgba(255, 30, 0, 0.35);
    }
}

/* Spinning animation */
.column.spinning div {
    animation: reelBlur 0.1s linear infinite;
}

@keyframes reelBlur {
    0% {
        filter: blur(0px);
    }

    50% {
        filter: blur(1px);
    }

    100% {
        filter: blur(0px);
    }
}

/* ── Control Panel ──
.control-panel {
    width: 100%;
    max-width: 980px;
    flex-shrink: 0;
    padding: 20px 20px 30px;
    min-height: 123px;
    background: url('media/dashboard.png') no-repeat center center;
    background-size: cover;
    border-radius: 24px 24px 0 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-bottom: none;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 9;
}*/

.control-panel {
    width: 100%;
    max-width: 980px;
    padding: 0px 20px 90px;
    min-height: 150px;
    margin-top: -10px;
    /*border-radius: 24px 24px 0 0;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-bottom: none;
    box-shadow: 0 -15px 40px rgba(0, 0, 0, 0.8);*/
    position: relative;
    overflow: visible;
    /* ⭐ important */
    z-index: 10;
}

/* ⭐ video background fix */
.control-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -10;
}

/* Buttons Row */
.buttons-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: transparent;
    border: none;
    padding: 5px 30px;
}

/* Control buttons (info, menu, sound) */
.left-controls,
.right-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ctrl-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.ctrl-btn:hover {
    transform: scale(1.08);
}

/* Bet controls */
.bet-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.bet-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold-dark);
    background: linear-gradient(135deg, #2a1a00, #3d2800);
    color: var(--gold);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bet-btn:hover {
    background: linear-gradient(135deg, #3d2800, #5a3c00);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.bet-options {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bet-chip {
    padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.bet-chip:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.bet-chip.selected {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* ── SPIN Button ── */
.spin-container {
    position: relative;
    flex-shrink: 0;
}

#btn-spin {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
    transition: transform 0.15s;
    box-shadow: none;
    margin-top: -35px;
}



#btn-spin:hover:not(:disabled) {
    transform: scale(1.06);
}

#btn-spin:active:not(:disabled) {
    transform: scale(0.96);
}

#btn-spin:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    animation: none;
}

.spin-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.spin-icon {
    font-size: 36px;
    color: var(--gold);
    display: block;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
    transition: transform 0.3s;
}

#btn-spin.spinning .spin-icon {
    animation: spinIcon 0.5s linear infinite;
}

@keyframes spinIcon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-label {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 900;
    color: white;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.spin-ring {
    display: none;
}

@keyframes ringRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ── Modal Overlay ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 100;
}

/* ── Modal Box ── */
.modal-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 101;
    min-width: 360px;
    max-width: 600px;
    width: 90%;
    border-radius: 24px;
    overflow: hidden;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.modal-box.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.modal-inner {
    background: linear-gradient(135deg, #0b0000 0%, #160000 35%, #050000 100%);
    border: 2px solid rgba(255, 64, 64, 0.35);
    border-radius: 24px;
    padding: 36px 32px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.modal-box.win-modal .modal-inner {
    border-color: rgba(255, 80, 50, 0.55);
    background: linear-gradient(135deg, #120000 0%, #1a0500 50%, #080000 100%);
}

.modal-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 12px;
    animation: modalIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #fff;
}

/* Force modal icons (including images) to read as white */
.modal-icon,
.modal-icon * {
    color: #fff !important;
}

.modal-icon img {
    filter: brightness(0) invert(1) drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
}

@keyframes modalIconBounce {
    0% {
        transform: scale(0) rotate(-20deg);
    }

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

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.modal-box.win-modal .modal-title {
    color: var(--neon-green);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.modal-subtitle {
    font-family: var(--font-body);
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    line-height: 1.4;
}

.modal-gift-display {
    font-size: 64px;
    margin: 20px 0 30px;
    animation: giftFloat 1.5s ease-in-out infinite alternate;
}

@keyframes giftFloat {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-8px) scale(1.05);
    }
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    border-radius: 50px;
    border: none;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #1a2a4a, #243558);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 8px;
}

.modal-btn:hover {
    transform: scale(1.04);
    background: linear-gradient(135deg, #243558, #2e4070);
}

.modal-btn-gold {
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b);
    color: #1a0d00;
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.modal-btn-gold:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
}

/* ── Confetti ── */
.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
    z-index: 1;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    top: -10px;
    animation: confettiFall linear forwards;
}

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

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

/* ── Inventory Panel ── */
.inventory-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    min-width: 320px;
    max-width: 420px;
    width: 90%;
}

.inventory-inner {
    background: linear-gradient(135deg, #0b0000 0%, #160000 35%, #050000 100%);
    border: 2px solid rgba(255, 64, 64, 0.35);
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
}

.inventory-inner h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

#inventory-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    text-align: left;
}

.inv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.inv-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-info {
    display: flex;
    flex-direction: column;
}

.inv-name {
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.inv-qty {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--gold);
    font-weight: 700;
}

/* ── Spinning state ── */
body.is-spinning #btn-spin .spin-icon {
    animation: spinIcon 0.4s linear infinite;
}

/* ── Win flash on reel viewport ── */
.reel-viewport.win-flash {
    animation: reelWinFlash 0.3s ease-in-out 3;
}

@keyframes reelWinFlash {

    0%,
    100% {
        box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8);
    }

    50% {
        box-shadow: inset 0 0 60px rgba(255, 0, 0, 0.16), 0 0 34px rgba(255, 120, 0, 0.38);
    }
}

/* ── Responsive adjustments ── */
@media (max-height: 700px) {
    .casino-header {
        padding: 2px 0;
    }

    .logo-text {
        font-size: 22px;
    }

    .logo-tagline {
        display: none;
    }

    .column div {
        height: 130px;
    }

    .column div i {
        font-size: 58px;
    }

    .symbol-card {
        width: 88px;
        height: 88px;
    }

    #btn-spin {
        width: 76px;
        height: 76px;
    }

    .spin-icon {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .side-panel {
        width: 40px;
    }

    .win-line-indicator {
        padding: 4px 3px;
    }

    .line-label {
        font-size: 6px;
    }

    .bet-options {
        display: none;
    }

    .ctrl-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}