/* 
 * Legendary Design System v2 - Conquer Online
 * Theme: Celestial Warlord (Vibrant Gold, Deep Red, Dark Metal)
 */

:root {
    /* Colors */
    --obsidian-dark: #0f1015;
    --obsidian-light: #1a1c24;
    --gold-primary: #ffb700;
    /* Brighter Gold */
    --gold-secondary: #ffd700;
    --gold-dim: #b8860b;
    --crimson-accent: #ff0033;
    /* Vibrant Red */
    --crimson-dark: #8b0000;
    --text-main: #ffffff;
    /* Pure white for main text */
    --text-muted: #dcdcdc;
    /* Much brighter gray for muted text */

    /* Gradients */
    --bg-gradient: linear-gradient(180deg, var(--obsidian-dark) 0%, #050505 100%);
    --gold-gradient: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    --crimson-gradient: linear-gradient(135deg, #ff0033 0%, #cc0000 100%);
    --dark-glass: rgba(15, 16, 21, 0.85);

    /* Glassmorphism */
    --glass-bg: rgba(26, 28, 36, 0.8);
    --glass-border: 1px solid rgba(255, 183, 0, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);

    /* Fonts */
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

/* Base Reset & Typography */
body {
    background: var(--obsidian-dark);
    background-image: radial-gradient(circle at top center, #1a1c24 0%, #0f1015 60%);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--gold-primary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(255, 183, 0, 0.2);
}

a {
    color: var(--gold-secondary);
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--gold-primary);
    text-decoration: none;
}

/* Utility Classes */
.text-gold {
    color: var(--gold-primary) !important;
}

.text-crimson {
    color: var(--crimson-accent) !important;
}

/* Force high contrast for standard bootstrap classes on dark mode */
.text-muted {
    color: var(--text-muted) !important;
}

.text-dark {
    color: #212529 !important;
    /* Keep dark for buttons */
}

/* Ensure raw text is visible */
p,
span,
li,
div {
    color: inherit;
}

.glow-text {
    text-shadow: 0 0 15px rgba(255, 183, 0, 0.6);
}

/* Glassmorphism Cards */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 4px;
    /* Sharper corners for game feel */
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold-gradient);
    opacity: 0.5;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px 0 rgba(0, 0, 0, 0.8);
    border-color: var(--gold-primary);
}

.glass-panel:hover::before {
    opacity: 1;
    box-shadow: 0 0 10px var(--gold-primary);
}

/* Buttons */
.btn-legendary {
    background: var(--gold-gradient);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 2px;
    padding: 12px 35px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    box-shadow: 0 0 20px rgba(255, 183, 0, 0.3);
    position: relative;
    z-index: 1;
}

.btn-legendary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    opacity: 0;
    z-index: -1;
    transition: 0.3s;
}

.btn-legendary:hover {
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 183, 0, 0.6);
}

.btn-legendary:hover::after {
    opacity: 1;
}

/* Navbar Overrides */
.navbar {
    background: rgba(15, 16, 21, 0.95) !important;
    border-bottom: 2px solid var(--gold-dim);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand span {
    font-family: var(--font-heading) !important;
    letter-spacing: 2px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted) !important;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold-primary) !important;
    text-shadow: 0 0 10px rgba(255, 183, 0, 0.5);
}

/* Footer */
.footer-legendary {
    background: #08080a;
    border-top: 3px solid var(--gold-dim);
    padding: 50px 0;
    margin-top: 80px;
    background-image: url('../images/bg-pattern.png');
    /* If available */
}

.hover-gold:hover {
    color: var(--gold-primary) !important;
    padding-left: 5px;
    transition: 0.2s;
}

/* Enhanced Fire Effect */
@keyframes gunfire-flicker {
    0% {
        box-shadow:
            0 0 30px rgba(255, 69, 0, 0.8) inset,
            0 0 20px rgba(255, 69, 0, 0.6),
            0 0 40px rgba(255, 69, 0, 0.4);
        border-color: rgba(255, 69, 0, 0.8);
    }

    15% {
        box-shadow:
            0 0 80px rgba(255, 215, 0, 0.9) inset,
            0 0 40px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.6);
        border-color: rgba(255, 215, 0, 1);
    }

    30% {
        box-shadow:
            0 0 50px rgba(255, 0, 0, 0.8) inset,
            0 0 30px rgba(255, 0, 0, 0.7),
            0 0 50px rgba(255, 0, 0, 0.5);
        border-color: rgba(255, 0, 0, 0.9);
    }

    45% {
        box-shadow:
            0 0 100px rgba(255, 140, 0, 1) inset,
            0 0 50px rgba(255, 140, 0, 0.9),
            0 0 80px rgba(255, 140, 0, 0.7);
        border-color: rgba(255, 140, 0, 1);
    }

    60% {
        box-shadow:
            0 0 60px rgba(255, 69, 0, 0.9) inset,
            0 0 25px rgba(255, 69, 0, 0.8),
            0 0 45px rgba(255, 69, 0, 0.6);
        border-color: rgba(255, 69, 0, 0.9);
    }

    75% {
        box-shadow:
            0 0 90px rgba(255, 255, 100, 0.8) inset,
            0 0 45px rgba(255, 255, 100, 0.7),
            0 0 70px rgba(255, 255, 100, 0.5);
        border-color: rgba(255, 255, 100, 0.9);
    }

    90% {
        box-shadow:
            0 0 70px rgba(255, 140, 0, 0.95) inset,
            0 0 35px rgba(255, 140, 0, 0.85),
            0 0 60px rgba(255, 140, 0, 0.7);
        border-color: rgba(255, 140, 0, 0.95);
    }

    100% {
        box-shadow:
            0 0 30px rgba(255, 69, 0, 0.8) inset,
            0 0 20px rgba(255, 69, 0, 0.6),
            0 0 40px rgba(255, 69, 0, 0.4);
        border-color: rgba(255, 69, 0, 0.8);
    }
}

.hero-fire-effect {
    position: relative;
    border: 4px solid transparent;
    animation: gunfire-flicker 2s infinite alternate;
    box-sizing: border-box;
    z-index: 10;
}