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

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a24;
    --accent-red: #ff3860;
    --accent-orange: #ff9800;
    --accent-yellow: #ffc107;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border: #2a2a3a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a0a0f 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.glow {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 3s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.critical {
    color: var(--accent-red);
}

.stat-value.high {
    color: var(--accent-orange);
}

main {
    display: grid;
    gap: 1.5rem;
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    font-size: 1.2rem;
}

.alert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.2s, border-color 0.2s;
    animation: fadeIn 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.alert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert-card.critical::before {
    background: var(--accent-red);
}

.alert-card.high::before {
    background: var(--accent-orange);
}

.alert-card.medium::before {
    background: var(--accent-yellow);
}

.alert-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-red);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.severity-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.severity-badge.critical {
    background: rgba(255, 56, 96, 0.2);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.severity-badge.high {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
}

.severity-badge.medium {
    background: rgba(255, 193, 7, 0.2);
    color: var(--accent-yellow);
    border: 1px solid var(--accent-yellow);
}

.timestamp {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.alert-summary {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.entities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.entity-tag {
    background: rgba(255, 56, 96, 0.1);
    color: var(--accent-red);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 56, 96, 0.3);
}

.sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.source-link {
    color: var(--accent-orange);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.source-link:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.source-link::before {
    content: '🔗';
}

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--accent-orange);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.disclaimer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--accent-yellow);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .glow {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .alert-card {
        padding: 1.5rem;
    }

    .alert-header {
        flex-direction: column;
    }
}
