/* ==========================================
   CHANGELOG — GeoCG
   Dedicated CSS for the changelog page
   ========================================== */

/* --- Wrapper --- */
.changelog-wrapper {
    padding: 7rem 0 4rem;
    background: var(--light);
    min-height: 100vh;
}

/* --- Header --- */
.changelog-header {
    z-index: 0;
    position: relative;
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #eee;
}

.changelog-header h1 {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.changelog-brand {
    color: var(--accent);
}

.changelog-subtitle {
    font-size: 1.05rem;
    color: #777;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Timeline --- */
.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    padding-left: 2rem;
}

.changelog-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), #ddd);
    border-radius: 3px;
}

/* --- Release card --- */
.changelog-release {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    scroll-margin-top: 100px;
}

.changelog-release::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 2rem;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
    transform: translateX(-50%);
    left: -26px;
}

.changelog-release:hover {
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.changelog-release:first-child::before {
    width: 18px;
    height: 18px;
    box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.25);
}

/* --- Release header --- */
.changelog-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.changelog-version-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.changelog-version {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
}

.changelog-date {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

/* --- Tags --- */
.changelog-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
}

.changelog-tag--new {
    color: var(--accent);
    background: rgba(46, 204, 113, 0.12);
}

.changelog-tag--important {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.12);
}

/* --- Summary --- */
.changelog-summary {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

/* --- Sections --- */
.changelog-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.changelog-section h3 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.changelog-section-icon {
    font-size: 1rem;
}

.changelog-section--added h3 { color: var(--accent); }
.changelog-section--changed h3 { color: #3498db; }
.changelog-section--fixed h3 { color: #e67e22; }
.changelog-section--removed h3 { color: #e74c3c; }

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.changelog-section li {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.55;
    padding-left: 1.2rem;
    position: relative;
}

.changelog-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.changelog-section--added li::before { background: var(--accent); }
.changelog-section--changed li::before { background: #3498db; }
.changelog-section--fixed li::before { background: #e67e22; }
.changelog-section--removed li::before { background: #e74c3c; }

/* --- Empty state --- */
.changelog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1rem;
}

/* --- Footer CTA --- */
.changelog-cta {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 2rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.changelog-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.changelog-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.changelog-cta-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.changelog-cta-link:hover {
    color: #27ae60;
    text-decoration: underline;
}

/* --- Pagination --- */
.changelog-pagination {
    display: flex;
    gap: .4rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.changelog-pagination button {
    padding: .45rem .85rem;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    transition: all .2s;
    color: #555;
}

.changelog-pagination button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.changelog-pagination button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.changelog-pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* --- Account page changelog widget --- */
.account-changelog {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.account-changelog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-changelog-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.account-changelog-header a {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.account-changelog-header a:hover {
    text-decoration: underline;
}

.account-changelog-release {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    background: var(--light);
}

.account-changelog-release:last-child {
    margin-bottom: 0;
}

.account-changelog-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.account-changelog-version {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.account-changelog-date {
    font-size: 0.8rem;
    color: #999;
}

.account-changelog-summary {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.account-changelog-items {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.account-changelog-items li {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .changelog-wrapper {
        padding: 5rem 0 3rem;
    }

    .changelog-header h1 {
        font-size: 1.7rem;
    }

    .changelog-subtitle {
        font-size: 0.95rem;
    }

    .changelog-timeline {
        padding-left: 1.5rem;
    }

    .changelog-release {
        padding: 1.25rem 1.25rem;
    }

    .changelog-release::before {
        left: -22px;
        width: 12px;
        height: 12px;
    }

    .changelog-release:first-child::before {
        width: 14px;
        height: 14px;
    }

    .changelog-release-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .changelog-cta {
        padding: 2rem 1.25rem;
    }

    .account-changelog {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .changelog-header h1 {
        font-size: 1.5rem;
    }

    .changelog-version {
        font-size: 1.15rem;
    }
}
