* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0a0a12;
    --surface: #12121e;
    --card: #1a1a2e;
    --border: #2a2a40;
    --accent: #e63946;
    --accent-light: #ff6b6b;
    --gold: #f4a261;
    --text: #eaeaf0;
    --text-dim: #7a7a95;
    --timeline-line: #3a3a55;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}
header {
    text-align: center;
    padding: 50px 20px 30px;
    background: linear-gradient(180deg, #12121e 0%, var(--bg) 100%);
}
.logo {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 12px;
}
.logo .num { color: var(--accent); }
.logo .dot { color: var(--text-dim); }
.logo .domain { color: var(--gold); }
.logo .tn { color: var(--text-dim); }

header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
}
.scroll-hint {
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 0.8rem;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Timeline */
.timeline-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 40px 0 60px;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}
.timeline-container:active { cursor: grabbing; }
.timeline-container::-webkit-scrollbar { height: 6px; }
.timeline-container::-webkit-scrollbar-track { background: var(--surface); }
.timeline-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.timeline-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0 60px;
    position: relative;
    min-width: max-content;
}
.timeline-track::before {
    content: '';
    position: absolute;
    top: 140px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--timeline-line);
    border-radius: 2px;
}

/* Month marker */
.month-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    padding-top: 110px;
    position: relative;
}
.month-marker .label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: absolute;
    top: 120px;
}
.month-marker::after {
    content: '';
    position: absolute;
    top: 135px;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    border: 3px solid var(--bg);
}

/* Event card */
.event-card {
    width: 260px;
    min-width: 260px;
    margin: 0 10px;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}
.event-card:hover { transform: translateY(-6px); }
.event-card::after {
    content: '';
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg);
    z-index: 2;
}
.event-card .card-inner {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.event-card:hover .card-inner {
    border-color: var(--accent);
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.15);
}

.event-card .card-img-wrapper {
    width: 100%;
    height: 130px;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
}
.event-card .card-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.event-card .card-img-placeholder {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card .card-emoji {
    font-size: 3.5rem;
}
.event-card .card-body {
    padding: 14px 16px;
}
.event-card .card-date {
    font-size: 0.7rem;
    color: var(--accent-light);
    font-weight: 600;
    margin-bottom: 6px;
}
.event-card .card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.event-card .card-desc {
    font-size: 0.73rem;
    color: var(--text-dim);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.event-card .card-tag {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    background: rgba(230, 57, 70, 0.12);
    color: var(--accent-light);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Connector line from card to timeline */
.event-card .connector {
    position: absolute;
    top: 130px;
    left: 50%;
    width: 2px;
    height: 14px;
    background: var(--accent);
    opacity: 0.5;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
.modal-overlay.active { display: flex; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-close {
    position: sticky;
    top: 12px;
    float: right;
    margin: 12px 16px 0 0;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--card);
    color: var(--text);
    font-size: 1.4rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { background: var(--accent); }

.modal-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}
.modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.modal-img-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 16px 0 0;
}
.modal-emoji {
    font-size: 5rem;
}
.modal-body-inner {
    padding: 28px 32px 36px;
}
.modal-date {
    font-size: 0.8rem;
    color: var(--accent-light);
    font-weight: 600;
    margin-bottom: 8px;
}
.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}
.modal-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.modal-tags span {
    padding: 4px 10px;
    background: rgba(244, 162, 97, 0.12);
    color: var(--gold);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
}
.modal-text {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text);
}
.modal-text p { margin-bottom: 14px; }
.modal-text h3 {
    font-size: 1rem;
    color: var(--gold);
    margin: 20px 0 10px;
}
.modal-source {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-dim);
    font-size: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 600px) {
    header { padding: 35px 16px 20px; }
    .logo { font-size: 2.2rem; }
    header h1 { font-size: 1.1rem; }
    .event-card { width: 220px; min-width: 220px; }
    .event-card .card-img-wrapper { height: 100px; }
    .event-card .card-img { height: 100px; }
    .event-card .card-img-placeholder { height: 100px; }
    .event-card .card-emoji { font-size: 2.5rem; }
    .modal-img-wrapper { height: 150px; }
    .modal-img { height: 150px; }
    .modal-img-placeholder { height: 150px; }
    .modal-emoji { font-size: 3.5rem; }
    .modal-body-inner { padding: 20px; }
    .modal-title { font-size: 1.2rem; }
}
