/* ========================================
   CRYPTO SLOTS — Premium Casino Theme
   ======================================== */

:root {
    /* Colors */
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: #1a1a3e;
    --gold: #ffd700;
    --gold-dark: #b8960f;
    --gold-light: #ffed4a;
    --accent: #00f5d4;
    --accent-dim: #00b89c;
    --purple: #7b2ff7;
    --purple-glow: #a855f7;
    --red: #ff3b5c;
    --green: #00e676;
    --text-primary: #ffffff;
    --text-secondary: #8888aa;
    --text-dim: #555577;

    /* Spacing */
    --radius: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

/* Particles canvas */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   GAME CONTAINER
   ======================================== */
.game-container {
    position: relative;
    z-index: 1;
    max-width: 520px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.9), rgba(18, 18, 42, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.logo h1 .accent {
    background: linear-gradient(135deg, var(--accent), #00d4aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-display {
    text-align: right;
}

.balance-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.balance-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* ========================================
   WIN DISPLAY
   ======================================== */
.win-display {
    width: 100%;
    text-align: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.05), rgba(123, 47, 247, 0.05));
    border: 1px solid rgba(0, 245, 212, 0.1);
    border-radius: var(--radius);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.win-display.active {
    opacity: 1;
    border-color: rgba(0, 245, 212, 0.4);
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(123, 47, 247, 0.1));
    box-shadow: 0 0 30px rgba(0, 245, 212, 0.1);
}

.win-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 3px;
}

.win-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
}

/* ========================================
   SLOT MACHINE
   ======================================== */
.slot-machine {
    width: 100%;
}

.machine-frame {
    position: relative;
    background: linear-gradient(180deg, #1e1e4a 0%, #151535 50%, #1e1e4a 100%);
    border: 2px solid;
    border-image: linear-gradient(180deg, var(--gold), var(--gold-dark), var(--gold)) 1;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Payline indicators */
.payline {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.payline-left {
    left: 3px;
}

.payline-right {
    right: 3px;
}

.payline-line {
    position: absolute;
    top: 50%;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), rgba(255, 215, 0, 0.3), var(--gold));
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
}

/* Reels */
.reels-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 280px;
}

.reel {
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.2) 15%,
            transparent 30%,
            transparent 70%,
            rgba(0, 0, 0, 0.2) 85%,
            rgba(0, 0, 0, 0.8) 100%);
    border-radius: 8px;
}

.reel::before,
.reel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40%;
    z-index: 3;
    pointer-events: none;
}

.reel::before {
    top: 0;
    background: linear-gradient(180deg, rgba(10, 10, 26, 0.95), transparent);
}

.reel::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(10, 10, 26, 0.95), transparent);
}

.reel-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.1s ease;
}

.reel-symbol {
    width: 100%;
    height: 93px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    flex-shrink: 0;
    user-select: none;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.reel-symbol.winner {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
    transform: scale(1.15);
    animation: symbolPulse 0.5s ease-in-out infinite alternate;
}

@keyframes symbolPulse {
    from {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }

    to {
        filter: drop-shadow(0 0 25px rgba(255, 215, 0, 1));
    }
}

.reel-divider {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    flex-shrink: 0;
}

/* Spin animation */
.reel.spinning .reel-strip {
    animation: reelSpin 0.15s linear infinite;
}

@keyframes reelSpin {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-93px);
    }
}

/* ========================================
   FREE SPINS BANNER
   ======================================== */
.free-spins-banner {
    width: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(123, 47, 247, 0.2), rgba(255, 59, 92, 0.2));
    border: 1px solid rgba(123, 47, 247, 0.4);
    border-radius: var(--radius);
    animation: bannerGlow 1.5s ease-in-out infinite alternate;
}

.free-spins-banner.active {
    display: flex;
}

@keyframes bannerGlow {
    from {
        box-shadow: 0 0 10px rgba(123, 47, 247, 0.2);
    }

    to {
        box-shadow: 0 0 25px rgba(123, 47, 247, 0.4);
    }
}

.free-spins-icon {
    font-size: 24px;
    animation: rocketBounce 1s ease-in-out infinite;
}

@keyframes rocketBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.free-spins-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--purple-glow), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   CONTROLS
   ======================================== */
.controls {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.9), rgba(18, 18, 42, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.bet-section {
    text-align: center;
}

.bet-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-bet {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    color: var(--gold);
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-bet:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.btn-bet:active {
    transform: scale(0.9);
}

.bet-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 50px;
    text-align: center;
}

/* SPIN Button */
.btn-spin {
    position: relative;
    width: 100px;
    height: 100px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: linear-gradient(135deg, #2a1a5e, #1a0a3e);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-spin:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    border-color: var(--gold-light);
}

.btn-spin:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spin-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.spin-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg,
            transparent 0%,
            rgba(255, 215, 0, 0.2) 25%,
            transparent 50%,
            rgba(255, 215, 0, 0.2) 75%,
            transparent 100%);
    animation: spinGlow 3s linear infinite;
    z-index: 1;
}

.btn-spin:disabled .spin-glow {
    animation-play-state: paused;
}

@keyframes spinGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Cash Out */
.cashout-section {
    text-align: center;
}

.btn-cashout {
    padding: 12px 18px;
    border: 1px solid rgba(0, 230, 118, 0.3);
    background: rgba(0, 230, 118, 0.08);
    color: var(--green);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-cashout:hover {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
}

.btn-cashout:active {
    transform: scale(0.95);
}

/* ========================================
   PAYTABLE
   ======================================== */
.btn-paytable-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-paytable-toggle:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.paytable {
    width: 100%;
    display: none;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(26, 26, 62, 0.9), rgba(18, 18, 42, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.paytable.open {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paytable-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 3px;
}

.paytable-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.pay-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.jackpot-row {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.15);
}

.rocket-row {
    background: rgba(123, 47, 247, 0.08);
    border: 1px solid rgba(123, 47, 247, 0.15);
}

.pay-symbol {
    font-size: 18px;
    letter-spacing: 4px;
}

.pay-mult {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}

.jackpot-row .pay-mult {
    color: var(--gold-light);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rocket-row .pay-mult {
    color: var(--purple-glow);
}

.pair-row .pay-mult {
    color: var(--text-secondary);
}

/* ========================================
   MESSAGE AREA
   ======================================== */
.message-area {
    width: 100%;
    text-align: center;
    min-height: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.message-area.win {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-weight: 700;
}

.message-area.jackpot {
    color: var(--gold-light);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 800;
    animation: jackpotFlash 0.5s ease-in-out 3;
}

@keyframes jackpotFlash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.message-area.lose {
    color: var(--text-dim);
}

.message-area.freespin {
    color: var(--purple-glow);
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    font-weight: 700;
}

/* ========================================
   BIG WIN OVERLAY
   ======================================== */
.big-win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: overlayFade 0.3s ease;
}

.big-win-overlay.active {
    display: flex;
}

@keyframes overlayFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.big-win-content {
    text-align: center;
    position: relative;
}

.big-win-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bigWinPulse 0.8s ease-in-out infinite alternate;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

@keyframes bigWinPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

.big-win-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 72px;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 40px rgba(0, 245, 212, 0.5);
    margin-top: 10px;
}

#confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }

    .game-container {
        gap: 8px;
    }

    .header {
        padding: 8px 14px;
    }

    .win-display {
        padding: 4px 12px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .balance-value {
        font-size: 20px;
    }

    .machine-frame {
        padding: 12px;
    }

    .reels-container {
        height: 219px;
    }

    .reel-symbol {
        height: 73px;
        font-size: 40px;
    }

    @keyframes reelSpin {
        0% {
            transform: translateY(0);
        }

        100% {
            transform: translateY(-73px);
        }
    }

    .btn-spin {
        width: 70px;
        height: 70px;
    }

    .spin-text {
        font-size: 12px;
    }

    .win-value {
        font-size: 22px;
    }

    .controls {
        padding: 10px 12px;
        gap: 6px;
    }

    .btn-cashout {
        padding: 10px 12px;
        font-size: 11px;
    }

    .bet-value {
        font-size: 16px;
        min-width: 36px;
    }

    .btn-bet {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .big-win-title {
        font-size: 36px;
    }

    .big-win-amount {
        font-size: 48px;
    }
}

@media (max-width: 360px) {
    .logo-icon {
        font-size: 24px;
    }

    .logo h1 {
        font-size: 14px;
    }

    .btn-cashout span {
        font-size: 10px;
    }

    .btn-spin {
        width: 60px;
        height: 60px;
    }

    .spin-text {
        font-size: 11px;
        letter-spacing: 1px;
    }
}