/* ===== ОСНОВНЫЕ НАСТРОЙКИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* Анимированный фон с частицами */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(255,255,255,0.1) 0%, transparent 25%);
    pointer-events: none;
}

/* ===== ШАПКА ===== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

/* Красивая полоска сверху */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #1dd1a1);
}

header h1 {
    font-size: 3em;
    color: #2c3e50;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.1);
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1.3em;
    color: #34495e;
    font-weight: 300;
    letter-spacing: 2px;
}

/* ===== КНОПКИ РЕЖИМОВ ===== */
.mode-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0 20px 0;
}

.mode-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
}

.mode-btn:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ===== ПАНЕЛЬ ФИЛЬТРОВ ===== */
.filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 60px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.filters input, .filters select, .filters button {
    padding: 15px 25px;
    font-size: 1em;
    border: 2px solid transparent;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.filters input {
    min-width: 250px;
    background: white;
    border: 2px solid #e0e0e0;
}

.filters input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.filters select {
    background: white;
    cursor: pointer;
    min-width: 180px;
}

.filters select:hover {
    border-color: #667eea;
}

.filters button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.filters button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* ===== ВЕРТИКАЛЬНЫЙ ТАЙМЛАЙН (ТВОЯ СТРЕЛКА) ===== */
.timeline-vertical {
    position: relative;
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px 0;
}

/* Линия-стрелка (теперь она огненная!) */
.timeline-vertical::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, 
        #ff0844 0%, 
        #ffb199 25%, 
        #ffd200 50%, 
        #6b8cff 75%, 
        #a18cd1 100%);
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(255, 8, 68, 0.3);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; box-shadow: 0 0 30px rgba(255, 8, 68, 0.6); }
}

.timeline-item {
    position: relative;
    margin: 60px 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

/* Карточки */
.timeline-content {
    width: 45%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

/* Разноцветные градиенты для карточек */
.timeline-item:nth-child(1) .timeline-content { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.timeline-item:nth-child(2) .timeline-content { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); }
.timeline-item:nth-child(3) .timeline-content { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.timeline-item:nth-child(4) .timeline-content { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.timeline-item:nth-child(5) .timeline-content { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }

.timeline-content:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* Стрелочки, указывающие на центр */
.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 25px;
    height: 25px;
    background: inherit;
    transform: rotate(45deg) translateY(-50%);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -12px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -12px;
}

/* Точки на линии */
.timeline-dot {
    width: 30px;
    height: 30px;
    background: white;
    border: 4px solid;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.5), 0 10px 20px rgba(0,0,0,0.2);
    z-index: 2;
    transition: all 0.3s;
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.8), 0 15px 30px rgba(0,0,0,0.3);
}

/* Разные цвета для точек */
.timeline-item:nth-child(1) .timeline-dot { border-color: #ff0844; }
.timeline-item:nth-child(2) .timeline-dot { border-color: #feca57; }
.timeline-item:nth-child(3) .timeline-dot { border-color: #48dbfb; }
.timeline-item:nth-child(4) .timeline-dot { border-color: #1dd1a1; }
.timeline-item:nth-child(5) .timeline-dot { border-color: #5f27cd; }

/* Год на точке */
.timeline-year {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    white-space: nowrap;
    border: 2px solid;
    transition: all 0.3s;
}

.timeline-item:nth-child(1) .timeline-year { border-color: #ff0844; }
.timeline-item:nth-child(2) .timeline-year { border-color: #feca57; }
.timeline-item:nth-child(3) .timeline-year { border-color: #48dbfb; }
.timeline-item:nth-child(4) .timeline-year { border-color: #1dd1a1; }
.timeline-item:nth-child(5) .timeline-year { border-color: #5f27cd; }

.timeline-content h3 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.05);
}

.timeline-paradigm {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(5px);
    border-radius: 40px;
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
    border: 1px solid rgba(255,255,255,0.8);
}

/* Детали (скрыты) */
.timeline-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 15px;
    background: rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 0 15px;
}

.timeline-details.show {
    max-height: 400px;
    padding: 15px;
}

.timeline-details p {
    margin: 10px 0;
    color: #2c3e50;
    font-size: 15px;
}

.timeline-details strong {
    color: #667eea;
}

.click-hint {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 15px;
    font-style: italic;
    opacity: 0.7;
}

/* ===== ОБЫЧНЫЕ КАРТОЧКИ (ДЛЯ ВСЕХ ЯЗЫКОВ) ===== */
.timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 20px;
}

.card {
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

/* Разноцветные верхние полоски */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #ff0844, #feca57, #48dbfb, #1dd1a1, #5f27cd);
}

.card:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.card h3 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.card .year {
    font-size: 1.2em;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.card .paradigm {
    display: inline-block;
    padding: 6px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 30px;
    font-size: 13px;
    margin-bottom: 15px;
}

.card .details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card .details.show {
    max-height: 400px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e0e0e0;
}

/* ===== ПОДВАЛ ===== */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    color: #2c3e50;
    font-size: 1.1em;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

/* ===== АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНОВ ===== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .timeline-item {
        flex-direction: column !important;
        margin: 40px 0;
    }
    
    .timeline-content {
        width: 90%;
        margin: 20px 0;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .timeline-dot {
        position: relative;
        margin: 10px auto;
    }
    
    .filters {
        border-radius: 30px;
        padding: 20px;
    }
    
    .filters input, .filters select, .filters button {
        width: 100%;
    }
}