/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0a0a1a;
    --bg-card: #12122a;
    --bg-card-hover: #1a1a3a;
    --accent: #ff2d75;
    --accent-glow: #ff2d7580;
    --accent2: #7b2dff;
    --accent2-glow: #7b2dff80;
    --gold: #ffd700;
    --gold-glow: #ffd70080;
    --green: #00e676;
    --red: #ff1744;
    --text: #ffffff;
    --text-dim: #8888aa;
    --border: #2a2a4a;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === AUTH OVERLAY === */
.auth-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 9999;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    text-align: center;
    padding: 48px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow), 0 0 60px var(--accent-glow);
    max-width: 440px;
    width: 90%;
}

.auth-box .auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-box .auth-logo .logo-icon {
    font-size: 2.5rem;
    color: var(--accent);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.auth-box .auth-logo .logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
}

.auth-box .auth-logo .logo-accent {
    color: var(--accent);
}

.auth-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--gold);
}

.auth-subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-subtitle a {
    color: var(--accent);
    text-decoration: none;
}

.auth-widget {
    margin: 24px 0;
    display: flex;
    justify-content: center;
}

.auth-hint {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 16px;
}

.auth-hint a {
    color: var(--accent2);
    text-decoration: none;
}

.btn-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
}

#particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === HEADER === */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: linear-gradient(180deg, rgba(10,10,26,0.98) 0%, rgba(10,10,26,0.9) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
    color: var(--accent);
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo-accent {
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover {
    color: var(--text);
    background: rgba(255,45,117,0.1);
    border-color: var(--accent);
}

.nav-btn.active {
    color: var(--accent);
    background: rgba(255,45,117,0.15);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.balance-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #1a1a3a, #2a1a3a);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--gold);
    box-shadow: 0 0 15px rgba(255,215,0,0.2);
}

.balance-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balance-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
    min-width: 60px;
    text-align: center;
}

.balance-currency {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--gold);
    opacity: 0.8;
}

.btn-bonus {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    animation: glow-pulse 3s infinite;
}

.btn-bonus:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--accent-glow);
}

/* === PAGES === */
.page {
    display: none;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 60px);
    padding: 24px;
}

.page.active { display: block; }

/* === LOBBY === */
.lobby-hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.lobby-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 12px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent2), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lobby-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.lobby-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 30px;
    text-align: center;
    min-width: 140px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-4px);
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* === GAME CARDS === */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.game-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s;
    overflow: hidden;
}

.game-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.game-card:hover .game-card-glow { opacity: 0.15; }

.game-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(255,45,117,0.25);
}

.game-card-icon {
    font-size: 64px;
    margin-bottom: 12px;
}

.game-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    margin-bottom: 8px;
}

.game-card p {
    color: var(--text-dim);
    font-size: 14px;
}

.game-card-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-card-tag.hot { background: var(--red); }
.game-card-tag.new { background: var(--accent2); }
.game-card-tag.popular { background: var(--green); color: #000; }

/* === LIVE FEED === */
.live-feed {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow: hidden;
}

.feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
}

.feed-item .feed-user { color: var(--accent); font-weight: 600; }
.feed-item .feed-game { color: var(--text-dim); }
.feed-item .feed-win { color: var(--gold); font-weight: 700; font-family: 'Orbitron', sans-serif; }

/* === GAME CONTAINER === */
.game-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px var(--accent-glow);
}

/* === SLOTS === */
.slots-machine {
    position: relative;
    margin-bottom: 20px;
}

.slots-frame {
    display: flex;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(180deg, #1a0a2e, #0a0a1a);
    border: 3px solid var(--gold);
    border-radius: 16px;
    padding: 30px 24px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5), 0 0 30px var(--gold-glow);
}

.slot-reel {
    width: 120px;
    height: 120px;
    background: linear-gradient(180deg, #0d0d2a, #1a1a3a, #0d0d2a);
    border: 2px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.slot-symbol {
    font-size: 64px;
    transition: transform 0.1s;
}

.slot-reel.spinning .slot-symbol {
    animation: slotSpin 0.1s linear infinite;
}

.slots-win-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    opacity: 0;
    box-shadow: 0 0 15px var(--gold);
    pointer-events: none;
    transform: translateY(-50%);
}

.slots-win-line.show {
    opacity: 1;
    animation: flashLine 0.5s ease infinite;
}

.slots-paytable {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.paytable-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.paytable-item span:last-child {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

/* === BET CONTROLS === */
.bet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.bet-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.bet-btn:hover {
    border-color: var(--accent);
    background: rgba(255,45,117,0.15);
}

.bet-btn.max {
    width: auto;
    padding: 0 16px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--gold);
    border-color: var(--gold);
}

.bet-display {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 10px;
    padding: 8px 20px;
    min-width: 120px;
    justify-content: center;
}

.bet-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bet-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
}

.bet-currency {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: var(--gold);
    opacity: 0.7;
}

/* === SPIN/ACTION BUTTON === */
.spin-btn {
    background: linear-gradient(135deg, var(--accent), #ff6b35);
    border: none;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    padding: 16px 60px;
    border-radius: 12px;
    cursor: pointer;
    letter-spacing: 3px;
    transition: all 0.3s;
    box-shadow: 0 4px 20px var(--accent-glow);
    text-transform: uppercase;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--accent-glow);
}

.spin-btn:active {
    transform: scale(0.98);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.spin-btn.cashout {
    background: linear-gradient(135deg, var(--green), #00c853);
    box-shadow: 0 4px 20px rgba(0,230,118,0.4);
}

/* === WIN DISPLAY === */
.win-display {
    margin-top: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 900;
    min-height: 40px;
    transition: all 0.3s;
}

.win-display.win {
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    animation: winPulse 0.5s ease;
}

.win-display.lose {
    color: var(--red);
    font-size: 18px;
}

/* === ROULETTE === */
.roulette-wrapper {
    margin-bottom: 24px;
}

.roulette-wheel {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(
        #e74c3c 0deg 10deg, #2c3e50 10deg 20deg,
        #e74c3c 20deg 30deg, #2c3e50 30deg 40deg,
        #e74c3c 40deg 50deg, #2c3e50 50deg 60deg,
        #e74c3c 60deg 70deg, #2c3e50 70deg 80deg,
        #e74c3c 80deg 90deg, #2c3e50 90deg 100deg,
        #27ae60 100deg 110deg, #2c3e50 110deg 120deg,
        #e74c3c 120deg 130deg, #2c3e50 130deg 140deg,
        #e74c3c 140deg 150deg, #2c3e50 150deg 160deg,
        #e74c3c 160deg 170deg, #2c3e50 170deg 180deg,
        #e74c3c 180deg 190deg, #2c3e50 190deg 200deg,
        #e74c3c 200deg 210deg, #2c3e50 210deg 220deg,
        #e74c3c 220deg 230deg, #2c3e50 230deg 240deg,
        #e74c3c 240deg 250deg, #2c3e50 250deg 260deg,
        #e74c3c 260deg 270deg, #2c3e50 270deg 280deg,
        #e74c3c 280deg 290deg, #2c3e50 290deg 300deg,
        #e74c3c 300deg 310deg, #2c3e50 310deg 320deg,
        #e74c3c 320deg 330deg, #2c3e50 330deg 340deg,
        #e74c3c 340deg 350deg, #2c3e50 350deg 360deg
    );
    border: 4px solid var(--gold);
    box-shadow: 0 0 30px var(--gold-glow), inset 0 0 30px rgba(0,0,0,0.5);
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.wheel-result {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    z-index: 2;
    background: rgba(0,0,0,0.7);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
}

.roulette-numbers {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.roulette-num {
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-align: center;
}

.roulette-num:hover {
    transform: scale(1.1);
    border-color: var(--gold);
}

.roulette-num.red-num { background: #c0392b; }
.roulette-num.black-num { background: #2c3e50; }
.roulette-num.green-num { background: #27ae60; grid-column: span 2; }
.roulette-num.selected { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }

.roulette-bets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.roulette-bet-btn {
    padding: 10px 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.roulette-bet-btn.red { background: #c0392b; }
.roulette-bet-btn.black { background: #2c3e50; }
.roulette-bet-btn.green { background: #27ae60; }
.roulette-bet-btn.odd, .roulette-bet-btn.even, .roulette-bet-btn.half { background: var(--bg-card); border-color: var(--border); }

.roulette-bet-btn:hover, .roulette-bet-btn.active {
    border-color: var(--gold);
    box-shadow: 0 0 12px var(--gold-glow);
    transform: scale(1.05);
}

.selected-bet {
    margin-bottom: 12px;
    color: var(--text-dim);
    font-size: 14px;
}

.roulette-history {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.history-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.2);
}

.history-item.h-red { background: #c0392b; }
.history-item.h-black { background: #2c3e50; }
.history-item.h-green { background: #27ae60; }

/* === BLACKJACK === */
.blackjack-table {
    background: linear-gradient(180deg, #0d4a2e, #0a3622);
    border: 3px solid var(--gold);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.3), 0 0 20px var(--gold-glow);
}

.bj-dealer, .bj-player {
    margin-bottom: 8px;
}

.bj-dealer h3, .bj-player h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bj-score {
    color: var(--gold);
    font-size: 16px;
}

.bj-vs {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    color: var(--gold);
    margin: 10px 0;
    opacity: 0.5;
}

.bj-cards {
    display: flex;
    justify-content: center;
    gap: 8px;
    min-height: 100px;
    flex-wrap: wrap;
}

.bj-card {
    width: 65px;
    height: 95px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    animation: dealCard 0.3s ease;
}

.bj-card.red { color: #e74c3c; }
.bj-card.hidden-card {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    font-size: 24px;
}

.bj-card-rank { font-size: 20px; }
.bj-card-suit { font-size: 22px; }

.bj-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.action-btn {
    padding: 12px 32px;
    border: 2px solid;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: transparent;
    color: white;
}

.action-btn.hit {
    border-color: var(--green);
    color: var(--green);
}
.action-btn.hit:hover {
    background: var(--green);
    color: #000;
    box-shadow: 0 0 20px rgba(0,230,118,0.4);
}

.action-btn.stand {
    border-color: var(--red);
    color: var(--red);
}
.action-btn.stand:hover {
    background: var(--red);
    color: white;
    box-shadow: 0 0 20px rgba(255,23,68,0.4);
}

.action-btn.double {
    border-color: var(--gold);
    color: var(--gold);
}
.action-btn.double:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 20px var(--gold-glow);
}

/* === CRASH === */
.crash-graph {
    position: relative;
    background: linear-gradient(180deg, #0d0d2a, #1a1a3a);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    overflow: hidden;
}

#crashCanvas {
    width: 100%;
    height: 300px;
    display: block;
}

.crash-multiplier {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 56px;
    font-weight: 900;
    color: var(--green);
    text-shadow: 0 0 30px rgba(0,230,118,0.5);
    pointer-events: none;
}

.crash-multiplier.crashed {
    color: var(--red);
    text-shadow: 0 0 30px rgba(255,23,68,0.5);
}

.crash-controls {
    margin-bottom: 16px;
}

.crash-history {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.crash-hist {
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.crash-hist.good { background: rgba(0,230,118,0.2); color: var(--green); }
.crash-hist.bad { background: rgba(255,23,68,0.2); color: var(--red); }

/* === MODAL === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-card);
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 60px var(--gold-glow);
    animation: modalIn 0.3s ease;
}

.modal h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    margin-bottom: 12px;
}

.modal p {
    color: var(--text-dim);
    margin-bottom: 24px;
}

.bonus-wheel {
    margin-bottom: 24px;
}

.bonus-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bonus-option {
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--gold);
    transition: all 0.2s;
}

.bonus-option.selected {
    border-color: var(--gold);
    background: rgba(255,215,0,0.15);
    box-shadow: 0 0 15px var(--gold-glow);
    transform: scale(1.05);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover { color: white; }

/* === NOTIFICATIONS === */
.notifications {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    animation: notifIn 0.3s ease, notifOut 0.3s ease 2.7s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.notification.success {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #000;
}

.notification.error {
    background: linear-gradient(135deg, #ff1744, #ff5252);
    color: white;
}

.notification.info {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
}

/* === ANIMATIONS === */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 10px var(--accent-glow); }
    50% { box-shadow: 0 0 25px var(--accent-glow), 0 0 40px var(--accent2-glow); }
}

@keyframes slotSpin {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes flashLine {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes winPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes dealCard {
    from { transform: translateY(-40px) rotate(-10deg); opacity: 0; }
    to { transform: translateY(0) rotate(0); opacity: 1; }
}

@keyframes modalIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes notifIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes notifOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(100px); }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

/* === MINES === */
.mines-info {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.mines-multiplier {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--green);
    text-shadow: 0 0 20px rgba(0,230,118,0.5);
}

.mines-profit {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    max-width: 350px;
    margin: 0 auto 20px;
}

.mine-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    user-select: none;
}

.mine-cell:hover:not(.revealed) {
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-glow);
}

.mine-cell.revealed.safe {
    background: linear-gradient(135deg, #0a3622, #0d4a2e);
    border-color: var(--green);
    box-shadow: 0 0 10px rgba(0,230,118,0.3);
    animation: mineReveal 0.3s ease;
}

.mine-cell.revealed.mine {
    background: linear-gradient(135deg, #3a0a0a, #4a0d0d);
    border-color: var(--red);
    box-shadow: 0 0 10px rgba(255,23,68,0.3);
    animation: mineExplode 0.5s ease;
}

.mine-cell.inactive {
    cursor: default;
    opacity: 0.6;
}

.mines-settings {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.mines-label {
    font-size: 14px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mines-label select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
}

@keyframes mineReveal {
    from { transform: scale(0.8) rotateY(90deg); }
    to { transform: scale(1) rotateY(0); }
}

@keyframes mineExplode {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* === WHEEL OF FORTUNE === */
.wheel-container {
    margin-bottom: 24px;
}

.fortune-wheel {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.fortune-wheel canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 30px var(--gold-glow), 0 0 60px rgba(255,215,0,0.15);
}

.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    color: var(--gold);
    filter: drop-shadow(0 0 8px var(--gold-glow));
    z-index: 5;
}

.wheel-history {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.wheel-hist {
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.wheel-hist.big { background: rgba(255,215,0,0.2); color: var(--gold); }
.wheel-hist.medium { background: rgba(123,45,255,0.2); color: var(--accent2); }
.wheel-hist.small { background: rgba(255,45,117,0.2); color: var(--accent); }
.wheel-hist.zero { background: rgba(255,23,68,0.2); color: var(--red); }

/* === DICE === */
.dice-result-display {
    margin-bottom: 24px;
}

.dice-number {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    border: 3px solid var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--text);
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.dice-number.win {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 30px rgba(0,230,118,0.4);
}

.dice-number.lose {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 30px rgba(255,23,68,0.4);
}

.dice-slider-container {
    max-width: 500px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.dice-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--green) 0%, var(--green) var(--slider-pct, 50%), var(--red) var(--slider-pct, 50%), var(--red) 100%);
    outline: none;
    margin-bottom: 12px;
}

.dice-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 0 10px var(--gold-glow);
}

.dice-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px var(--gold-glow);
}

.dice-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.dice-under {
    color: var(--green);
    font-weight: 700;
}

.dice-chance {
    color: var(--text-dim);
}

.dice-payout {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.dice-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.dice-mode-btn {
    padding: 10px 32px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.dice-mode-btn.active {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 15px rgba(0,230,118,0.3);
}

.dice-mode-btn[data-mode="over"].active {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 15px rgba(255,23,68,0.3);
}

.dice-history {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.dice-hist {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.dice-hist.win { background: rgba(0,230,118,0.2); color: var(--green); }
.dice-hist.lose { background: rgba(255,23,68,0.2); color: var(--red); }

/* === EARN SP === */
.earn-container {
    max-width: 750px;
}

.earn-subtitle {
    color: var(--text-dim);
    font-size: 16px;
    margin-bottom: 28px;
}

.earn-subtitle strong {
    color: var(--gold);
    font-family: 'Orbitron', sans-serif;
}

.earn-channel-box {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1a1a3a, #2a1a4a);
    border: 1px solid var(--accent2);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 28px;
    box-shadow: 0 0 20px var(--accent2-glow);
}

.earn-channel-icon {
    font-size: 36px;
}

.earn-channel-info {
    flex: 1;
    text-align: left;
}

.earn-channel-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.earn-channel-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}

.earn-subscribe-btn {
    background: linear-gradient(135deg, #0088cc, #00aaee);
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.earn-subscribe-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,136,204,0.5);
}

.earn-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
}

.earn-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 28px;
    text-align: center;
}

.earn-stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
}

.earn-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.earn-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    margin-bottom: 16px;
    text-align: left;
}

.earn-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.earn-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.3s;
}

.earn-task:hover {
    border-color: var(--accent2);
}

.earn-task.claimed {
    opacity: 0.6;
    border-color: var(--green);
}

.earn-task-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.earn-task-icon {
    font-size: 24px;
    width: 36px;
    text-align: center;
}

.earn-task-info {
    text-align: left;
}

.earn-task-title {
    font-weight: 600;
    font-size: 14px;
}

.earn-task-reward {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: var(--gold);
    margin-top: 2px;
}

.earn-task-actions {
    flex-shrink: 0;
}

.earn-view-btn {
    display: inline-block;
    background: linear-gradient(135deg, #0088cc, #00aaee);
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.earn-view-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,136,204,0.5);
}

.earn-claim-btn {
    background: linear-gradient(135deg, var(--green), #00c853);
    border: none;
    color: #000;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    animation: glow-pulse-green 2s infinite;
}

.earn-claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,230,118,0.5);
}

@keyframes glow-pulse-green {
    0%, 100% { box-shadow: 0 0 8px rgba(0,230,118,0.3); }
    50% { box-shadow: 0 0 20px rgba(0,230,118,0.6); }
}

.earn-task-done {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    color: var(--green);
    letter-spacing: 1px;
}

.earn-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-size: 13px;
    color: var(--text-dim);
    text-align: left;
    line-height: 1.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 8px;
        padding: 8px 12px;
    }
    .nav { flex-wrap: wrap; justify-content: center; }
    .nav-btn { padding: 6px 10px; font-size: 11px; }
    .lobby-title { font-size: 28px; }
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .game-card { padding: 24px 16px; }
    .game-card-icon { font-size: 40px; }
    .slots-frame { padding: 20px 12px; gap: 8px; }
    .slot-reel { width: 80px; height: 80px; }
    .slot-symbol { font-size: 44px; }
    .spin-btn { padding: 14px 40px; font-size: 16px; }
    .crash-multiplier { font-size: 36px; }
    .roulette-numbers { grid-template-columns: repeat(6, 1fr); }
    .blackjack-table { padding: 16px; }
    .bj-card { width: 50px; height: 75px; }
    .earn-channel-box { flex-direction: column; text-align: center; }
    .earn-channel-info { text-align: center; }
    .earn-task { flex-direction: column; gap: 10px; text-align: center; }
    .earn-task-left { flex-direction: column; }
    .earn-stats-row { flex-direction: column; align-items: center; }
}
