﻿/* ============================================================
   R6S OJHA MAP OVERHAUL â€” STYLES.CSS
   V2_CREATIVE_RESET
   ============================================================ */

:root {
    --bg-void: #030406;
    --bg-base: #07090c;
    --bg-panel: rgba(10, 14, 20, 0.85);
    --bg-card: rgba(18, 22, 30, 0.9);
    
    --orange: #ff5500;
    --orange-glow: rgba(255, 85, 0, 0.4);
    --orange-dim: #a63a04;
    
    --blue: #4090ff;
    --blue-glow: rgba(64, 144, 255, 0.2);
    --blue-dim: #1a4a8a;
    
    --text-main: #dfdfdf;
    --text-dim: #8892a0;
    --text-dark: #4b586a;
    
    --border-light: rgba(255, 255, 255, 0.15);
    --border-dim: rgba(255, 255, 255, 0.05);

    --ff-head: 'Teko', sans-serif;
    --ff-body: 'Rajdhani', sans-serif;
    --ff-mono: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-void);
    color: var(--text-main);
    font-family: var(--ff-body);
    line-height: 1.5;
    overflow-x: hidden;
    overflow-y: hidden; /* App-like feel, scroll inside panels */
    height: 100vh;
    user-select: none;
}

/* â”€â”€ OVERLAYS â”€â”€ */
.scanlines {
    position: fixed; inset: 0; z-index: 9991; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
    background-size: 100% 4px; opacity: 0.6;
}
.vignette {
    position: fixed; inset: 0; z-index: 9992; pointer-events: none;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.9) 110%);
}
.noise {
    position: fixed; inset: 0; z-index: 9993; pointer-events: none; opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ui-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.03;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, #fff 1px, transparent 1px), linear-gradient(to bottom, #fff 1px, transparent 1px);
}

/* â”€â”€ BOOT SEQUENCE â”€â”€ */
.hud-boot {
    position: fixed; inset: 0; z-index: 10000; background: #000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
.hud-boot.done { opacity: 0; visibility: hidden; }
.boot-text { font-family: var(--ff-mono); font-size: 14px; color: var(--orange); letter-spacing: 4px; margin-bottom: 20px; }
.boot-bar { width: 300px; height: 2px; background: #222; overflow: hidden; }
.boot-fill { width: 0%; height: 100%; background: var(--orange); }

/* â”€â”€ TERMINAL FRAME â”€â”€ */
.terminal-frame { position: fixed; inset: 20px; z-index: 9000; pointer-events: none; border: 1px solid var(--border-dim); }
.tf-top { position: absolute; top: -1px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 10px; transform: translateY(-100%); }
.tf-bottom { position: absolute; bottom: -1px; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; transform: translateY(100%); }
.tf-left { position: absolute; left: -1px; top: 0; bottom: 0; display: flex; align-items: center; transform: translateX(-100%); }
.tf-right { position: absolute; right: -1px; top: 0; bottom: 0; display: flex; align-items: center; transform: translateX(100%); }
.tf-lbl { font-family: var(--ff-mono); font-size: 10px; color: var(--text-dark); letter-spacing: 2px; }
.tf-lbl-vert { writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); }
.tf-line { flex: 1; height: 1px; background: var(--border-dim); margin: 0 20px; }

/* â”€â”€ NAVIGATION â”€â”€ */
.tactical-nav {
    position: fixed; top: 30px; left: 40px; right: 40px; z-index: 8000;
    display: flex; justify-content: space-between; align-items: flex-end;
    border-bottom: 1px solid var(--border-light); padding-bottom: 10px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nb-r6s { font-family: var(--ff-head); font-size: 24px; color: var(--orange); font-weight: 700; line-height: 1; margin-top: 4px; }
.nb-title { font-family: var(--ff-head); font-size: 28px; color: var(--text-main); font-weight: 600; letter-spacing: 4px; line-height: 1; }
.nb-sub { font-family: var(--ff-mono); font-size: 10px; color: var(--text-dark); letter-spacing: 2px; border-left: 1px solid var(--orange); padding-left: 8px; margin-left: 8px; }

.nav-links { display: flex; gap: 20px; }
.nav-btn {
    background: none; border: none; font-family: var(--ff-mono); font-size: 12px; color: var(--text-dim);
    letter-spacing: 2px; cursor: pointer; position: relative; padding-bottom: 10px; margin-bottom: -11px;
    transition: color 0.3s;
}
.nav-btn:hover { color: var(--text-main); }
.nav-btn.active { color: var(--orange); }
.nav-btn.active::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--orange); box-shadow: 0 0 10px var(--orange-glow); }

/* â”€â”€ VIEW CONTAINER â”€â”€ */
.view-container {
    position: absolute; top: 90px; left: 40px; right: 40px; bottom: 40px;
    z-index: 10;
}
.view-panel {
    position: absolute; inset: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: scale(0.98);
    display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--orange-dim) var(--bg-base);
}
.view-panel.active-view { opacity: 1; visibility: visible; pointer-events: auto; transform: scale(1); }

/* â”€â”€ COMMON UI ELEMENTS â”€â”€ */
.action-btn {
    background: rgba(255, 85, 0, 0.1); border: 1px solid var(--orange);
    color: var(--orange); font-family: var(--ff-head); font-size: 20px; font-weight: 600;
    letter-spacing: 2px; cursor: pointer; padding: 10px 24px; transition: all 0.2s;
    text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center;
}
.action-btn:hover { background: var(--orange); color: #000; box-shadow: 0 0 20px var(--orange-glow); }
.action-btn-large { font-size: 24px; padding: 12px 40px; }

.ds-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ds-item { background: rgba(255,255,255,0.03); border: 1px solid var(--border-dim); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.dk { font-family: var(--ff-mono); font-size: 9px; color: var(--text-dark); letter-spacing: 1px; }
.dv { font-family: var(--ff-head); font-size: 18px; color: var(--text-main); font-weight: 600; letter-spacing: 1px; line-height: 1; text-transform: uppercase; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 30px; }

/* â”€â”€ HERO VIEW â”€â”€ */
#view-hero { align-items: center; justify-content: center; overflow: hidden; }
.hero-bg { position: absolute; inset: -5%; background-size: cover; background-position: center; filter: grayscale(80%) contrast(1.2) brightness(0.6); opacity: 0.4; z-index: 0; }
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-badge {
    border: 1px solid var(--orange); color: var(--orange); padding: 4px 12px;
    font-family: var(--ff-mono); font-size: 11px; letter-spacing: 4px; margin-bottom: 20px;
    background: rgba(255,85,0,0.1); backdrop-filter: blur(4px);
}
.hero-title {
    font-family: var(--ff-head); font-size: clamp(80px, 15vw, 180px); line-height: 0.8;
    color: #fff; text-transform: uppercase; letter-spacing: 10px; font-weight: 700;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8); position: relative;
}
.title-glow {
    position: absolute; top: 0; left: 0; right: 0; color: var(--orange); z-index: -1;
    filter: blur(20px); opacity: 0.5;
}
.hero-subtitle {
    font-family: var(--ff-mono); font-size: 14px; color: var(--text-dim); letter-spacing: 8px;
    margin-top: 20px; margin-bottom: 50px; text-transform: uppercase;
}
.hero-intel-cards { display: flex; gap: 20px; margin-bottom: 50px; }
.hi-card {
    background: var(--bg-card); border: 1px solid var(--border-light); backdrop-filter: blur(10px);
    width: 250px; display: flex; flex-direction: column; text-align: left;
}
.hic-img { height: 120px; background-size: cover; background-position: center; filter: grayscale(0.5); border-bottom: 1px solid var(--border-dim); }
.hic-data { padding: 12px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.hic-k { font-family: var(--ff-mono); font-size: 9px; color: var(--text-dark); letter-spacing: 1px; }
.hic-v { font-family: var(--ff-body); font-size: 12px; color: var(--text-main); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* â”€â”€ MAP VIEW â”€â”€ */
.map-layout { display: flex; width: 100%; height: 100%; gap: 20px; }
.map-viewport { flex: 1; border: 1px solid var(--border-light); background: #020305; position: relative; overflow: hidden; }
#map-canvas { width: 100%; height: 100%; display: block; }
.map-sidebar { width: 380px; flex-shrink: 0; background: var(--bg-panel); border: 1px solid var(--border-light); backdrop-filter: blur(16px); display: flex; flex-direction: column; overflow-y: auto; }

/* MAP OVERLAYS */
.map-overlay-hud { position: absolute; inset: 0; pointer-events: none; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.moh-top { display: flex; gap: 20px; }
.moh-stat { background: rgba(0,0,0,0.6); border: 1px solid var(--border-dim); padding: 4px 12px; display: flex; gap: 10px; align-items: baseline; backdrop-filter: blur(4px); }
.moh-stat .lbl { font-family: var(--ff-mono); font-size: 10px; color: var(--text-dark); }
.moh-stat .val { font-family: var(--ff-mono); font-size: 14px; color: var(--text-main); }
.moh-bot { display: flex; justify-content: center; pointer-events: auto; }
.moh-modes { display: flex; background: rgba(0,0,0,0.8); border: 1px solid var(--border-light); backdrop-filter: blur(8px); }
.mode-btn { background: none; border: none; border-right: 1px solid var(--border-dim); font-family: var(--ff-mono); font-size: 11px; padding: 8px 16px; color: var(--text-dim); cursor: pointer; letter-spacing: 1px; transition: all 0.2s; }
.mode-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.mode-btn.active { background: var(--orange-glow); color: var(--orange); }
.mode-btn-icon { border-right: none; font-size: 14px; padding: 6px 14px; }

/* HTML 3D LABELS */
.map-html-labels { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.map-label {
    position: absolute; transform: translate(-50%, -50%); padding: 4px 8px;
    background: rgba(5,7,10,0.85); border: 1px solid rgba(255,255,255,0.2);
    font-family: var(--ff-body); font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
    color: var(--text-main); text-transform: uppercase; cursor: pointer; pointer-events: auto;
    transition: all 0.2s; backdrop-filter: blur(2px);
}
.map-label:hover { border-color: var(--orange); color: var(--orange); background: rgba(255,85,0,0.1); transform: translate(-50%, -50%) scale(1.05); }
.map-label.dimc-label { border-color: var(--orange); color: var(--orange); font-size: 13px; padding: 4px 12px; background: rgba(255,85,0,0.15); box-shadow: 0 0 15px rgba(255,85,0,0.3); }

/* SIDEBAR INTEL */
.ms-header { padding: 16px 20px; border-bottom: 1px solid var(--border-dim); display: flex; justify-content: space-between; align-items: center; }
.ms-header h2 { font-family: var(--ff-head); font-size: 24px; color: var(--text-main); font-weight: 600; letter-spacing: 2px; }
.ms-dot { width: 8px; height: 8px; background: var(--orange); display: block; }
.blink { animation: blinker 1.5s infinite; }
@keyframes blinker { 50% { opacity: 0.2; } }
.ms-body { padding: 20px; flex: 1; }
.ms-alert { background: rgba(255,85,0,0.1); border-left: 2px solid var(--orange); color: var(--orange); font-family: var(--ff-mono); font-size: 10px; padding: 8px 12px; letter-spacing: 1px; margin-bottom: 20px; }

.ms-img-block { width: 100%; height: 160px; background-color: #111; border: 1px solid var(--border-dim); background-size: cover; background-position: center; position: relative; }
.ms-img-block::after { content:''; position: absolute; inset: 0; background: inset 0 0 40px rgba(0,0,0,0.8); }

.ms-routes h3 { font-family: var(--ff-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 2px; border-bottom: 1px solid var(--border-dim); padding-bottom: 8px; margin-bottom: 12px; }
.route-btn { width: 100%; text-align: left; background: rgba(255,255,255,0.02); border: 1px solid var(--border-dim); padding: 12px; font-family: var(--ff-body); font-size: 13px; font-weight: 600; letter-spacing: 1px; color: var(--text-main); cursor: pointer; display: flex; align-items: center; margin-bottom: 4px; transition: all 0.2s; }
.route-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.rt-ico { color: var(--text-dark); margin-right: 12px; font-size: 10px; }
.route-btn.active { border-color: var(--orange); background: rgba(255,85,0,0.1); }
.route-btn.active .rt-ico { color: var(--orange); }
.rt-risk { margin-left: auto; font-family: var(--ff-mono); font-size: 9px; padding: 2px 6px; border: 1px solid currentColor; }
.risk-h { color: #f53; } .risk-m { color: #fa0; } .risk-l { color: #3c5; }

/* BUILDING DOSSIER */
.hidden { display: none !important; }
.bldg-title { display: flex; align-items: center; gap: 12px; }
#bd-id { font-family: var(--ff-mono); font-size: 14px; color: var(--orange); background: rgba(255,85,0,0.15); padding: 4px 8px; border: 1px solid var(--orange); }
.bd-line { flex: 1; height: 1px; background: var(--border-dim); }
.bldg-name { font-family: var(--ff-head); font-size: 36px; line-height: 1; color: #fff; letter-spacing: 2px; margin-top: 12px; }
.bldg-desc { font-family: var(--ff-body); font-size: 13px; color: var(--text-dim); line-height: 1.6; border-left: 2px solid var(--text-dark); padding-left: 12px; margin-top: 16px; font-style: italic; }
.bd-tactical .tk { font-family: var(--ff-mono); font-size: 10px; color: var(--orange); letter-spacing: 2px; }
.bd-tactical p { font-family: var(--ff-body); font-size: 14px; color: var(--text-main); font-weight: 500; margin-top: 6px; }

/* â”€â”€ OPERATOR VIEW â”€â”€ */
.op-layout { display: flex; width: 100%; height: 100%; border: 1px solid var(--border-light); background: var(--bg-panel); }
.op-left { width: 45%; border-right: 1px solid var(--border-dim); position: relative; background: #05070a; overflow: hidden; }
.op-portrait-bg { position: absolute; inset: 0; background-image: url('./assets/proxy-portrait.png'); background-size: cover; background-position: top center; filter: grayscale(0.2) contrast(1.1) brightness(0.9); opacity: 0.85; }
.op-glitch { position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(255,85,0,0.05) 50%); background-size: 100% 4px; pointer-events: none; }
.op-emblem { position: absolute; top: 40px; right: 40px; font-family: var(--ff-head); font-size: 64px; font-weight: 700; color: var(--orange); border: 4px solid var(--orange); padding: 20px; line-height: 0.8; opacity: 0.8; box-shadow: 0 0 30px rgba(255,85,0,0.2); }
.op-nameplate { position: absolute; bottom: 40px; left: 40px; }
.opnp-sub { font-family: var(--ff-mono); font-size: 12px; color: var(--orange); letter-spacing: 4px; margin-bottom: 4px; }
.opnp-title { font-family: var(--ff-head); font-size: 80px; font-weight: 700; color: #fff; line-height: 0.8; letter-spacing: 8px; text-shadow: 2px 2px 0 rgba(255,85,0,0.5); }

.op-right { width: 55%; padding: 40px 60px; overflow-y: auto; }
.op-header { border-bottom: 1px solid var(--border-dim); padding-bottom: 20px; }
.op-header h2 { font-family: var(--ff-head); font-size: 48px; font-weight: 600; color: #fff; letter-spacing: 2px; line-height: 1; }
.op-badge { display: inline-block; font-family: var(--ff-mono); font-size: 10px; padding: 4px 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--text-dark); margin-top: 10px; letter-spacing: 2px; color: var(--text-dim); }

.op-gadget { background: rgba(0,0,0,0.4); border: 1px solid var(--orange); border-left: 4px solid var(--orange); padding: 20px; }
.ogad-title { font-family: var(--ff-mono); font-size: 12px; color: var(--orange); letter-spacing: 2px; margin-bottom: 8px; }
.ogad-title span { font-family: var(--ff-head); font-size: 24px; color: #fff; display: block; letter-spacing: 1px; }
.ogad-desc { font-family: var(--ff-body); font-size: 15px; color: var(--text-main); line-height: 1.6; font-weight: 500;}

.op-lore { background: rgba(255,255,255,0.02); padding: 30px; border: 1px solid var(--border-dim); }
.lore-title { font-family: var(--ff-mono); font-size: 12px; color: var(--text-dark); border-bottom: 1px solid var(--border-dim); padding-bottom: 8px; margin-bottom: 16px; letter-spacing: 2px; }
.lore-p { font-family: var(--ff-body); font-size: 14px; color: var(--text-dim); line-height: 1.8; margin-bottom: 16px; text-align: justify; }
.lore-quote { font-family: var(--ff-head); font-size: 22px; color: var(--orange); font-style: italic; letter-spacing: 1px; margin-top: 24px; text-align: center; }

.op-archive { padding: 40px; border: 1px solid var(--border-light); background: linear-gradient(135deg, rgba(255,85,0,0.02), rgba(0,0,0,0.5)); box-shadow: inset 0 0 30px rgba(0,0,0,0.9); position: relative; }
.op-archive::before { content: ''; position: absolute; top: -1px; left: 20px; width: 60px; height: 1px; background: var(--orange); }
.archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 10px; }
.archive-card { border: 1px solid var(--border-dim); background: #010204; position: relative; padding: 4px; transition: all 0.3s ease; }
.archive-card:hover { border-color: rgba(255,85,0,0.3); transform: translateY(-3px); box-shadow: 0 10px 40px rgba(0,0,0,0.8); }
.ac-img { width: 100%; height: 300px; background-size: cover; background-position: center top; border-bottom: 2px solid var(--border-dim); filter: contrast(1.1) brightness(0.9) saturate(0.9); transition: all 0.3s ease; }
.archive-card:hover .ac-img { filter: contrast(1.2) brightness(1.1) saturate(1.1); border-bottom-color: var(--orange-dim); }
.ac-caption { padding: 16px; font-family: var(--ff-mono); font-size: 12px; font-weight: 600; text-align: center; letter-spacing: 4px; color: var(--text-dim); background: rgba(5,7,10,0.8); transition: color 0.3s; }
.archive-card:hover .ac-caption { color: #fff; }


.nav-brand {
    align-items: flex-start;
    gap: 18px;
}

.nav-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-return {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(255, 85, 0, 0.4);
    color: var(--orange);
    background: rgba(255, 85, 0, 0.08);
    text-decoration: none;
    font-family: var(--ff-mono);
    font-size: 10px;
    letter-spacing: 2px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-return:hover {
    transform: translateY(-2px);
    background: rgba(255, 85, 0, 0.16);
    box-shadow: 0 8px 30px rgba(255, 85, 0, 0.18);
}

.action-btn-muted {
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.action-btn-muted:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.op-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}

@media (max-width: 1180px) {
    body {
        overflow-y: auto;
        height: auto;
    }

    .terminal-frame,
    .tf-left,
    .tf-right {
        display: none;
    }

    .tactical-nav {
        top: 18px;
        left: 20px;
        right: 20px;
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .view-container {
        position: relative;
        top: 120px;
        left: 20px;
        right: 20px;
        bottom: auto;
        min-height: calc(100vh - 160px);
    }

    .view-panel {
        position: relative;
        min-height: calc(100vh - 180px);
    }

    .hero-intel-cards,
    .map-layout,
    .op-layout {
        flex-direction: column;
    }

    .map-sidebar,
    .op-left,
    .op-right {
        width: 100%;
    }

    .op-left {
        min-height: 420px;
    }
}

@media (max-width: 760px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 14px;
    }

    .hero-title {
        font-size: clamp(64px, 22vw, 120px);
        letter-spacing: 5px;
    }

    .hero-subtitle {
        letter-spacing: 4px;
        padding: 0 10px;
    }

    .hero-intel-cards {
        width: 100%;
    }

    .hi-card {
        width: 100%;
    }

    .ds-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .op-right {
        padding: 28px 20px;
    }
}
