/* Global Styles & Variables */
:root {
    --bg-dark: #050711;
    --card-bg: rgba(14, 22, 45, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff00a0;
    --neon-gold: #ffaa00;
    --text-white: #ffffff;
    --text-silver: #a0aed0;
    --glass-grad: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    
    /* Card Theme Colors */
    --card-slot-bg: rgba(18, 25, 54, 0.85);
    --card-gold-bg: rgba(255, 170, 0, 0.1);
    --card-wild-bg: rgba(255, 0, 160, 0.15);
}

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

body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 160, 0.08) 0%, transparent 40%);
}

/* Header Styles */
.app-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    font-style: italic;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    letter-spacing: -0.5px;
}

.spins-counter-header {
    font-family: 'Inter', sans-serif;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
}

/* Hero Section */
.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    margin-bottom: 25px;
    max-width: 700px;
}

.hero-title {
    font-size: 50px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 30%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    color: var(--text-silver);
    line-height: 1.6;
}

/* Music Player Widget */
.music-player-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 0, 160, 0.08);
    border: 1px solid rgba(255, 0, 160, 0.25);
    border-radius: 12px;
    padding: 12px 20px;
    max-width: 480px;
    width: 100%;
    margin: 0 auto 20px;
    box-shadow: 0 0 15px rgba(255, 0, 160, 0.05);
}

.player-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.player-lyrics-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: center;
    overflow: hidden;
}

.player-lyrics {
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: pulseLyrics 1.5s infinite alternate ease-in-out;
}

@keyframes pulseLyrics {
    0% { opacity: 0.85; }
    100% { opacity: 1; transform: scale(1.01); }
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-icon {
    display: inline-block;
    font-size: 20px;
}

.player-icon.playing {
    animation: spinIcon 2s infinite linear;
}

@keyframes spinIcon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.player-text {
    font-size: 13px;
    font-weight: 800;
    color: var(--neon-magenta);
    letter-spacing: 0.5px;
}

.player-controls {
    display: flex;
    align-items: center;
}

#play-music-btn, #stop-music-btn {
    display: none !important;
}

.player-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 0, 160, 0.35);
    border-radius: 6px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 10px;
    margin-right: 0px;
    cursor: pointer;
    max-width: 155px;
    outline: none;
    transition: all 0.2s ease;
}

.player-select:hover, .player-select:focus {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 160, 0.25);
}

.player-select option {
    background: #0b0f24;
    color: white;
}

.player-btn {
    background: var(--neon-magenta);
    border: none;
    border-radius: 6px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 12px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 0, 160, 0.3);
    transition: all 0.2s ease;
}

.player-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(255, 0, 160, 0.5);
}

.stop-btn {
    background: #4a152d;
    box-shadow: none;
}

.stop-btn:hover {
    background: #ff0055;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
}

/* Slot Machine Cabinet Design */
.slot-cabinet {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #0b0f24;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.7),
        inset 0 0 25px rgba(0, 240, 255, 0.05);
    z-index: 10;
}

.cabinet-glow {
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta));
    filter: blur(15px);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
    animation: pulseGlow 4s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.25; filter: blur(15px); }
    50% { opacity: 0.45; filter: blur(25px); }
}

/* Jackpot Display */
.slot-display {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.display-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--neon-magenta);
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.display-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--neon-gold);
    text-shadow: 0 0 10px rgba(255, 170, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Multiplier Bar */
.multiplier-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.multiplier {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.multiplier.active {
    opacity: 1;
    background: rgba(255, 0, 160, 0.15);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 160, 0.3);
}

.multiplier.active.free-game-mode {
    background: rgba(255, 170, 0, 0.15);
    border-color: var(--neon-gold);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.mult-label {
    font-size: 7px;
    font-weight: 800;
    color: var(--text-silver);
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.multiplier.active .mult-label {
    color: var(--text-white);
}

.mult-val {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-silver);
}

.multiplier.active .mult-val {
    color: var(--neon-magenta);
    text-shadow: 0 0 5px rgba(255, 0, 160, 0.5);
}

.multiplier.active.free-game-mode .mult-val {
    color: var(--neon-gold);
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

/* Reels Window (5x4 structure) */
.reels-window {
    position: relative;
    background: #04060f;
    border-radius: 16px;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    overflow: hidden;
    height: 380px; /* Fits 4 rows of cards */
}

.reels-border {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    pointer-events: none;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.05);
    z-index: 5;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    height: 100%;
}

.grid-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Slot Card Styling (Super Ace card theme) */
.slot-card {
    height: 82px;
    background: var(--card-slot-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    user-select: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    font-weight: 800;
    transition: all 0.2s ease;
}

/* Elastic card dropping animation (Speed up 2x) */
.card-drop {
    animation: cardDropAnim 0.25s cubic-bezier(0.25, 1.1, 0.5, 1.1) both;
}

@keyframes cardDropAnim {
    0% {
        transform: translateY(-200px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Card Symbol Colors */
.card-red {
    color: var(--neon-magenta);
    text-shadow: 0 0 5px rgba(255, 0, 160, 0.3);
}

.card-blue {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
}

/* Golden Card */
.card-golden {
    background: var(--card-gold-bg);
    border-color: var(--neon-gold);
    box-shadow: 
        0 0 5px rgba(255, 170, 0, 0.2),
        inset 0 0 8px rgba(255, 170, 0, 0.1);
    color: var(--neon-gold);
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.6);
}

/* Wild Card (Joker) */
.card-wild {
    background: var(--card-wild-bg);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 160, 0.3);
    color: #fff;
    font-weight: 900;
    animation: rainbowGlow 2s infinite linear;
}

@keyframes rainbowGlow {
    0%, 100% { border-color: var(--neon-magenta); box-shadow: 0 0 10px rgba(255, 0, 160, 0.4); }
    50% { border-color: var(--neon-cyan); box-shadow: 0 0 10px rgba(0, 240, 255, 0.4); }
}

.card-val {
    font-size: 24px;
    line-height: 1;
}

.card-suit {
    font-size: 14px;
    margin-top: 1px;
}

/* Win Flash Animation (Speed up 2x) */
.win-flash {
    animation: winFlashAnim 0.2s ease-in-out infinite alternate;
}

@keyframes winFlashAnim {
    0% {
        transform: scale(1);
        border-color: rgba(255,255,255,0.8);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }
    100% {
        transform: scale(0.9);
        border-color: rgba(255,255,255,0.2);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }
}

/* Scatter Gold Coin symbol */
.card-scatter {
    background: radial-gradient(circle, #ffe066 0%, #cc9900 100%);
    border-color: #ffd700;
    color: #4a3600;
    text-shadow: 0 1px 1px rgba(255,255,255,0.6);
    font-size: 26px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* Free Game Banner Overlay */
.free-game-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid var(--neon-gold);
    border-radius: 12px;
    padding: 15px 40px;
    font-size: 32px;
    font-weight: 950;
    color: var(--neon-gold);
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.5);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.free-game-banner.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: bannerPulse 1.5s infinite alternate;
}

@keyframes bannerPulse {
    0% { box-shadow: 0 0 20px rgba(255, 170, 0, 0.4); }
    100% { box-shadow: 0 0 35px rgba(255, 170, 0, 0.7); }
}

/* Controls Panel */
.slot-controls {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    gap: 15px;
    align-items: center;
}

.stat-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 8px;
    font-weight: 800;
    color: var(--text-silver);
    letter-spacing: 1px;
    margin-bottom: 2px;
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-white);
}

.spin-btn {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--neon-cyan), #0072ff);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    transition: all 0.2s ease;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    background: #252b44;
}

/* Promotions Grid Section */
.promotions-section {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 50%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--text-silver);
    margin-bottom: 40px;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.promo-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.promo-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 240, 255, 0.15);
}

.promo-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Win Modal Overlay styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 5, 12, 0.95);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: #0f142c;
    border: 2px solid rgba(255, 170, 0, 0.3);
    border-radius: 24px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-glow {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 22px;
    box-shadow: inset 0 0 30px rgba(255, 170, 0, 0.1);
    pointer-events: none;
}

.modal-crown {
    font-size: 54px;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modal-title {
    font-size: 40px;
    font-weight: 900;
    color: var(--neon-gold);
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.modal-prize {
    display: inline-block;
    background: rgba(255, 0, 160, 0.1);
    border: 1px solid rgba(255, 0, 160, 0.3);
    padding: 8px 18px;
    border-radius: 8px;
    color: var(--neon-magenta);
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 20px;
}

.modal-text {
    font-family: 'Inter', sans-serif;
    color: var(--text-silver);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.claim-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--neon-gold), #ff5500);
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.4);
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.claim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 100, 0, 0.6);
}

.modal-footer-warning {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-silver);
    opacity: 0.6;
}

/* Footer Styles */
.app-footer {
    width: 100%;
    max-width: 800px;
    margin: auto auto 30px;
    padding: 0 20px;
    text-align: center;
}

.footer-warning {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: var(--text-silver);
    opacity: 0.45;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-copyright {
    font-size: 11px;
    color: var(--text-silver);
    opacity: 0.3;
}

/* Responsiveness */
@media (max-width: 992px) {
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 36px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .music-player-banner {
        max-width: 380px;
        padding: 8px 15px;
    }
    .player-text {
        font-size: 11px;
    }
    .player-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
    .slot-cabinet {
        padding: 15px;
        max-width: 380px;
    }
    .reels-window {
        height: 290px;
        padding: 8px;
    }
    .grid-container {
        gap: 5px;
    }
    .slot-card {
        height: 62px;
        border-radius: 5px;
    }
    .card-val {
        font-size: 18px;
    }
    .card-suit {
        font-size: 11px;
    }
    .free-game-banner {
        font-size: 24px;
        padding: 10px 20px;
    }
    .slot-controls {
        grid-template-columns: 60px 1fr 60px;
        gap: 10px;
    }
    .stat-value {
        font-size: 14px;
    }
    .spin-btn {
        font-size: 16px;
        height: 48px;
    }
    .promo-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 340px;
        margin: 0 auto;
    }
    .modal-content {
        padding: 25px 20px;
    }
    .modal-title {
        font-size: 32px;
    }
}

/* Floating Background Music Control Button */
.bg-music-floating-btn {
    position: fixed;
    bottom: 80px; /* Shifted up to make room for Customer Service */
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(11, 15, 36, 0.75);
    border: 1px solid rgba(255, 0, 160, 0.4);
    color: white;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 0, 160, 0.25);
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.bg-music-floating-btn:hover {
    transform: scale(1.1);
    border-color: var(--neon-magenta);
    box-shadow: 0 0 20px rgba(255, 0, 160, 0.6);
}

.bg-music-floating-btn:active {
    transform: scale(0.95);
}

/* Floating Customer Service Button */
.customer-service-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), #0072ff);
    border: none;
    color: white;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 
        0 4px 15px rgba(0, 240, 255, 0.4),
        0 0 25px rgba(0, 240, 255, 0.2);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    outline: none;
}

.customer-service-floating-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 240, 255, 0.6),
        0 0 30px rgba(0, 240, 255, 0.3);
}

.customer-service-floating-btn:active {
    transform: scale(0.95);
}
