:root {
    --bg-color: #05060a;
    --card-bg: rgba(15, 18, 28, 0.7);
    --border-color: rgba(0, 255, 157, 0.15);
    --primary-color: #00ff9d;
    --secondary-color: #00d4ff;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-glow: rgba(0, 255, 157, 0.2);
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    /* Legacy accent vars mapped */
    --accent-green: var(--primary-color);
    --accent-blue: var(--secondary-color);
    --accent-red: #ff4757;
    --accent-orange: #ffa502;
    --panel-bg: var(--card-bg);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-head);
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, we handle it internally */
    display: flex;
    flex-direction: column;
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0),
            rgba(0, 0, 0, 0) 1px,
            rgba(0, 255, 157, 0.02) 1px,
            rgba(0, 255, 157, 0.02) 2px);
    pointer-events: none;
    z-index: 999;
}

/* Header Matches CyberPulse */
header {
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 6, 10, 0.8);
    backdrop-filter: blur(15px);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 15px var(--primary-color);
}

.pulse-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

h1 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h1 span {
    color: var(--primary-color);
}

.stream-badge {
    color: var(--secondary-color) !important;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 2px 6px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    opacity: 0.8;
}

.app-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-mono);
}

.clock {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--secondary-color);
    background: rgba(0, 212, 255, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Layout */
.stream-container {
    display: flex;
    justify-content: center;
    height: 100%;
    padding: 0;
    background: #000;
}

.stream-column {
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    width: 1000px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.column-header {
    padding: 1.5rem;
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.column-header h2 {
    font-size: 1.2rem;
    font-family: var(--font-mono);
    color: var(--accent-blue);
    letter-spacing: 2px;
}

.time-window {
    font-size: 0.8rem;
    background: rgba(0, 255, 157, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-family: var(--font-mono);
    font-weight: bold;
}

/* Scrolling Content */
.scroll-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.scroll-content {
    padding: 3rem 2rem;
    position: absolute;
    width: 100%;
    /* Animation is applied via JS based on height */
}

@keyframes autoScroll {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-50%);
    }

    /* -50% because we will double the content */
}

/* Cards */
.feed-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    position: relative;
    border-left: 4px solid var(--border-color);
    transition: transform 0.2s, background 0.2s;
    font-family: var(--font-sans);
    /* Enforce Outfit */
}

.feed-item:hover {
    border-left-color: var(--accent-blue);
    background: rgba(15, 18, 28, 0.9);
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* ... existing variants ... */

.feed-item.critical {
    border-left-color: var(--accent-red);
}

.feed-item.high {
    border-left-color: var(--accent-orange);
}

.feed-item.medium {
    border-left-color: var(--accent-green);
}

.feed-item.type-cve {
    border-left-color: var(--accent-orange);
}

.feed-item.type-breach {
    border-left-color: var(--accent-red);
}

.feed-item.type-news {
    border-left-color: var(--accent-blue);
}

.item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.item-time {
    color: #ffffff;
    /* White timestamp */
    font-weight: bold;
    font-family: var(--font-mono);
}

.item-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    color: #000;
    margin-right: 8px;
}

.badge-cve {
    background: var(--accent-orange);
}

.badge-breach {
    background: var(--accent-red);
    color: white;
}

.badge-news {
    background: var(--accent-blue);
}

.item-source {
    color: var(--accent-green);
    font-weight: 700;
}

.item-title {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #fff;
}

.item-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 1rem;
}

.item-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #777;
    font-family: var(--font-mono);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
}

.cve-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    font-family: var(--font-mono);
}

.software-family {
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Loading */
.loading-state {
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    padding-top: 2rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0.5;
    }
}