:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    --accent-blue: #3b82f6;
    --border-color: rgba(255, 255, 255, 0.1);
    --timeline-line: rgba(255, 255, 255, 0.2);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.1) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Header */
.glass-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.title-group h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-red);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.status-bar {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Mobile default */
}

@media (min-width: 640px) {
    .stat-item {
        align-items: flex-end;
    }
}

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

.stat-item .value {
    font-weight: 600;
    font-size: 1.125rem;
}

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

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

/* Timeline */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    /* Align with dot center */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: -2.05rem;
    /* Adjust based on padding-left of container */
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 1);
    /* Mask line */
}

.timeline-item.urgent .timeline-dot {
    border-color: var(--accent-red);
    background: var(--accent-red);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 1), 0 0 15px rgba(239, 68, 68, 0.5);
}

.timeline-content {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.time-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-badge svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tag.alert {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Footer */
.glass-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: var(--glass-border);
    margin-top: auto;
}

.auto-update-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}


.status-bar {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Mobile default */
}

@media (min-width: 640px) {
    .stat-item {
        align-items: flex-end;
    }
}

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

.stat-item .value {
    font-weight: 600;
    font-size: 1.125rem;
}

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

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

/* Timeline */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    /* Align with dot center */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: -2.05rem;
    /* Adjust based on padding-left of container */
    top: 1.5rem;
    width: 16px;
    height: 16px;
    background: var(--bg-color);
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 1);
    /* Mask line */
}

.timeline-item.urgent .timeline-dot {
    border-color: var(--accent-red);
    background: var(--accent-red);
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 1), 0 0 15px rgba(239, 68, 68, 0.5);
}

.timeline-content {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

.time-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-badge svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.timeline-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tag.alert {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Footer */
.glass-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: var(--glass-border);
    margin-top: auto;
}

.auto-update-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Links - High Contrast */
a {
    color: #38bdf8;
    /* Sky blue */
    text-decoration: none;
    border-bottom: 1px dashed rgba(56, 189, 248, 0.5);
    transition: all 0.2s ease;
}

a:hover {
    color: #7dd3fc;
    border-bottom-style: solid;
    border-bottom-color: #7dd3fc;
}