.changelog-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 24px;
    background: transparent;
    color: var(--secondary-blue);
    border: 1px solid rgba(0, 191, 255, 0.4);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.changelog-trigger:hover {
    background: rgba(0, 191, 255, 0.1);
    border-color: var(--secondary-blue);
    color: var(--text-white);
}

.changelog-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.changelog-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.changelog-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.changelog-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(640px, 100%);
    max-height: min(80vh, 720px);
    background: linear-gradient(160deg, #222 0%, #1a1a1a 100%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.changelog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.changelog-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
}

.changelog-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-gray);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.changelog-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-white);
}

.changelog-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    text-align: left;
    -webkit-overflow-scrolling: touch;
}

.changelog-modal-body h1,
.changelog-modal-body h2,
.changelog-modal-body h3 {
    color: var(--text-white);
    margin: 1.4em 0 0.55em;
    line-height: 1.3;
}

.changelog-modal-body h1:first-child,
.changelog-modal-body h2:first-child,
.changelog-modal-body h3:first-child {
    margin-top: 0;
}

.changelog-modal-body h1 {
    font-size: 1.35rem;
}

.changelog-modal-body h2 {
    font-size: 1.15rem;
    color: var(--secondary-blue);
    padding-bottom: 0.35em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-modal-body h3 {
    font-size: 1.05rem;
    color: #e8e8e8;
}

.changelog-modal-body p {
    margin: 0 0 0.75em;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.changelog-modal-body ul {
    margin: 0 0 1em;
    padding-left: 1.25em;
    color: var(--text-gray);
}

.changelog-modal-body li {
    margin-bottom: 0.45em;
    font-size: 0.95rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.changelog-modal-body li::marker {
    color: var(--secondary-blue);
}

.changelog-modal-body strong {
    color: var(--text-white);
    font-weight: 600;
}

body.changelog-modal-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .changelog-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .changelog-modal-dialog {
        width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 8px 8px;
    }
}
