/* =========================================
   OPENCLAW WAR DASHBOARD - CONSOLIDATED STYLES
   Project: Cyber-Ghost Overhaul
   ========================================= */

/* --- 1. VARIABLES & THEME --- */
:root {
    /* Colors - Hearts of Iron Palette */
    --hoi-red: #8a1c1c;
    --hoi-black: #0f0f0f;
    --hoi-paper: #2a2a2a;
    --hoi-border: #555;
    
    /* Colors - Neon Accents */
    --neon-red: #ff3333;
    --neon-green: #39ff14;
    --neon-blue: #00f3ff;
    --neon-amber: #f59e0b;
    --neon-magenta: #ff00ff;

    /* Effects */
    --crt-scanline: rgba(18, 16, 16, 0.5);
    --glass-bg: rgba(0, 0, 0, 0.5);
}

/* --- 2. BASE TYPOGRAPHY --- */
body {
    background-color: #050505;
    color: #dcdcdc;
    font-family: 'Rajdhani', monospace;
    overflow-x: hidden;
    cursor: crosshair; /* Tactical cursor */
    padding-bottom: 3rem; /* Space for ticker */
}

h1, h2 {
    font-family: 'Ruslan Display', cursive;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3, h4, .super-font {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- 3. CRT & VISUAL EFFECTS --- */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.9);
}

.glitch {
    position: relative;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
}
.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff0000;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00ff00;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

/* --- 4. UI COMPONENTS --- */

/* Standard Window */
.hoi-window {
    background: #1c1c1c;
    border: 2px solid var(--hoi-border);
    box-shadow: 0 0 0 2px #000, 0 0 15px rgba(255, 50, 50, 0.3);
    position: relative;
}

.hoi-header {
    background: linear-gradient(to bottom, #2d2d2d, #1a1a1a);
    border-bottom: 1px solid var(--hoi-border);
    padding: 5px 10px;
    text-shadow: 1px 1px 0 #000;
}

/* Variants */
.danger-window { border-color: var(--hoi-red); box-shadow: 0 0 0 2px #000, 0 0 15px rgba(255, 50, 50, 0.5); }
.alert-window { border-color: #d97706; box-shadow: 0 0 0 2px #000, 0 0 15px rgba(217, 119, 6, 0.5); }
.gold-window { border-color: #ca8a04; box-shadow: 0 0 0 2px #000, 0 0 15px rgba(202, 138, 4, 0.5); }
.ally-window { border-color: #10b981; box-shadow: 0 0 0 2px #000, 0 0 15px rgba(16, 185, 129, 0.4); }

/* Buttons */
.hoi-btn {
    background: linear-gradient(to bottom, #3a3a3a, #222);
    border: 1px solid var(--hoi-border);
    color: #ccc;
    text-shadow: 1px 1px 0 #000;
    transition: all 0.1s;
    cursor: pointer;
    font-family: 'Ruslan Display', cursive;
    letter-spacing: 1px;
}
.hoi-btn:hover {
    background: linear-gradient(to bottom, #4a4a4a, #333);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
.hoi-btn.active {
    background: var(--hoi-red);
    border-color: var(--neon-red);
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
}

.tab-btn {
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    font-family: 'Ruslan Display', cursive;
    letter-spacing: 1px;
    cursor: pointer;
    color: #555;
}
.tab-btn.active {
    border-color: var(--neon-red);
    color: var(--neon-red);
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
}

/* --- 5. SPECIAL MODULES --- */

/* Assistant Avatar Widget */
.ene-assistant-widget {
    position: fixed;
    bottom: 4rem;
    right: 2rem;
    width: 320px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.ene-assistant-widget.w-\[500px\] {
    width: 500px;
    height: 80vh;
}
.ene-assistant-widget.w-\[320px\] {
    width: 320px;
}

.ene-avatar-box {
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    overflow: hidden;
    position: absolute;
    top: -30px;
    left: -10px;
    z-index: 1001;
    background: #000;
    box-shadow: 0 0 15px var(--neon-blue);
    animation: avatarPulse 2s infinite ease-in-out;
}

.ene-terminal {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--neon-blue);
    padding: 2.5rem 1rem 1rem;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(0, 243, 255, 0.1);
    font-family: 'VT323', monospace;
    color: var(--neon-blue);
    backdrop-filter: blur(4px);
}

.ene-terminal::before {
    content: "ENE_TERMINAL_V1.0";
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.7rem;
    opacity: 0.5;
}

.ene-text {
    font-size: 1.1rem;
    line-height: 1.2;
    min-height: 4.8rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ene-cursor {
    display: inline-block;
    width: 0.6rem;
    height: 1.2rem;
    background: var(--neon-blue);
    animation: blink 1s infinite step-end;
    vertical-align: middle;
}

/* Profiles */
.profile-img-box {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-bottom: 2px solid var(--hoi-border);
}
.profile-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hoi-window:hover .profile-img-box img {
    transform: scale(1.05);
}
.defeated-img {
    filter: grayscale(100%) brightness(0.4) contrast(1.5) !important;
}

/* Radar & Modules */
.radar-box {
    position: relative;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(20, 50, 20, 1) 0%, #000 100%);
    border: 2px solid #555;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 10px var(--neon-green);
}
.radar-sweep {
    position: absolute;
    top: 50%; left: 50%;
    width: 50%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green));
    transform-origin: 0% 0%;
    animation: radar-spin 12s infinite linear;
}
.radar-dot {
    position: absolute;
    width: 4px; height: 4px;
    background: #5b8947d2;
    border-radius: 50%;
    box-shadow: 0 0 5px #5b8947d2;
    opacity: 0;
    animation: blip 2s infinite;
}

/* --- 6. ANIMATIONS --- */
@keyframes slideUp { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes blink { from, to { opacity: 0; } 50% { opacity: 1; } }
@keyframes avatarPulse { 0%, 100% { box-shadow: 0 0 10px var(--neon-blue); } 50% { box-shadow: 0 0 25px var(--neon-magenta); border-color: var(--neon-magenta); } }
@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blip { 0% { opacity: 0; } 20% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ticker { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes nuke-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); border-color: #555; } 50% { box-shadow: 0 0 20px 0 rgba(220, 38, 38, 0.5); border-color: #dc2626; } }

/* Global Utilities */
.animate-fade-in { animation: fadeIn 0.4s ease-out; }
.hidden-view { display: none; }
.ticker-wrap { width: 100%; overflow: hidden; background-color: var(--hoi-red); border-top: 2px solid #000; position: fixed; bottom: 0; left: 0; z-index: 99; white-space: nowrap; }
.ticker { display: inline-block; white-space: nowrap; animation: ticker 60s linear infinite; }
.ticker-item { display: inline-block; }
.nuke-flash { animation: nuke-pulse 2s infinite; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #1a1a1a; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

/* Redacted Text Effect */
.redacted {
    background-color: #000;
    color: #000;
    padding: 0 2px;
    border-radius: 2px;
    transition: all 0.3s ease;
    cursor: help;
    display: inline-block;
}

.redacted:hover {
    background-color: rgba(220, 38, 38, 0.1); /* Subtle red glow */
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}