:root {
    --bg-color: #050505;
    --term-green: #0f0;
    --term-dim: #005500;
    --term-glow: 0 0 10px #0f0;
    --font-stack: 'Fira Code', monospace;
    --panel-border: 1px solid #1a1a1a;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--term-green);
    font-family: var(--font-stack);
    overflow: hidden;
}

/* --- BOOT SCREEN --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#matrixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 90;
    opacity: 0.3;
}

#boot-content {
    z-index: 100;
    text-align: center;
    width: 80%;
    max-width: 600px;
}

#boot-logo {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 0 20px #0f0);
    margin-bottom: 30px;
    animation: pulseLogo 2s infinite alternate;
}

#boot-text {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: var(--term-glow);
}

#progress-bar-container {
    width: 100%;
    height: 4px;
    background: #111;
    border: 1px solid #333;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--term-green);
    box-shadow: var(--term-glow);
    transition: width 0.1s linear;
}

#boot-log {
    font-size: 12px;
    color: #444;
    text-align: left;
    height: 60px;
    overflow: hidden;
    font-family: monospace;
}

/* --- MAIN INTERFACE --- */
#main-interface {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 50;
    opacity: 1;
    transition: opacity 1s;
}

#main-interface.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Terminal Panel */
#terminal-panel {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Map Panel */
#map-panel {
    flex: 0 0 0;
    /* Hidden by default width */
    width: 0;
    background: #080808;
    border-left: var(--panel-border);
    position: relative;
    overflow: hidden;
    transition: width 0.5s ease-in-out, flex 0.5s ease-in-out;
}

#map-panel.active {
    flex: 1;
    width: 50%;
}

#map-header {
    position: absolute;
    top: 10px;
    left: 20px;
    color: var(--term-green);
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
    border-bottom: 1px solid #0f0;
    padding-bottom: 5px;
}

#map-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 20px;
    pointer-events: none;
}

.stat-box {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #0f0;
    padding: 5px 10px;
    font-size: 12px;
}

/* Terminal Elements */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #003300;
    border-radius: 4px;
}

#output {
    white-space: pre-wrap;
    word-break: break-all;
    flex-grow: 1;
    padding-bottom: 20px;
}

#input-line {
    display: flex;
    align-items: center;
    background: #000;
    /* Stick to bottom */
    padding-top: 10px;
}

#prompt-display {
    color: #50fa7b;
    text-shadow: var(--term-glow);
    margin-right: 10px;
    white-space: nowrap;
}

#cmd-input {
    background: transparent;
    border: none;
    color: var(--term-green);
    font-family: var(--font-stack);
    font-size: 16px;
    flex-grow: 1;
    outline: none;
    caret-color: transparent;
    text-shadow: var(--term-glow);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--term-green);
    text-shadow: var(--term-glow);
    margin-left: -10px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes pulseLogo {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 10px #0f0);
    }

    to {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px #0f0);
    }
}

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

.img-popup {
    margin: 10px 0;
}

.img-header {
    color: #0f0;
    font-size: 0.8em;
    border-bottom: 1px dashed #0f0;
    display: inline-block;
    margin-bottom: 5px;
}

/* Attacks visual style */
.progress-container {
    width: 300px;
    background: #222;
    border: 1px solid #444;
    margin: 5px 0;
    height: 15px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #0f0;
    width: 0%;
    transition: width 0.2s;
}

.log-line {
    font-size: 0.9em;
    color: #aaa;
}

.log-success {
    color: #0f0;
    font-weight: bold;
}