@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

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

/* Dark Theme - Doom/StarCraft/Quake Style */
:root {
    --primary-color: #ff6b1a;
    --secondary-color: #ffd700;
    --tertiary-color: #ff0000;
    --bg-color: #1a0000;
    --surface-color: #2d1810;
    --text-color: #ffcc99;
    --text-secondary: #cc9966;
    --border-color: #8b4513;
    --accent-color: #ff4500;
    --health-red: #cc0000;
    --armor-yellow: #ffcc00;
    --ammo-orange: #ff8800;
    --pixel-size: 3px;
    --font-main: 'VT323', monospace;
    --font-title: 'Press Start 2P', cursive;
}

/* Light Theme - Warcraft/Commander Keen/Wolfenstein Style */
[data-theme="light"] {
    --primary-color: #0066cc;
    --secondary-color: #00aa00;
    --tertiary-color: #ffcc00;
    --bg-color: #e8d4a0;
    --surface-color: #f5e6d3;
    --text-color: #2c1810;
    --text-secondary: #5a4030;
    --border-color: #8b6914;
    --accent-color: #cc6600;
    --health-red: #ff3333;
    --armor-yellow: #ffdd00;
    --ammo-orange: #ff9900;
}

/* Pro Theme - Ultra Modern Light */
[data-fun="off"][data-theme="light"] {
    --primary-color: #0ea5e9;
    --secondary-color: #38bdf8;
    --tertiary-color: #7dd3fc;
    --bg-color: #fafbfc;
    --surface-color: rgba(255, 255, 255, 0.8);
    --text-color: #1a202c;
    --text-secondary: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --accent-color: #3b82f6;
    --gradient-1: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --gradient-2: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Pro Theme - Ultra Modern Dark */
[data-fun="off"][data-theme="dark"] {
    --primary-color: #38bdf8;
    --secondary-color: #7dd3fc;
    --tertiary-color: #93c5fd;
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.8);
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: rgba(51, 65, 85, 0.8);
    --accent-color: #60a5fa;
    --gradient-1: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --gradient-2: linear-gradient(135deg, #38bdf8 0%, #0369a1 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Body styling */
body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: all 0.3s ease;
    font-size: 18px;
}

body[data-fun="on"] {
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0,0,0,0.15),
            rgba(0,0,0,0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Doom-style texture overlay for dark theme */
body[data-fun="on"][data-theme="dark"]::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 107, 26, 0.03) 2px,
            rgba(255, 107, 26, 0.03) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* Professional Theme Background */
body[data-fun="off"] {
    background: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

/* Animated gradient background for Pro theme */
body[data-fun="off"]::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        var(--primary-color) 0%,
        var(--secondary-color) 25%,
        var(--tertiary-color) 50%,
        var(--secondary-color) 75%,
        var(--primary-color) 100%
    );
    opacity: 0.05;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0% { transform: rotate(0deg) scale(2); }
    50% { transform: rotate(180deg) scale(2.5); }
    100% { transform: rotate(360deg) scale(2); }
}

/* Floating particles for Pro theme */
body[data-fun="off"]::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--primary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.02;
    animation: particleFloat 20s linear infinite;
    z-index: -1;
}

@keyframes particleFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50px); }
}

/* Navigation styles */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

/* Dark theme nav */
body[data-theme="dark"] nav {
    background: rgba(15, 23, 42, 0.95);
}

/* Light theme nav */
body[data-theme="light"] nav {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Fun mode adjustments */
body[data-fun="on"][data-theme="dark"] nav {
    background: rgba(45, 24, 16, 0.95);
}

body[data-fun="on"][data-theme="light"] nav {
    background: rgba(245, 230, 211, 0.95);
}

body[data-fun="off"] nav {
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Control buttons */
.control-panel {
    display: flex;
    gap: 5px;
}

.control-btn {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.1s ease;
    font-size: 14px;
    min-width: 45px;
}

body[data-fun="on"] .control-btn {
    border: 3px solid var(--border-color);
    box-shadow: 
        inset -2px -2px 0 rgba(0,0,0,0.5),
        inset 2px 2px 0 rgba(255,255,255,0.3);
}

body[data-fun="off"] .control-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light mode control buttons */
body[data-theme="light"] .control-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

body[data-theme="light"][data-fun="off"] .control-btn {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--primary-color);
}

.control-btn:hover {
    transform: translateY(1px);
}

body[data-fun="on"] .control-btn:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

body[data-fun="off"] .control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-content {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--surface-color);
        flex-direction: column;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        gap: 1rem;
    }
    
    .nav-content.active {
        transform: translateX(0);
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
    }
    
    .control-panel {
        width: 100%;
        justify-content: center;
    }
}