/* ==================== CHANGELOG PAGE ==================== */

.changelog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    color: #fff;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.changelog-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.changelog-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.changelog-hero-subtitle {
    opacity: 0.85;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.changelog-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.changelog-stat-card {
    flex: 1 1 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.changelog-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.changelog-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.changelog-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.changelog-intro {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.changelog-intro p {
    margin-bottom: 0.35rem;
}

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

.changelog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.changelog-nav {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.changelog-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.changelog-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-nav-list li {
    margin-bottom: 0.25rem;
}

.changelog-nav-link {
    display: block;
    padding: 0.35rem 0.5rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
    font-family: var(--font-mono);
}

.changelog-nav-link:hover,
.changelog-nav-link.active {
    background: rgba(44, 90, 160, 0.1);
    color: var(--primary-color);
}

.changelog-nav-link.unreleased {
    color: var(--warning-color);
    font-weight: 600;
}

.changelog-timeline {
    position: relative;
    padding-left: 2rem;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--bg-tertiary));
    border-radius: 1px;
}

.changelog-release {
    position: relative;
    margin-bottom: 2rem;
    scroll-margin-top: 90px;
}

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

.changelog-release-marker {
    position: absolute;
    left: -1.65rem;
    top: 1.25rem;
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 1;
}

.changelog-release.unreleased .changelog-release-marker {
    background: var(--warning-color);
    box-shadow: 0 0 0 2px var(--warning-color);
    animation: pulse-marker 2s infinite;
}

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 0 0 2px var(--warning-color); }
    50% { box-shadow: 0 0 0 6px rgba(255, 193, 7, 0.3); }
}

.changelog-release-card {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.changelog-release-card:hover {
    box-shadow: var(--shadow-md);
}

.changelog-release.unreleased .changelog-release-card {
    border-color: rgba(255, 193, 7, 0.4);
    border-style: dashed;
}

.changelog-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(to right, rgba(44, 90, 160, 0.06), transparent);
    border-bottom: 1px solid var(--bg-tertiary);
}

.changelog-release.unreleased .changelog-release-header {
    background: linear-gradient(to right, rgba(255, 193, 7, 0.08), transparent);
}

.changelog-version {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.changelog-release.unreleased .changelog-version {
    color: #856404;
}

.changelog-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.changelog-badge-unreleased {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--warning-color);
    color: #212529;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

.changelog-release-body {
    padding: 1rem 1.25rem 1.25rem;
}

.changelog-section {
    margin-bottom: 1.25rem;
}

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

.changelog-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.changelog-section-title.text-success { color: var(--success-color); }
.changelog-section-title.text-primary { color: var(--primary-color); }
.changelog-section-title.text-warning { color: #856404; }
.changelog-section-title.text-danger { color: var(--danger-color); }
.changelog-section-title.text-secondary { color: var(--secondary-color); }

.changelog-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-items li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.25rem;
    font-size: 0.925rem;
    line-height: 1.55;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.changelog-items li:last-child {
    border-bottom: none;
}

.changelog-items li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.6;
}

.changelog-footer-note {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.changelog-footer-note a {
    color: var(--primary-color);
}

@media (max-width: 991.98px) {
    .changelog-layout {
        grid-template-columns: 1fr;
    }

    .changelog-nav {
        position: static;
        max-height: 200px;
    }

    .changelog-hero-title {
        font-size: 1.5rem;
    }

    .changelog-timeline {
        padding-left: 1.5rem;
    }

    .changelog-release-marker {
        left: -1.35rem;
        width: 12px;
        height: 12px;
    }
}
