:root {
    /* Палитра Obsidian */
    --bg-dark: #050505;
    --bg-card: #121212;
    --bg-glass: rgba(30, 30, 30, 0.6);
    
    /* Неоновые акценты */
    --primary: #00ff88;       /* Win / Action */
    --primary-glow: rgba(0, 255, 136, 0.4);
    --danger: #ff0055;        /* Lose / Crash */
    --danger-glow: rgba(255, 0, 85, 0.4);
    --accent: #9d00ff;        /* Bonus / Special */
    
    /* Текст */
    --text-main: #ffffff;
    --text-muted: #888888;
    
    /* UI */
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none; /* Защита от выделения текста в игре */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

/* Header */
header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(180deg, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0) 100%);
}

.balance-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

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

.balance-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

/* Main Container (SPA Router View) */
#app {
    flex: 1;
    padding-top: 70px; /* Header height */
    padding-bottom: 80px; /* Nav height */
    overflow-y: auto;
    width: 100%;
    max-width: 600px; /* Mobile limit */
    margin: 0 auto;
}

/* Grid для выбора игр */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.game-card {
    position: relative;
    height: 120px;
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.game-card:active {
    transform: scale(0.96);
}

.game-card h3 {
    position: absolute;
    bottom: 10px;
    left: 15px;
    margin: 0;
    font-size: 16px;
    z-index: 2;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    height: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-item {
    font-size: 24px;
    color: var(--text-muted);
    transition: color 0.2s;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* Buttons */
.btn-neon {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    width: 100%;
    text-transform: uppercase;
    box-shadow: 0 0 15px var(--primary-glow);
    cursor: pointer;
}

.btn-neon:active {
    transform: translateY(2px);
    box-shadow: 0 0 5px var(--primary-glow);
}

/* Loader */
#loader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-card);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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