:root {
    --primary: #00ff00;
    --secondary: #008f00;
    --danger: #ff3333;
    --warning: #ffb000;
    --safe: #00ff00;
    --bg-color: #050505;
    --panel-bg: rgba(0, 20, 0, 0.4);
    --text-color: #00ff00;
    --font: 'Share Tech Mono', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font);
    overflow: hidden;
    margin: 0;
    height: 100vh;
}

/* CRT Scanline */
.scan-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: 999;
}

.gate-container {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* SEARCH MODULE */
.search-module {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--secondary);
    background: rgba(0, 20, 0, 0.6);
    padding: 10px;
}

.prompt {
    margin-right: 10px;
    font-weight: bold;
    animation: blink 1s infinite;
}

.gate-input-search {
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: var(--font);
    font-size: 1.2rem;
    flex: 1;
    outline: none;
    text-transform: uppercase;
}

.gate-btn-small {
    background: var(--secondary);
    color: #000;
    border: none;
    padding: 5px 15px;
    font-family: var(--font);
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s;
}

.gate-btn-small:hover {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.status-line {
    font-size: 0.8rem;
    margin-top: 5px;
    color: var(--secondary);
}

/* RESULTS PANEL */
.results-panel {
    border: 1px solid var(--secondary);
    background: var(--panel-bg);
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.result-header h2 {
    margin: 0;
    font-size: 1.5rem;
    word-break: break-all;
}

.badge {
    padding: 5px 15px;
    color: #000;
    font-weight: bold;
    font-size: 1.2rem;
    background: var(--secondary);
}

.badge.malicious {
    background: var(--danger);
    box-shadow: 0 0 15px var(--danger);
    color: #fff;
}

.badge.clean {
    background: var(--safe);
    box-shadow: 0 0 15px var(--safe);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.metric-box {
    border: 1px solid var(--secondary);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 50, 0, 0.1);
}

.metric-box .label {
    font-size: 0.7rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.metric-box .value {
    font-size: 1.2rem;
    font-weight: bold;
}

/* INTEL FEED */
.intel-feed {
    margin-top: 1rem;
    border-top: 1px solid var(--secondary);
    padding-top: 0.5rem;
    height: 100px;
    overflow: hidden;
    position: relative;
}

.feed-header {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.marquee-content {
    font-size: 0.8rem;
    color: var(--secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feed-item {
    white-space: nowrap;
    opacity: 0.7;
}

/* UTILS */
.hidden {
    display: none !important;
}

.scan-ui {
    padding: 2rem;
    text-align: center;
}

.scanner-bar {
    height: 10px;
    background: var(--secondary);
    margin: 1rem auto;
    width: 0%;
    animation: scanProgress 2s infinite linear;
}

@keyframes scanProgress {
    0% {
        width: 0%;
        opacity: 0.5;
    }

    50% {
        width: 100%;
        opacity: 1;
    }

    100% {
        width: 0%;
        opacity: 0.5;
        margin-left: auto;
    }

    /* bounces back? or just creates a strobe effect */
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.term-link {
    color: var(--secondary);
    text-decoration: none;
    border: 1px solid var(--secondary);
    padding: 5px 20px;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.term-link:hover {
    background: var(--secondary);
    color: #000;
}

/* SETTINGS MODAL & BUTTON */
.settings-trigger {
    cursor: pointer;
    font-size: 1.5rem;
    margin-left: 10px;
    color: var(--secondary);
    transition: transform 0.3s;
}

.settings-trigger:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #000;
    border: 1px solid var(--primary);
    padding: 2rem;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary);
}

.status-tiny {
    font-size: 0.7rem;
    margin-top: 10px;
    color: var(--warning);
}

.source-tag {
    font-size: 0.7rem;
    background: #333;
    color: #ccc;
    padding: 2px 5px;
    margin-left: 10px;
    vertical-align: middle;
}

/* ENGINE GRID */
.engine-section {
    margin-top: 2rem;
    border-top: 1px dashed var(--secondary);
    padding-top: 1rem;
}

.section-title {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.engine-card {
    border: 1px solid #333;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    background: rgba(0, 20, 0, 0.2);
}

.engine-card.malicious {
    border-color: var(--danger);
    color: var(--danger);
}

.engine-card.clean {
    border-color: var(--safe);
    color: var(--safe);
}

/* Scrollbar styling */
.engine-grid::-webkit-scrollbar {
    width: 6px;
}

.engine-grid::-webkit-scrollbar-track {
    background: #000;
}

.engine-grid::-webkit-scrollbar-thumb {
    background: var(--secondary);
}