/* Timeline Section */
.timeline-section {
    margin: 40px 0;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timeline-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.timeline-filter button {
    padding: 8px 18px;
    border-radius: 10px;
    background: #eef2ff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
    transition: 0.2s;
}

.timeline-filter button.active {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.timeline-filter button:hover {
    background: #dce3ff;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.25s ease-in;
}

.timeline-header {
    text-align: center;
    margin-bottom: 40px;
}

.timeline-header h2 {
    font-size: 2em;
    color: #1a202c;
    margin-bottom: 8px;
    font-weight: 600;
}

.timeline-header p {
    color: #718096;
}

.timeline-container {
    position: relative;
    max-height: 600px;
    height: 600px;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.timeline-empty {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    font-size: 1.2em;
    color: #a0aec0;
    font-weight: 600;
    opacity: 0.8;
}

.timeline-container::-webkit-scrollbar {
    width: 8px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.timeline {
    position: relative;
    padding-left: 50px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-year {
    position: relative;
    margin-bottom: 40px;
}

.year-marker {
    position: absolute;
    left: -38px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: #667eea;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #e2e8f0;
}

.year-label {
    font-size: 1.5em;
    color: #1a202c;
    font-weight: 700;
    margin-bottom: 16px;
}

.contest-item {
    background: #f7fafc;
    border-left: 3px solid #667eea;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.contest-item:hover {
    background: #edf2f7;
    transform: translateX(4px);
}

.contest-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.medal {
    font-size: 1.3em;
}

.contest-name {
    color: #2d3748;
    font-size: 1.05em;
    font-weight: 600;
}

.contest-date {
    color: #667eea;
    font-size: 0.85em;
    font-weight: 600;
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 12px;
    margin-left: auto;
}

.contest-detail {
    color: #718096;
    font-size: 0.9em;
    margin-top: 4px;
}

.badge-container {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.place-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.place-badge:hover {
    transform: scale(1.05);
}

.badge-plat {
    background: #d1fae5;
    color: #065f46;
}

.badge-gold {
    background: #fef3c7;
    color: #92400e;
}

.badge-silver {
    background: #e5e7eb;
    color: #374151;
}

.badge-bronze {
    background: #fed7aa;
    color: #7c2d12;
}

.badge-qualified {
    background: #d1fae5;
    color: #065f46;
}

.badge-perfect {
    background: #e9d5ff;
    color: #6b21a8;
}

.badge-special {
    background: #fecaca;
    color: #991b1b;
}

.badge-default {
    background: #dbeafe;
    color: #1e40af;
}

@media (max-width: 768px) {
    .timeline {
        padding-left: 40px;
    }

    .contest-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contest-date {
        margin-left: 0;
    }
}