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

body {
    font-family: 'Vazirmatn', 'Segoe UI', monospace;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    padding: 2rem;
    direction: rtl;
}

.code-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(0, 255, 255, 0.02) 0px, rgba(0, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.timeline-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    border-radius: 2.5rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    padding: 2.5rem;
}

.header-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid #38bdf8;
    padding-bottom: 1.5rem;
}

.header-timeline h1 {
    font-size: 2rem;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-timeline h1 i {
    color: #38bdf8;
}

.back-home {
    background: #1e293b;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    border: 1px solid #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-home:hover {
    background: #38bdf8;
    color: #0f172a;
}

/* تایم‌لاین */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #38bdf8, #a855f7, #2dd4bf);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-left, .timeline-right {
    width: 45%;
    position: relative;
}

.timeline-left {
    text-align: left;
    padding-left: 2rem;
}

.timeline-right {
    text-align: right;
    padding-right: 2rem;
}

.timeline-badge {
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    width: 48px;
    height: 48px;
    background: #1e293b;
    border: 2px solid #38bdf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 15px #38bdf8;
}

.timeline-badge i {
    font-size: 1.4rem;
    color: #38bdf8;
}

.timeline-content {
    background: rgba(30, 41, 59, 0.6);
    padding: 1.3rem 1.8rem;
    border-radius: 1.2rem;
    border: 1px solid #334155;
    transition: 0.3s;
}

.timeline-content:hover {
    border-color: #38bdf8;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15);
}

.timeline-year {
    display: inline-block;
    background: #38bdf8;
    color: #0f172a;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.85rem;
    color: #cbd5e6;
    line-height: 1.7;
}

.footer-timeline {
    margin-top: 3rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
    color: #7e8aa2;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .timeline-card {
        padding: 1.5rem;
    }
    .timeline::before {
        right: 20px;
        transform: none;
    }
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-right: 3rem;
    }
    .timeline-left, .timeline-right {
        width: 100%;
        text-align: right;
        padding: 0;
        margin-bottom: 1.5rem;
    }
    .timeline-badge {
        right: 0;
        transform: none;
        left: auto;
        width: 40px;
        height: 40px;
    }
    .timeline-badge i {
        font-size: 1.2rem;
    }
    .timeline-left .timeline-content, 
    .timeline-right .timeline-content {
        width: 100%;
    }
}