/* ============================================
   DISPATCH — Archive Page Styles
   ============================================ */

/* Archive Hero */
.archive-hero {
    padding: 140px 0 60px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.archive-hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16,185,129,0.06) 0%, transparent 70%);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.archive-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 32px;
    transition: var(--transition);
}

.archive-back:hover {
    color: var(--accent);
}

.archive-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
}

.archive-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* Archive Content */
.archive-content {
    padding: 0 0 80px;
    background: var(--bg-primary);
}

/* Stats Bar */
.archive-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 28px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Version Cards */
.archive-versions {
    margin-bottom: 48px;
}

.version-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: var(--transition);
}

.version-card.latest-version {
    border-color: rgba(16,185,129,0.25);
    background: linear-gradient(135deg, rgba(16,185,129,0.04), var(--bg-card));
}

.version-card:hover {
    border-color: rgba(16,185,129,0.4);
}

.version-card-left {
    flex: 1;
}

.version-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.version-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}

.version-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.version-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.version-card-title h3 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.version-card-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.version-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.meta-chip svg {
    opacity: 0.5;
}

.status-chip {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.15);
    color: var(--accent);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

.version-card-right {
    flex-shrink: 0;
    margin-left: 24px;
}

/* Changelog Expandable */
.version-changelog-wrapper {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.changelog-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.changelog-toggle:hover {
    color: var(--accent);
    background: rgba(16,185,129,0.04);
}

.changelog-toggle svg {
    transition: transform 0.3s ease;
}

.version-changelog-wrapper.expanded .changelog-toggle svg {
    transform: rotate(180deg);
}

.changelog-expand {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.version-changelog-wrapper.expanded .changelog-expand {
    max-height: 2000px;
}

.changelog-content {
    padding: 0 32px 32px;
    border-top: 1px solid var(--border);
}

.changelog-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 28px 0 24px;
}

.changelog-group {
    margin-bottom: 24px;
}

.changelog-group:last-child {
    margin-bottom: 0;
}

.changelog-category {
    display: inline-block;
    padding: 3px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.cat-new {
    background: rgba(16,185,129,0.12);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.2);
}

.cat-feature {
    background: rgba(96,165,250,0.12);
    color: #60a5fa;
    border: 1px solid rgba(96,165,250,0.2);
}

.cat-security {
    background: rgba(251,146,60,0.12);
    color: #fb923c;
    border: 1px solid rgba(251,146,60,0.2);
}

.cat-tech {
    background: rgba(167,139,250,0.12);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.2);
}

.cat-fix {
    background: rgba(248,113,113,0.12);
    color: #f87171;
    border: 1px solid rgba(248,113,113,0.2);
}

/* Coming Soon */
.archive-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.coming-soon-line {
    width: 2px;
    height: 48px;
    background: linear-gradient(to bottom, var(--border), transparent);
    margin-bottom: 24px;
}

.coming-soon-content {
    padding: 40px;
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    max-width: 480px;
}

.coming-soon-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border: 1px solid rgba(16,185,129,0.15);
    border-radius: 50%;
    margin: 0 auto 20px;
    color: var(--accent);
}

.coming-soon-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.coming-soon-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .archive-hero h1 { font-size: 2rem; }
    .archive-stats {
        flex-wrap: wrap;
        gap: 20px;
        padding: 24px;
    }
    .stat-divider { display: none; }
    .stat-item { flex: 1; min-width: 100px; }
    .version-card {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding: 24px;
    }
    .version-card-right {
        margin-left: 0;
        width: 100%;
    }
    .version-card-right .btn-primary {
        width: 100%;
        justify-content: center;
    }
    .changelog-content { padding: 0 24px 24px; }
}

@media (max-width: 480px) {
    .archive-hero h1 { font-size: 1.6rem; }
    .version-card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
