/* ============================================
   Changelog Modal - Extended Deep Space Theme
   ============================================ */

/* Modal Overlay (Page Dimmer) */
#changelog-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    /* Higher than everything else */
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-smooth);
}

#changelog-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Window */
.changelog-window {
    width: 600px;
    max-width: 90vw;
    height: 70vh;
    max-height: 800px;
    background: var(--bg-panel);
    background-color: rgba(18, 18, 20, 0.95);
    /* Slightly more opaque for readability */
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s var(--ease-elastic);
    overflow: hidden;
}

/* Enable text selection recursively for changelog content */
.changelog-window,
.changelog-window * {
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: auto;
}

#changelog-modal.visible .changelog-window {
    transform: scale(1) translateY(0);
}

/* Header */
.changelog-header {
    height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.03);
}

.changelog-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.changelog-header h2 svg {
    color: var(--accent-primary);
    width: 20px;
    height: 20px;
}

.close-modal-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
}

/* Content Area */
.changelog-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Version Card */
.version-card {
    position: relative;
    padding-left: 20px;
}

/* Timeline Line */
.version-card::before {
    content: '';
    position: absolute;
    top: 50px;
    bottom: -34px;
    left: 7px;
    width: 2px;
    background: var(--border-light);
}

.version-card:last-child::before {
    display: none;
}

/* Version Header */
.version-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    position: sticky;
    top: -24px;
    /* Pull it up a bit into padding */
    background: transparent;
    /* Or calculate solid color if needed for true sticky */
}

.version-badge {
    position: relative;
    z-index: 2;
    background: var(--accent-primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.3);
}

.version-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Categories */
.change-category {
    margin-bottom: 16px;
}

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

.cat-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-title.features {
    color: #32D74B;
}

/* Green */
.cat-title.improvements {
    color: #BF5AF2;
}

/* Purple */
.cat-title.fixes {
    color: #FF9F0A;
}

/* Orange */

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

.change-list li {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
    padding-left: 14px;
    position: relative;
}

.change-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-disabled);
}

.change-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}