/* ============================================
   Base — Premium Dark Theme (Stake/BC.Game style)
   ============================================ */

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

:root {
    /* Core palette */
    --bg-darkest: #0f1923;
    --bg-primary: #1a2c38;
    --bg-secondary: #213743;
    --bg-card: #0f212e;
    --bg-input: #0f212e;
    --bg-elevated: #1a2c38;
    --bg-hover: #2f4553;

    /* Accent */
    --accent: #ff6b00;
    --accent-hover: #ff8534;
    --accent-dim: rgba(255, 107, 0, 0.15);

    /* Semantic */
    --green: #00e701;
    --green-dim: rgba(0, 231, 1, 0.12);
    --green-border: rgba(0, 231, 1, 0.25);
    --red: #ed6300;
    --red-bright: #ff3b3b;
    --red-dim: rgba(237, 99, 0, 0.12);
    --blue: #1475e1;
    --blue-dim: rgba(20, 117, 225, 0.12);
    --purple: #7b61ff;
    --yellow: #ffd700;
    --yellow-dim: rgba(255, 215, 0, 0.12);
    --pink: #ff2d7b;

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #b1bad3;
    --text-tertiary: #557086;
    --text-muted: #4a6275;

    /* Borders */
    --border: #2f4553;
    --border-light: #3d5564;
    --border-subtle: rgba(255,255,255,0.04);

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 999px;

    /* Fonts */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Sizing */
    --sidebar-width: 240px;
    --header-height: 60px;
}

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

html {
    font-size: 14px;
}

body {
    background: var(--bg-darkest);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#bgVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* Sound overlay */
.sound-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.sound-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.sound-overlay-content {
    text-align: center;
    color: white;
    animation: soundPulse 2s ease-in-out infinite;
}

.sound-overlay-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
}

.sound-overlay-text {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
}

@keyframes soundPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

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

/* App Layout: sidebar + main */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.main {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.game-section {
    display: none;
}

.game-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-container {
    background: rgba(26, 44, 56, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* Selection */
::selection {
    background: var(--accent);
    color: white;
}
