@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
    --clr-bg: #0a0a0b;
    --clr-toxic: #a3e635;
    --clr-toxic-rgb: 163, 230, 53;
    --clr-hazard: #facc15;
    --clr-emergency: #ef4444;
    --clr-text: #e2e8f0;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --hud-border: rgba(163, 230, 53, 0.3);
    --hud-bg: rgba(0, 0, 0, 0.7);
    --glow: 0 0 15px rgba(163, 230, 53, 0.4);
}

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

body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('assets/bg_hud.png') center/cover no-repeat;
    filter: brightness(0.4) contrast(1.2) saturate(0.8);
    z-index: -2;
}

/* HUD OVERLAYS */
.hud-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.1) 50%
    ), linear-gradient(
        90deg, 
        rgba(255, 0, 0, 0.02), 
        rgba(0, 255, 0, 0.01), 
        rgba(0, 0, 255, 0.02)
    );
    background-size: 100% 4px, 3px 100%;
    opacity: 0.3;
}

.vignette {
    background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.8) 100%);
}

.noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
}

/* LOADER / BOOT SEQUENCE */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out;
}

.loader-content {
    width: 350px;
    text-align: left;
    font-family: var(--font-mono);
}

.boot-text {
    color: var(--clr-toxic);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.loader-bar-container {
    height: 4px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.loader-bar {
    position: absolute;
    left: 0; top: 0; height: 100%;
    background: var(--clr-toxic);
    width: 0%;
    animation: load 1s forwards cubic-bezier(0.1, 0.5, 0.5, 1);
}

@keyframes load { to { width: 100%; } }

.boot-log {
    font-size: 0.6rem;
    color: rgba(163, 230, 53, 0.5);
    line-height: 1.5;
}

/* HUD LAYOUT */
.hud-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
}

.hud-top, .hud-bottom {
    display: flex;
    justify-content: space-between;
}

.hud-center {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HUD COMPONENTS */
.hud-box {
    background: var(--hud-bg);
    border: 1px solid var(--hud-border);
    padding: 1rem 1.5rem;
    position: relative;
    backdrop-filter: blur(8px);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
    box-shadow: var(--glow);
    transition: all 0.3s ease;
}

.hud-box::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; width: 12px; height: 12px;
    border-top: 2px solid var(--clr-toxic);
    border-left: 2px solid var(--clr-toxic);
}

.box-label {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--clr-toxic);
    margin-bottom: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.8;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--clr-toxic);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--clr-toxic);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

.lang-switch {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
}

.lang-switch button {
    background: transparent;
    border: 1px solid var(--hud-border);
    color: #fff;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    transition: all 0.2s;
}

.lang-switch button.active, .lang-switch button:hover {
    background: var(--clr-toxic);
    color: #000;
}

.intel-grid {
    display: flex;
    gap: 2rem;
}

.intel-item {
    display: flex;
    flex-direction: column;
}

.intel-item .label {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.2rem;
}

.intel-item .value {
    color: var(--clr-toxic);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

/* CENTER AREA */
.main-content {
    text-align: center;
    max-width: 800px;
}

.logo-container {
    margin-bottom: 2rem;
}

#logo-img {
    max-height: 280px;
    max-width: 90vw;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(var(--clr-toxic-rgb), 0.3));
}

.tagline {
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 6vw, 3.5rem);
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.6rem;
    margin-bottom: 3.5rem;
    text-shadow: 0 0 15px rgba(255,255,255,0.4);
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.btn-hud {
    padding: 1.2rem 4rem;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--clr-toxic);
}

.btn-command {
    background: var(--clr-toxic);
    color: #000;
    font-size: 1.3rem;
    box-shadow: 0 0 40px rgba(var(--clr-toxic-rgb), 0.5);
}

.btn-command:hover {
    transform: scale(1.1) translateY(-5px);
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 60px rgba(255,255,255,0.7);
}

.btn-secondary {
    background: rgba(0,0,0,0.4);
    color: var(--clr-toxic);
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(var(--clr-toxic-rgb), 0.2);
    transform: translateY(-2px);
}

/* BOTTOM AREA */
.vector-info {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    font-family: var(--font-mono);
}

.ip-value { color: #fff; font-size: 1.2rem; font-weight: 700; }
.ping-value { color: var(--clr-toxic); font-size: 0.9rem; }

.copy-hint {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.6rem;
    letter-spacing: 1px;
}

.mods-scroller {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: 500px;
    padding-top: 0.5rem;
}

.mods-scroller::-webkit-scrollbar { display: none; }

.mod-tag {
    background: rgba(var(--clr-toxic-rgb), 0.1);
    color: var(--clr-toxic);
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    white-space: nowrap;
    border: 1px solid var(--hud-border);
    font-family: var(--font-mono);
}

.clickable { cursor: pointer; }
.clickable:hover { border-color: #fff; }

.align-right { text-align: right; }
.align-right .mods-scroller { justify-content: flex-end; }

/* ANIMATIONS */
.animate-hud {
    opacity: 0;
    transform: translateY(30px);
}

.animate-center {
    opacity: 0;
    transform: scale(0.95);
}

body:not(.loading) .animate-hud {
    animation: slideIn 0.8s forwards;
}

body:not(.loading) .animate-center {
    animation: fadeInScale 1s forwards 0.6s;
}

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

@keyframes fadeInScale {
    to { opacity: 1; transform: scale(1); }
}

.glitch-container:hover #logo-img {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    25% { transform: translate(-3px, 3px); box-shadow: 2px 0 red; }
    50% { transform: translate(-3px, -3px); box-shadow: -2px 0 blue; }
    75% { transform: translate(3px, 3px); }
    100% { transform: translate(0); }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hud-container { padding: 1.5rem; overflow-y: auto; height: auto; min-height: 100vh; }
    .hud-top, .hud-bottom { flex-direction: column; gap: 1.5rem; align-items: center; }
    .align-right { text-align: center; }
    .align-right .mods-scroller { justify-content: center; }
    .intel-grid { justify-content: center; }
}

@media (max-width: 768px) {
    .tagline { font-size: 1.8rem; letter-spacing: 0.3rem; }
    #logo-img { max-height: 180px; }
    .btn-hud { padding: 1rem 2rem; width: 100%; text-align: center; }
    .hud-center { margin: 3rem 0; }
}
