/* Styling for advanced, animated dark/glassmorphism UI */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #4ade80; }

.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.1) 50%), 
                linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    background-size: 100% 2px, 3px 100%; z-index: 99999; pointer-events: none;
    opacity: 0.1; animation: crtFlicker 0.15s infinite; transition: opacity 0.3s;
    display: none;
}
.theme-red .crt-overlay {
    background: linear-gradient(rgba(20, 0, 0, 0) 50%, rgba(40, 0, 0, 0.1) 50%);
}
.crt-overlay.active { display: block; }

@keyframes crtFlicker {
    0% { opacity: 0.12; } 50% { opacity: 0.15; } 100% { opacity: 0.11; }
}

.glitch-hover:hover {
    animation: textGlitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,0.8);
}
@keyframes textGlitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #050505;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    perspective: 1500px;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

.overlay-grad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, var(--accent-dim) 0%, #000 90%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* FLOATING GLASS HEADER PILL OVERHAUL */
.floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 2rem auto;
    width: 90%;
    max-width: 1200px;
    background: rgba(15, 15, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    z-index: 1000;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.stars-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
}

.pill-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-pill {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s;
    border: 1px solid transparent;
}
.nav-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.nav-pill.active {
    color: #0b0b0b;
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 1rem;
}

.app-view {
    display: block;   
    animation: fadeIn 0.4s ease;
}

.glow-card {
    background: rgba(15, 15, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.2s ease-out, box-shadow 0.2s;
    transform-style: preserve-3d;
}

/* 3D TILT HANDLED BY JS, BUT WE SET TRANSITION HERE */
.tilt-item {
    transition: transform 0.15s cubic-bezier(0.1, 0.5, 0.9, 0.5);
}

.drop-zone {
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(25, 25, 30, 0.8);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.drop-zone .icon { margin-bottom: 1.5rem; }
.drop-zone .icon svg { width: 48px; height: 48px; color: #666; transition: color 0.3s; }
.drop-zone:hover .icon svg { color: #fff; filter: drop-shadow(0 0 8px rgba(255,255,255,0.5)); transform: scale(1.1); }
.drop-zone h2 { font-size: 1.5rem; margin-bottom: 0.5rem; color: #fff; }
.drop-zone p { color: #888; margin-bottom: 1.5rem; }
.browse { color: #fff; font-weight: 600; text-decoration: underline; cursor: pointer; }

.extensions { display: flex; justify-content: center; gap: 0.5rem; }
.extensions span {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden { display: none !important; }

#loading { text-align: center; padding: 3rem; }
.spinner {
    width: 50px; height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top: 3px solid #fff;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite, glow 2s ease-in-out infinite alternate;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes glow { 0% { box-shadow: 0 0 5px rgba(255,255,255,0.2); } 100% { box-shadow: 0 0 20px rgba(255,255,255,0.6); } }

.results-section { margin-top: 2rem; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* PILL TABS OVERHAUL */
.pill-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    background: rgba(0,0,0,0.3);
    border-radius: 12px 12px 0 0;
}
.tab-btn {
    background: rgba(255,255,255,0.02);
    color: #888;
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.tab-btn:hover { color: #ddd; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }
.tab-btn.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.tab-content { display: none; padding: 2rem; }
.tab-content.active { display: block; animation: fadeIn 0.4s ease; }

.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.result-card { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 1.5rem; position: relative;}
.result-card h3 { font-size: 1rem; color: #fff; margin-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 0.5rem; }
.info-row { display: flex; justify-content: space-between; margin-bottom: 0.7rem; font-size: 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.02); padding-bottom: 0.3rem;}
.info-row span:first-child { color: #888; }
.info-row span:last-child { font-family: 'JetBrains Mono', monospace; color: #ddd; font-weight: 600; }
.hash-text { font-size: 0.75rem; word-break: break-all; max-width: 65%; text-align: right; }

.badge-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge { padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
.badge.safe { 
    background: rgba(255, 255, 255, 0.05); 
    color: #888; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    text-shadow: none; 
}
.badge.danger { 
    background: rgba(255, 51, 51, 0.15); 
    color: #ff3333; 
    border: 1px solid rgba(255, 51, 51, 0.4); 
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.5); 
}
.badge.warning { background: rgba(255, 165, 0, 0.15); color: #fbbf24; border: 1px solid rgba(255, 165, 0, 0.4); text-shadow: 0 0 8px rgba(251,191,36,0.5); }

/* Protection Details Anatomy */
.desc-item {
    background: rgba(255,255,255,0.03);
    border-left: 3px solid #666;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 6px 6px 0;
}
.desc-item h4 { margin: 0 0 0.5rem 0; color: #fff; font-size: 1rem; }
.desc-item p { margin: 0; color: #aaa; font-size: 0.9rem; line-height: 1.5; }
.desc-item.threat-cheat { border-color: #f87171; background: rgba(255,0,0,0.05); }
.desc-item.threat-protection { border-color: #fbbf24; background: rgba(255,165,0,0.05); }

/* Tables */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.data-table th, .data-table td { padding: 0.8rem; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.data-table th { color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.data-table td { color: #ccc; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.1); margin-bottom: 1rem; padding-bottom: 0.5rem; }
.card-header h3 { margin: 0; color: #fff; }
.count { background: rgba(255, 255, 255, 0.1); padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; }

.string-viewer {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #aaa;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}
.string-viewer .match-row { display: flex; border-bottom: 1px solid rgba(255,255,255,0.02); padding: 0.4rem 0; }
.string-viewer .match-row:hover { background: rgba(255,255,255,0.05); }
.string-viewer .offset { color: #666; width: 90px; flex-shrink: 0; }
.string-viewer .match-text { color: #fff; word-break: break-all; }
.highlight { background: rgba(255, 50, 50, 0.4); color: #fff; padding: 0 3px; border-radius: 3px; font-weight: bold; box-shadow: 0 0 5px rgba(255,0,0,0.5); }

.reset-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.reset-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; box-shadow: 0 0 15px rgba(255,255,255,0.2); transform: scale(1.05); }

/* Switch Toggle Buttons */
.switch-container {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.2);
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 3px;
    background-color: #aaa;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

input:checked + .slider-toggle:before {
    transform: translateX(24px);
    background-color: #222;
}

/* UI Enhancement: Interactive Scanner Line */
.drop-zone { position: relative; overflow: hidden; }
.scanline {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    top: 0; left: 0;
    opacity: 0;
    box-shadow: 0 0 15px var(--accent);
    transition: opacity 0.3s;
    pointer-events: none;
}
.drop-zone:hover .scanline {
    opacity: 1;
    animation: scanPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes scanPulse {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: rgba(15, 15, 18, 0.9);
    border-left: 4px solid #f87171;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5), 0 0 15px rgba(248, 113, 113, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}
.toast.show {
    transform: translateX(0);
}
.toast-icon { width: 24px; height: 24px; color: #f87171; flex-shrink: 0; }
.toast-content h4 { margin: 0 0 0.2rem 0; font-size: 0.95rem; }
.toast-content p { margin: 0; color: #aaa; font-size: 0.85rem; }

/* AUDIO SLIDER REMOVED */
.audio-slider {
    -webkit-appearance: none; appearance: none;
    width: 60px; height: 4px; border-radius: 5px; background: rgba(255,255,255,0.1); outline: none; transition: 0.3s;
}
.audio-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #4ade80; cursor: pointer; box-shadow: 0 0 5px #4ade80;
}
.volume-slider { width: 40px; }

/* Modern UI Redesign: VirusTotal and Fancy Slider */
.vt-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #60a5fa;
    border-radius: 4px; padding: 2px 6px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center;
}
.vt-btn:hover { background: rgba(59, 130, 246, 0.4); box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); }

.modern-slider-container {
    position: relative; width: 100%; height: 8px; background: rgba(255,255,255,0.05); border-radius: 10px; overflow: visible;
}
.modern-slider {
    -webkit-appearance: none; appearance: none; width: 100%; height: 100%; background: transparent; position: absolute; top:0; left:0; z-index: 2; margin:0; outline: none; cursor:pointer;
}
.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 0 15px var(--accent); margin-top: -7px;
}
.slider-fill { position: absolute; top:0; left:0; height: 100%; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 10px; z-index: 1; pointer-events: none; }

/* Threat Ticker */
.threat-ticker {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: rgba(15, 15, 18, 0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 0.4rem 0;
    overflow: hidden;
    z-index: 10000;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #888;
}
.ticker-content {
    white-space: nowrap;
    animation: ticker-anim 35s linear infinite;
}
@keyframes ticker-anim {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* Terminal Box */
.terminal-box {
    background: #050505 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
    position: relative;
    text-align: left;
}
.terminal-box::after {
    content: '';
    position: absolute; top:0; left:0; right:0; bottom:0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    pointer-events: none;
}
.terminal-line { margin-bottom: 4px; }
.terminal-line span.bracket { color: #666; }
.terminal-line span.status { color: var(--accent); }
.terminal-line span.warn { color: #ffffff; }
.terminal-line span.crit { background: #fff; color: #000; font-weight:bold; padding: 0 2px; }

body.theme-blood .terminal-line span.status { color: #ef4444; }
body.theme-blood .terminal-box .card-header h3 span { color: #ef4444 !important; }

/* Blood Theme Overrides */
body.theme-blood .nav-pill.active { background: rgba(239, 68, 68, 0.1); color: #ef4444 !important; border-color: #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
body.theme-blood .glow-card { border-color: rgba(239, 68, 68, 0.3) !important; box-shadow: 0 0 20px rgba(239, 68, 68, 0.05) !important; }
body.theme-blood .track-artist { color: #ef4444 !important; }
body.theme-blood .audio-slider::-webkit-slider-thumb { background: #ef4444 !important; box-shadow: 0 0 5px #ef4444 !important; }
body.theme-blood .app-footer h4 span, body.theme-blood .app-footer p[style*="color"] { color: #ef4444 !important; }
body.theme-blood .footer-content > div > div:first-child { border-color: #ef4444 !important; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4) !important; }
body.theme-blood #score-banner { border-left-color: #ef4444 !important; }

/* PRINT LAYOUT / PDF EXPORT */
@media print {
    body { background: #fff !important; color: #000 !important; }
    * { text-shadow: none !important; box-shadow: none !important; }
    .floating-header, #toast-container, .drop-zone, .pill-tabs, .tabs-container, button, .app-footer, .threat-ticker, #bg-canvas, .overlay-grad, .crt-overlay { display: none !important; }
    .app-view.hidden { display: block !important; opacity: 1 !important; height: auto !important; }
    .tab-content { display: block !important; page-break-inside: avoid; border: 1px solid #ccc !important; background: #fff !important; color: #000 !important; margin-bottom: 2rem; }
    .result-card, .danger-score-widget { border: 1px solid #ccc !important; background: #f9f9f9 !important; color: #000 !important; }
    .match-row { color: #000 !important; }
    .badge { color: #000 !important; border: 1px solid #000 !important; }
    h1, h2, h3, h4, span, p, div { color: #000 !important; }
}

/* --- PHASE 12: HIGH-DANGER WARNING (REVERTED TO TACTICAL WHITE) */
.siren-active {
    /* Removed aggressive red pulsing as per user request */
    box-shadow: inset 0 0 100px rgba(255, 255, 255, 0.1) !important;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.decoding {
    color: #4ade80;
    text-shadow: 0 0 5px #4ade80;
    font-family: 'JetBrains Mono', monospace;
    animation: blink-fast 0.1s infinite;
}

@keyframes blink-fast {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.fade-in-glow {
    animation: fade-glow 0.8s ease-out forwards;
}

@keyframes fade-glow {
    from { opacity: 0; filter: brightness(3); transform: scale(0.98); }
    to { opacity: 1; filter: brightness(1); transform: scale(1); }
}

/* Neural Core Hover Glow */
#chatbot-launcher:hover {
    box-shadow: 0 0 30px var(--accent);
    transform: scale(1.1) rotate(5deg);
}
.loading-pulse {
    animation: glow-pulse 1s infinite alternate;
    opacity: 0.7;
    pointer-events: none;
}
@keyframes glow-pulse {
    from { box-shadow: 0 0 5px #f87171; }
    to { box-shadow: 0 0 20px #f87171; }
}

/* PHASE 18: PURE MONOCHROME TACTICAL UI */
:root {
    --accent: #ff3333; /* Tactical Bright Red */
    --accent-rgb: 255, 51, 51;
    --accent-dim: rgba(255, 51, 51, 0.2);
    --border-main: rgba(255, 255, 255, 0.1);
    --card-bg: #0a0a0a;
    --text-main: #ffffff;
    --text-dim: #bbbbbb;
    --grid-color: rgba(255, 51, 51, 0.08); /* Subtle red grid */
}

body {
    font-family: 'JetBrains Mono', monospace;
    background-color: #000;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    pointer-events: none;
    opacity: 0.4;
}

/* PHASE 19: RED TACTICAL THEME OVERRIDE */
[data-theme="red"] {
    --accent: #ff0000;
    --accent-dim: #990000;
    --bg-dark: #000000;
    --card-bg: #0d0d0d;
    --border-main: rgba(255,0,0,0.3);
    --text-main: #ff4d4d;
    --text-dim: #660000;
    --grid-color: rgba(255,0,0,0.1);
}

/* Better Background Grid (Sharper) */
.bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--grid-color) 0%, transparent 60%),
                linear-gradient(var(--grid-color) 1px, transparent 1px),
                linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    z-index: -2;
    pointer-events: none;
    transition: background 0.3s ease;
}

/* Remove Rotating Conic Gradient Beam */
.glow-card::before {
    display: none !important;
}

/* Sharper, Premium Monochrome Cards */
.glow-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 8px;
}

/* Updated Nav Pills for Tactical Look */
.nav-pill {
    background: transparent;
    border: 1px solid var(--border-main);
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}
.nav-pill:hover, .nav-pill.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

/* AI Floating Button Update */
.chatbot-launcher {
    background: var(--bg-dark);
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px var(--accent);
}
.chatbot-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px var(--accent);
}

/* Custom Cyber Cursor (Silver/White) */
body { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="M13 13l6 6"/></svg>'), auto; }


/* Glitch Tab Transition */
.tab-glitch {
    animation: glitch-anim 0.2s linear;
}
@keyframes glitch-anim {
    0% { transform: translate(0) skew(0); filter: hue-rotate(0deg); }
    20% { transform: translate(-5px, 2px) skew(5deg); filter: hue-rotate(90deg); }
    40% { transform: translate(5px, -2px) skew(-5deg); filter: hue-rotate(180deg); opacity: 0.5; }
    60% { transform: translate(-2px, 5px) skew(2deg); filter: hue-rotate(270deg); }
    100% { transform: translate(0) skew(0); filter: hue-rotate(360deg); }
}

/* AI Typing Cursor */
.typing-cursor::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--accent);
}
@keyframes blink { 0%, 100% {opacity: 1} 50% {opacity: 0} }

/* Reactive Background Grid */
.overlay-grad {
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 0, 0, 0.05) 0%, transparent 60%), 
                linear-gradient(rgba(255, 0, 0, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 30px 30px, 30px 30px;
}

/* Custom Cyber Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0a0c; }
::-webkit-scrollbar-thumb { 
    background: var(--accent);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #fff; }

/* Odometer Glow */
#score-number {
    transition: all 0.5s ease;
    text-shadow: 0 0 10px var(--accent);
}
.danger-extreme {
    animation: danger-pulse 0.5s infinite alternate;
    color: #f87171 !important;
}
@keyframes danger-pulse {
    from { text-shadow: 0 0 10px #f87171; }
    to { text-shadow: 0 0 30px #f87171, 0 0 50px rgba(248,113,113,0.5); transform: scale(1.1); }
}

/* Scramble Effect Helper Class */
.scramble-active {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 2px;
}

/* PHASE 20: AI CHATBOT UI (THEME SYNCED) */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 0 30px var(--accent);
    backdrop-filter: blur(20px);
    overflow: hidden;
}
.chatbot-window.flex { display: flex; }

.chatbot-header {
    background: rgba(var(--accent-rgb, 255, 255, 255), 0.1);
    padding: 1rem;
    border-bottom: 1px solid var(--border-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chatbot-header strong { font-family: 'JetBrains Mono'; color: var(--accent); }
#chatbot-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 1.2rem; }

#chatbot-messages {
    height: 300px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.9rem;
}
.bot-msg {
    background: rgba(255,255,255,0.05);
    padding: 0.75rem;
    border-radius: 4px;
    color: var(--text-main);
    border-left: 3px solid var(--accent);
}
.user-msg-bubble {
    text-align: right;
    align-self: flex-end;
    background: var(--accent);
    color: #000;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: bold;
}

.chatbot-input-area {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--border-main);
    gap: 0.5rem;
}
.chatbot-input-area input {
    flex: 1;
    background: #000;
    color: #fff;
    border: 1px solid var(--border-main);
    padding: 0.6rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono';
}
#chatbot-send {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0 1.2rem;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.chatbot-launcher-btn {
    position: fixed;
    bottom: 60px; /* Raised to clear ticker */
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #000;
    border: 2px solid var(--accent);
    overflow: visible; /* Allow glow to bleed */
    cursor: pointer;
    z-index: 11000; /* Above ticker (10000) */
    box-shadow: 0 0 25px var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chatbot-launcher-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 0 50px var(--accent);
}

.accent-text { color: var(--accent); font-style: normal; }

/* API Warning (Pure White Bold) */
.badge.danger {
    background: #fff !important;
    color: #000 !important;
    font-weight: bold;
    border: none !important;
}

.badge.safe {
    background: transparent !important;
    color: #888 !important;
    border: 1px solid #444 !important;
}

/* Glassmorphism Refinement (Dark Shadow) */
/* Cleaned up redundant glass/pulse styles */
.glow-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-light) !important;
    backdrop-filter: blur(10px);
}

/* Danger Pulse (White Flash) */
@keyframes danger-pulse {
    from { text-shadow: 0 0 10px #fff; }
    to { text-shadow: 0 0 30px #fff, 0 0 50px rgba(255,255,255,0.5); transform: scale(1.05); }
}

/* --- PHASE 28: PRODUCTION RESPONSIVE POLISH --- */
@media (max-width: 900px) {
    .floating-header { padding: 0.5rem 1rem; }
    .pill-nav { gap: 0.3rem; }
    .nav-pill { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
    .hero-banner h1 { font-size: 2rem !important; }
}

@media (max-width: 600px) {
    .floating-header {
        position: static;
        width: 100%;
        border-radius: 0;
        margin-bottom: 2rem;
    }
    .pill-nav {
        flex-direction: column;
        width: 100%;
    }
    .nav-pill { text-align: center; }
    .hero-banner { height: 120px !important; margin-top: 0 !important; }
    .hero-banner h1 { font-size: 1.5rem !important; }
    .drop-zone { padding: 2rem 1rem; }
    .pill-tabs { justify-content: center; }
    .tab-btn { padding: 0.5rem 0.8rem; font-size: 0.8rem; }
    .results-grid { grid-template-columns: 1fr; }
    .threat-ticker { font-size: 0.7rem; height: 30px; }
}

/* --- PHASE 31: TACTICAL ENTRY SCREEN --- */
.entry-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
}
.entry-content {
    width: 90%;
    max-width: 600px;
    text-align: center;
}
.boot-log {
    height: 180px;
    background: rgba(10,10,12,0.8);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    overflow-y: auto;
    text-align: left;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2rem;
    border-radius: 4px;
    scrollbar-width: none;
}
.boot-log::-webkit-scrollbar { display: none; }
.boot-line {
    margin-bottom: 0.3rem;
    opacity: 0;
    transform: translateY(10px);
    animation: boot-line-fade 0.3s forwards;
}
@keyframes boot-line-fade {
    to { opacity: 1; transform: translateY(0); }
}

.auth-status {
    margin-top: 2rem;
    transition: opacity 0.5s;
}
.scan-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}
.scan-fill {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-dim);
}

.initialize-btn {
    margin-top: 3rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 1rem 2.5rem;
    font-family: inherit;
    font-weight: 800;
    letter-spacing: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    text-transform: uppercase;
}
.initialize-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-dim);
}
.initialize-btn.hidden { display: none; }

.fade-out {
    animation: splash-fade-out 0.8s forwards ease-in;
}
@keyframes splash-fade-out {
    to { opacity: 0; visibility: hidden; transform: scale(1.1); }
}

/* --- PHASE 32: VISUAL OVERDRIVE (ENTRY SCREEN) --- */
.entry-grid {
    position: absolute;
    top: 0; left: 0;
    width: 200%; height: 200%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    animation: grid-move 60s linear infinite;
    opacity: 0.5;
    pointer-events: none;
}
@keyframes grid-move {
    from { transform: translate(0, 0); }
    to { transform: translate(-40px, -40px); }
}

.entry-noise {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('https://grain-y.com/noise.png') repeat;
    opacity: 0.03;
    z-index: 2;
    pointer-events: none;
    animation: noise-jitter 0.2s steps(4) infinite;
}
@keyframes noise-jitter {
    0% { transform: translate(0,0); }
    10% { transform: translate(-1%,-1%); }
    20% { transform: translate(1%,1%); }
    100% { transform: translate(0,0); }
}

.entry-scanline {
    position: absolute;
    top: -100%; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.05), transparent);
    z-index: 3;
    pointer-events: none;
    animation: scan-move 4s linear infinite;
}
@keyframes scan-move {
    0% { top: -100%; }
    100% { top: 100%; }
}

.entry-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: radial-gradient(circle, rgba(255,0,0,0.08) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.glitch-text {
    position: relative;
    display: inline-block;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #fff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(41px, 9999px, 81px, 0); }
    20% { clip: rect(74px, 9999px, 79px, 0); }
    40% { clip: rect(10px, 9999px, 20px, 0); }
    60% { clip: rect(98px, 9999px, 100px, 0); }
    100% { clip: rect(4px, 9999px, 30px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(32px, 9999px, 45px, 0); }
    20% { clip: rect(12px, 9999px, 34px, 0); }
    40% { clip: rect(90px, 9999px, 100px, 0); }
    60% { clip: rect(6px, 9999px, 15px, 0); }
    100% { clip: rect(55px, 9999px, 62px, 0); }
}
