/* ========================================
   MINES - THEME
   Premium Stake-inspired Design System
   ======================================== */

:root {
    /* === BACKGROUND COLORS (aligned with main site) === */
    --mines-bg-dark: #0a0a0f;
    --mines-bg-base: #12121a;
    --mines-bg-elevated: #18182a;
    --mines-bg-card: rgba(255, 255, 255, 0.03);
    --mines-bg-input: #1a1a2a;
    --mines-bg-tile: #22223a;
    --mines-bg-tile-hover: #2a2a45;

    /* === PRIMARY COLORS (Neon Green) === */
    --mines-primary: #00e701;
    --mines-primary-dark: #00c401;
    --mines-primary-glow: rgba(0, 231, 1, 0.35);
    --mines-primary-subtle: rgba(0, 231, 1, 0.12);

    /* === ACCENT COLORS === */
    --mines-secondary: #9945FF;
    --mines-accent-gold: #ffc107;
    --mines-accent-gold-glow: rgba(255, 193, 7, 0.3);

    /* === STATUS COLORS === */
    --mines-success: #00e701;
    --mines-danger: #ff4757;
    --mines-warning: #ffc107;

    /* === TEXT COLORS === */
    --mines-text: #ffffff;
    --mines-text-secondary: rgba(255, 255, 255, 0.72);
    --mines-text-muted: rgba(255, 255, 255, 0.45);
    --mines-text-subtle: rgba(255, 255, 255, 0.28);

    /* === BORDER COLORS === */
    --mines-border: rgba(255, 255, 255, 0.06);
    --mines-border-subtle: rgba(255, 255, 255, 0.04);
    --mines-border-active: rgba(255, 255, 255, 0.12);
    --mines-border-highlight: rgba(255, 255, 255, 0.08);

    /* === GEM & MINE SPECIFIC === */
    --mines-gem: #00e701;
    --mines-gem-glow: rgba(0, 231, 1, 0.45);
    --mines-gem-border: rgba(0, 231, 1, 0.6);
    --mines-mine: #ff4757;
    --mines-mine-glow: rgba(255, 71, 87, 0.45);
    --mines-mine-border: rgba(255, 71, 87, 0.6);

    /* === SPACING === */
    --space-2xs: 2px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    --space-4xl: 40px;

    /* === TYPOGRAPHY === */
    --font-family: 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-2xs: 10px;
    --font-xs: 11px;
    --font-sm: 12px;
    --font-base: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 18px;
    --font-2xl: 22px;
    --font-3xl: 28px;

    /* === EFFECTS === */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    --transition-fast: 0.12s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.35s ease;

    /* === SHADOWS === */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-panel: 0 18px 40px rgba(0, 0, 0, 0.45);
    --shadow-glow-green: 0 0 20px var(--mines-primary-glow);
    --shadow-glow-gold: 0 0 20px var(--mines-accent-gold-glow);
    --shadow-inset-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);

    /* === LAYOUT === */
    --sidebar-width: 260px;
    --sidebar-gap: 40px;
    --page-max-width: 1100px;
    --page-padding: 20px;
    --tile-size: 72px;
    --tile-gap: 10px;

    /* === TOUCH === */
    --touch-target-min: 44px;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    color: var(--mines-text);
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0e0e14 100%);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* === AMBIENT BACKGROUND CONTAINER === */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0e0e14 100%);
}

/* === AMBIENT BLOBS (Lava-lamp style, subtle) === */
.ambient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.07;
    pointer-events: none;
    will-change: transform;
}

.ambient-blob-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(153, 69, 255, 0.6) 0%, transparent 70%);
    top: -20%;
    left: -15%;
    animation: ambientDrift1 35s ease-in-out infinite;
}

.ambient-blob-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(20, 241, 149, 0.5) 0%, transparent 70%);
    bottom: -25%;
    right: -10%;
    animation: ambientDrift2 40s ease-in-out infinite;
}

.ambient-blob-3 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(153, 69, 255, 0.5) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    animation: ambientDrift3 30s ease-in-out infinite;
}

@keyframes ambientDrift1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(5%, 10%) scale(1.1);
    }
    50% {
        transform: translate(10%, 5%) scale(0.95);
    }
    75% {
        transform: translate(-5%, 8%) scale(1.05);
    }
}

@keyframes ambientDrift2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-8%, -5%) scale(1.08);
    }
    66% {
        transform: translate(5%, -10%) scale(0.92);
    }
}

@keyframes ambientDrift3 {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-45%) scale(1.15) translateY(-5%);
    }
}

/* === STARS BACKGROUND (matching main site) === */
.particles {
    position: fixed;
    inset: 0;
    z-index: -5;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

/* === VIGNETTE OVERLAY === */
.vignette-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 70% 60% at center, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}

/* === MASCOT === */
.mascot-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 5;
    pointer-events: none;
}

.mascot {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
    /* No animation - static like Desert Fortune */
}

/* === GAME STATE COLOR SHIFTS === */
body {
    transition: background-color 2.5s ease;
}

body.state-safe .ambient-blob-1 {
    opacity: 0.09;
    transition: opacity 2s ease;
}

body.state-loss .ambient-bg {
    filter: brightness(0.85) saturate(0.8);
    transition: filter 2s ease;
}

/* === UTILITIES === */
.text-muted {
    color: var(--mines-text-muted);
}

.text-secondary {
    color: var(--mines-text-secondary);
}

.text-success {
    color: var(--mines-success);
}

.text-danger {
    color: var(--mines-danger);
}

.text-gold {
    color: var(--mines-accent-gold);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
