/* ══════════════════════════════════════════
   DOSSIER AGENT — Nanakelol Stream
   CRT Cyberpunk Character Page
   ══════════════════════════════════════════ */

:root {
    --c: 125, 200, 100;
    --c-full: rgb(var(--c));
    --c-90: rgba(var(--c), 0.95);
    --c-80: rgba(var(--c), 0.92);
    --c-60: rgba(var(--c), 0.70);
    --c-40: rgba(var(--c), 0.47);
    --c-25: rgba(var(--c), 0.30);
    --c-15: rgba(var(--c), 0.18);
    --c-10: rgba(var(--c), 0.12);
    --c-08: rgba(var(--c), 0.10);
    --c-04: rgba(var(--c), 0.05);
    --bg: #000;
    --bg-alt: #030503;
}

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

html {
    background: #000;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--c-40) #0a0a0a;
}

body {
    background: var(--bg);
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    color: var(--c-60);
    line-height: 1.6;
    overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: var(--c-25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-40); }

/* ── Scanlines + Noise ── */
.scanlines {
    position: fixed; inset: 0; z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
        rgba(0, 0, 0, 0.06) 0px,
        rgba(0, 0, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px);
}

.noise {
    position: fixed; inset: 0; z-index: 9998;
    width: 100vw; height: 100vh;
    pointer-events: none;
    opacity: 0.08;
}

/* ══════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════ */

.nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    border-bottom: 1px solid var(--c-25);
    backdrop-filter: blur(10px);
}

.nav-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 30px;
}

.nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Orbitron', monospace;
}

.nav-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--c-full);
    box-shadow: 0 0 6px var(--c-full), 0 0 15px var(--c-40);
    animation: dotPulse 2s ease-in-out infinite alternate;
}

@keyframes dotPulse {
    0% { opacity: 0.6; box-shadow: 0 0 4px var(--c-full); }
    100% { opacity: 1; box-shadow: 0 0 8px var(--c-full), 0 0 20px var(--c-40); }
}

.nav-title {
    font-size: 14px; font-weight: 900;
    letter-spacing: 3px; color: var(--c-80);
}

.nav-separator { color: var(--c-25); font-size: 14px; }

.nav-subtitle {
    font-size: 11px; font-weight: 400;
    letter-spacing: 2px; color: var(--c-40);
}

.nav-links { display: flex; gap: 8px; }

.nav-link {
    font-family: 'Orbitron', monospace;
    font-size: 11px; font-weight: 700;
    letter-spacing: 2px;
    color: var(--c-40);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--c-80);
    border-color: var(--c-25);
    background: var(--c-04);
}

.nav-link.active {
    color: var(--c-full);
    border-color: var(--c-40);
    background: var(--c-08);
    text-shadow: 0 0 10px var(--c-25);
}

/* ══════════════════════════════════════════
   SEARCH SECTION
   ══════════════════════════════════════════ */

.search-section {
    padding: 60px 30px 40px;
}

.search-inner {
    max-width: 600px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}

.search-label {
    font-family: 'Orbitron', monospace;
    font-size: 12px; font-weight: 700;
    letter-spacing: 4px;
    color: var(--c-40);
}

.search-box {
    display: flex; align-items: center; gap: 0;
    width: 100%;
    border: 1px solid var(--c-25);
    background: var(--c-04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--c-60);
    box-shadow: 0 0 20px var(--c-08);
}

.search-prompt {
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    color: var(--c-40);
    padding: 12px 0 12px 16px;
}

.search-input {
    flex: 1;
    background: none; border: none; outline: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 15px;
    color: var(--c-80);
    padding: 12px 10px;
    letter-spacing: 1px;
}

.search-input::placeholder {
    color: var(--c-25);
}

.search-btn {
    font-family: 'Orbitron', monospace;
    font-size: 12px; font-weight: 700;
    letter-spacing: 2px;
    color: var(--c-80);
    background: var(--c-10);
    border: none; border-left: 1px solid var(--c-25);
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--c-15);
    color: var(--c-full);
}

.search-status {
    font-size: 13px;
    letter-spacing: 1px;
    min-height: 20px;
    color: var(--c-40);
}

.search-status.error {
    color: rgba(255, 80, 80, 0.8);
}

.search-status.success {
    color: var(--c-60);
}

.search-hint {
    margin-top: 14px;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--c-25);
    font-style: italic;
}

.search-hint .accent {
    color: var(--c-40);
    font-style: normal;
}

/* ══════════════════════════════════════════
   CHARACTER PANEL
   ══════════════════════════════════════════ */

.character-panel {
    padding: 0 30px 60px;
    animation: panelFadeIn 0.6s ease-out;
    scroll-margin-top: 80px;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.character-inner {
    max-width: 1400px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    border: 1px solid var(--c-15);
    background: var(--c-04);
    padding: 30px;
    overflow: visible;
}

/* ── Body Column ── */

.body-column {
    display: flex; align-items: center; justify-content: center;
    overflow: visible;
}

.body-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 19 / 30;
    overflow: visible;
}

.body-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.body-svg .zone-group path {
    fill: rgba(var(--c), 0.04);
    stroke: rgba(var(--c), 0.25);
    stroke-width: 0.5;
    transition: all 0.4s ease;
}

.body-svg .zone-group.zone-upgraded path {
    fill: rgba(var(--c), 0.15);
    stroke: rgba(var(--c), 0.6);
    stroke-width: 1.2;
    filter: drop-shadow(0 0 4px rgba(var(--c), 0.3));
}

/* Body scanline */
.body-scanline {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 10%,
        rgba(var(--c), 0.4) 40%,
        rgba(var(--c), 0.6) 50%,
        rgba(var(--c), 0.4) 60%,
        transparent 90%);
    animation: bodyScan 4s linear infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes bodyScan {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Zone labels (dynamic, positioned by JS via getBBox) */
.zone-labels {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: visible;
}

.zone-label {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.6s ease;
    transform: translateY(-50%);
}

.zone-label.visible { opacity: 1; }

.zone-label.side-right { flex-direction: row; }

.zone-label.side-left {
    flex-direction: row-reverse;
    transform: translate(-100%, -50%);
}

.zone-label.side-left.visible { transform: translate(-100%, -50%); }

.zone-label-dot {
    width: 3px; height: 3px;
    background: var(--c-60);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 4px var(--c-25);
}

.zone-label-line {
    width: 25px; height: 1px;
    background: linear-gradient(90deg, var(--c-15), var(--c-40));
    flex-shrink: 0;
}

.zone-label.side-left .zone-label-line {
    background: linear-gradient(90deg, var(--c-40), var(--c-15));
}

.zone-label-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.zone-label-name {
    font-family: 'Orbitron', monospace;
    font-size: 8px; font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--c-60);
    text-shadow: 0 0 6px var(--c-15);
}

.zone-label-status {
    font-size: 7px; letter-spacing: 1px;
    color: var(--c-40);
}

/* ── Agent info under body ── */
.body-agent-info {
    position: relative;
    text-align: center;
    margin-top: 10px;
}

.body-agent-name {
    font-family: 'Orbitron', monospace; font-size: 14px;
    font-weight: 900; letter-spacing: 4px;
    color: var(--c-full);
    text-shadow: 0 0 15px var(--c-40);
}

.body-agent-sub {
    font-size: 9px; letter-spacing: 2px;
    color: var(--c-40); margin-top: 4px;
}

/* ── Data Column ── */

.data-column {
    display: flex; flex-direction: column; gap: 24px;
}

.agent-header {
    border-bottom: 1px solid var(--c-15);
    padding-bottom: 16px;
}

.agent-name-label {
    font-family: 'Orbitron', monospace;
    font-size: 10px; font-weight: 700;
    letter-spacing: 4px;
    color: var(--c-25);
    margin-bottom: 4px;
}

.agent-name {
    font-family: 'Orbitron', monospace;
    font-size: 28px; font-weight: 900;
    letter-spacing: 4px;
    color: var(--c-90);
    text-shadow: 0 0 20px var(--c-25);
    text-transform: uppercase;
}

/* Credits */
.credits-block {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid var(--c-15);
    background: var(--c-04);
}

.credits-label {
    font-family: 'Orbitron', monospace;
    font-size: 11px; font-weight: 700;
    letter-spacing: 3px;
    color: var(--c-40);
}

.credits-value {
    font-family: 'Orbitron', monospace;
    font-size: 22px; font-weight: 900;
    color: var(--c-full);
    text-shadow: 0 0 12px var(--c-40);
}

/* Data sections */
.data-section {
    display: flex; flex-direction: column; gap: 10px;
}

.data-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px; font-weight: 700;
    letter-spacing: 3px;
    color: var(--c-40);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--c-10);
}

/* Upgrades */
.upgrades-list {
    display: flex; flex-direction: column; gap: 6px;
}

.upgrade-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--c-10);
    background: var(--c-04);
}

.upgrade-row.active {
    border-color: var(--c-25);
    background: var(--c-08);
}

.upgrade-name {
    font-family: 'Orbitron', monospace;
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px;
    color: var(--c-40);
}

.upgrade-row.active .upgrade-name {
    color: var(--c-80);
}

.upgrade-level {
    display: flex; gap: 4px;
}

.upgrade-pip {
    width: 16px; height: 4px;
    background: var(--c-10);
}

.upgrade-pip.filled {
    background: var(--c-full);
    box-shadow: 0 0 4px var(--c-40);
}

/* Inventory */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.inv-slot {
    border: 1px solid var(--c-10);
    background: var(--c-04);
    padding: 10px 8px;
    text-align: center;
    min-height: 70px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
}

.inv-slot.filled {
    border-color: var(--c-25);
    background: var(--c-08);
}

.inv-icon {
    font-size: 20px;
    color: var(--c-25);
}

.inv-slot.filled .inv-icon {
    color: var(--c-full);
    text-shadow: 0 0 8px var(--c-40);
}

.inv-name {
    font-family: 'Orbitron', monospace;
    font-size: 7px; font-weight: 700;
    letter-spacing: 1px;
    color: var(--c-25);
    line-height: 1.2;
}

.inv-slot.filled .inv-name {
    color: var(--c-60);
}

.inv-crypted {
    font-size: 8px;
    color: var(--c-15);
    letter-spacing: 1px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.stat-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px;
    border: 1px solid var(--c-08);
}

.stat-label {
    font-size: 11px;
    color: var(--c-40);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 14px; font-weight: 900;
    color: var(--c-80);
}

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */

.footer { padding: 40px 30px; }

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-divider {
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-15), transparent);
    margin-bottom: 30px;
}

.footer-content {
    display: flex; align-items: center; justify-content: space-between;
}

.footer-link {
    font-family: 'Orbitron', monospace;
    font-size: 13px; font-weight: 700;
    letter-spacing: 2px;
    color: var(--c-60);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--c-full);
    text-shadow: 0 0 10px var(--c-40);
}

.footer-version {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--c-15);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 900px) {
    .character-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .body-container { max-width: 400px; margin: 0 auto; }
    .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .nav-subtitle { display: none; }
    .nav-separator { display: none; }
    .nav-inner { padding: 12px 20px; }
    .search-section { padding: 40px 20px 30px; }
    .character-panel { padding: 0 16px 40px; }
    .character-inner { padding: 20px; }
    .agent-name { font-size: 20px; letter-spacing: 2px; }
    .inventory-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; gap: 12px; text-align: center; }
}
