/* ============================================
   AIQYN Premium Changelog — Glassmorphism Edition
   ============================================ */

:root {
    --ch-glass-bg: rgba(255, 255, 255, 0.03);
    --ch-glass-border: rgba(255, 255, 255, 0.08);
    --ch-glass-blur: blur(12px);
    --ch-accent: #B4A288;
    --ch-frontend: #3b82f6;
    --ch-backend: #10b981;
}

#changelog-view {
    overflow-y: auto;
    flex: 1;
    padding: 3rem 2rem;
    background: var(--color-bg);
    scroll-behavior: smooth;
    animation: fadeIn 0.5s ease-out;
}

.changelog-container {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

/* ── Header ── */
.changelog-header {
    margin-bottom: 4rem;
    text-align: center;
}

.changelog-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-text) 0%, rgba(180, 162, 136, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.changelog-header p {
    color: var(--color-text);
    opacity: 0.5;
    font-size: 1.2rem;
    font-weight: 400;
}

/* ── Segmented Control (Tabs) ── */
.changelog-tabs {
    display: flex;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.05);
    padding: 0.4rem;
    border-radius: 12px;
    gap: 0.2rem;
    margin-bottom: 4rem;
    border: 1px solid var(--color-border);
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.changelog-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--color-text);
    opacity: 0.4;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-radius: 8px;
}

.changelog-tab i {
    width: 16px;
    height: 16px;
}

.changelog-tab.active {
    opacity: 1;
    color: #fff;
    background: var(--ch-accent);
    box-shadow: 0 4px 12px rgba(180, 162, 136, 0.3);
}

.changelog-tab:hover:not(.active) {
    opacity: 0.8;
}

/* ── Timeline ── */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--ch-accent) 0%, transparent 100%);
    opacity: 0.3;
}

/* ── Version Card ── */
.version-item {
    position: relative;
    margin-bottom: 2.5rem;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.version-dot {
    position: absolute;
    left: -2.5rem;
    top: 22px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-bg);
    border: 2px solid var(--ch-accent);
    box-shadow: 0 0 10px rgba(180, 162, 136, 0.5);
    z-index: 2;
}

.version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: var(--ch-glass-bg);
    backdrop-filter: var(--ch-glass-blur);
    border: 1px solid var(--ch-glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-header:hover {
    border-color: rgba(180, 162, 136, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.version-item.active .version-header {
    background: rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: rgba(180, 162, 136, 0.5);
}

.version-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.version-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.version-date {
    font-size: 0.85rem;
    color: var(--color-text);
    opacity: 0.4;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.version-toggle-icon {
    width: 20px;
    height: 20px;
    opacity: 0.3;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-item.active .version-toggle-icon {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* ── Content Area ── */
.version-content {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--ch-glass-blur);
    border: 1px solid var(--ch-glass-border);
    border-top: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 0 1.75rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-item.active .version-content {
    max-height: 2000px;
    padding: 2rem 1.75rem;
}

.log-section {
    position: relative;
    padding-left: 1rem;
}

.log-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.log-section-icon {
    width: 14px;
    height: 14px;
}

/* ── Categories ── */
.change-category {
    margin-bottom: 2rem;
}

.change-category:last-child {
    margin-bottom: 0;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.badge-fix {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-enhancement {
    background: rgba(180, 162, 136, 0.1);
    color: var(--ch-accent);
    border: 1px solid rgba(180, 162, 136, 0.2);
}

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

.change-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    opacity: 0.8;
    line-height: 1.6;
    font-size: 0.95rem;
}

.change-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 1px;
    background: var(--ch-accent);
    opacity: 0.5;
}

/* ── Animations ── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpStagger {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.version-item {
    animation: slideUpStagger 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    #changelog-view {
        padding: 2rem 1rem;
    }

    .changelog-header h1 {
        font-size: 2rem;
    }

    .version-header {
        padding: 1rem;
    }

    .version-number {
        font-size: 1.1rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .version-dot {
        left: -1.5rem;
        width: 14px;
        height: 14px;
    }
}


.hidden-tab {
    display: none !important;
}