:root {
    --bg-color: #0a0a12;
    --text-color: #e0e0e0;
    --accent-color: #00ff88;
    --nav-bg: rgba(10, 10, 18, 0.95);
    --font-main: 'Segoe UI', system-ui, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    border-bottom: 1px solid #333;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0a0a12 100%);
}

.hero-container {
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s forwards;
}

.highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s 0.2s forwards;
}

.hero-description {
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.4s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fsim {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    border-top: 2px solid #333;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-bottom: 1px solid #333;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 16px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

#fsim-canvas-container {
    width: 100%;
    height: 100%;
    display: block;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hud-panel {
    position: absolute;
    background: rgba(0, 20, 0, 0.6);
    border: 2px solid #0f0;
    color: #0f0;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.2s;
    font-family: 'Segoe UI', monospace;
}

.hud-panel.danger {
    background: rgba(100, 0, 0, 0.6);
    border-color: #f00;
    color: #f00;
    box-shadow: 0 0 30px #f00;
    animation: shake 0.5s infinite;
}

#top-bar {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    min-width: 100px;
}

#left-bar {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 120px;
    text-align: right;
}

#right-bar {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 120px;
}

.val {
    font-size: 28px;
    letter-spacing: 2px;
}

.lbl {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 5px;
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border: 1px solid #444;
    pointer-events: none;
    font-family: 'Segoe UI', monospace;
}

#alert-box {
    display: none;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #f00;
    font-weight: 900;
    text-shadow: 0 0 20px #f00;
    text-align: center;
    border: 4px solid #f00;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', monospace;
}

#game-over {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    font-family: 'Segoe UI', monospace;
}

#game-over h1 {
    font-size: 80px;
    color: #ff3300;
    margin: 0;
    text-shadow: 0 0 30px #ff3300;
}

@keyframes shake {
    0% { transform: translate(1px, 1px); }
    50% { transform: translate(-1px, -1px); }
    100% { transform: translate(1px, 1px); }
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
}
