/* HACKING THEME - PROYECTO OSINT (PARIDAD 1:1) */
:root {
    --bg-color: #050505;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --accent: #00ff41;
    /* Hacker Green */
    --accent-dim: rgba(0, 255, 65, 0.1);
    --danger: #ef4444;
    /* Red for critical/threats */
    --warning: #f59e0b;
    /* Amber for warnings */
    --info: #3b82f6;
    /* Blue for info */
    --panel-bg: rgba(20, 20, 20, 0.95);
    --border-color: #333;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --font-sans: 'Inter', system-ui, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 20px;
    background-image:
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
}

/* Typography & Headers */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mono);
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Dashboard Grid Layout */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header Badge Style */
.header-badge {
    background: var(--panel-bg);
    border: 1px solid var(--accent);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px var(--accent-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-badge h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    color: var(--accent);
}

.header-badge .meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Panels */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

.panel-title {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats Cards */
.stat-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 8px;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.pulse-danger {
    animation: pulse 2s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* --- MATRIX LOADING SCREEN LOGIC --- */
/* (Added for Frontend Prod Parity) */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loadingOverlay.hidden {
    display: none;
}

canvas#matrixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.loader-content {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border: 1px solid var(--accent);
    text-align: center;
    box-shadow: 0 0 20px var(--accent-dim);
}

.glitch {
    font-size: 2em;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 2px 2px var(--danger);
    animation: glitch 1s infinite linear alternate-reverse;
}

#loadingLog {
    margin-top: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9em;
}

@keyframes glitch {
    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);
    }
}

/* Helpers */
.hidden {
    display: none !important;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* NAVBAR & HERO ADAPTATION (FROM ORIGINAL FRONTEND) */
/* Ensuring the main structure works with the new styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    margin-bottom: 20px;
    border: 1px solid var(--accent-dim);
    background: rgba(0, 20, 0, 0.3);
}

.logo span {
    color: #00f7ff;
}

.nav-links a {
    margin-left: 20px;
    font-weight: bold;
}

.nav-links a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.hero {
    text-align: center;
    padding: 50px 20px;
}
.main-title {
    font-family: var(--font-mono);
    font-size: 4rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(0,255,65,0.6);
    margin: 10px 0 6px 0;
}
.subtitle {
    color: #6aff8f;
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}
.neon-line {
    height: 2px;
    background: rgba(0,255,65,0.25);
    box-shadow: 0 0 12px rgba(0,255,65,0.2);
    margin: 30px auto;
    max-width: 1200px;
}
/* Footer distribution and colors */
footer {
    margin-top: 24px;
}
.footer-system {
    color: #00ff41;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 10px;
}
.footer-authors {
    color: #00f7ff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.footer-warning {
    color: #ef4444;
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
}
.search-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
    background: #0d0d0d;
    border: 1px solid rgba(0,255,65,0.25);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,255,65,0.12);
    padding: 24px;
    border-top: none;
    --label-left: 160px;
    --break-width: 200px;
}
.search-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: calc(var(--label-left) - (var(--break-width) / 2));
    background: rgba(0,255,65,0.25);
    box-shadow: 0 0 12px rgba(0,255,65,0.2);
}
.search-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: calc(var(--label-left) + (var(--break-width) / 2));
    height: 2px;
    width: calc(100% - (var(--label-left) + (var(--break-width) / 2)));
    background: rgba(0,255,65,0.25);
    box-shadow: 0 0 12px rgba(0,255,65,0.2);
}
.terminal-label {
    position: absolute;
    top: -12px;
    left: var(--label-left);
    transform: none;
    font-family: var(--font-mono);
    color: #00f7ff;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 2;
}

.search-row {
    display: flex;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    gap: 14px;
}

.search-row input {
    flex: 1;
    background: #0a0a0a;
    border: 1px solid rgba(0,255,65,0.25);
    border-radius: 6px;
    color: #fff;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 1rem;
    outline: none;
}
#searchInput::placeholder {
    color: #7a7a7a;
}

.search-row button {
    background: transparent;
    border: 1px solid #00f7ff;
    color: #00f7ff;
    padding: 12px 22px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    border-radius: 6px;
}

.search-row button:hover {
    background: rgba(0, 247, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.25);
}

select {
    background: #000;
    color: var(--accent);
    border: 1px solid rgba(0,255,65,0.25);
    border-radius: 6px;
    padding: 12px;
    font-family: var(--font-mono);
    min-width: 240px;
    outline: none;
}
