/* Version Comparison Badge & Modal */
.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.version-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

.version-badge svg {
    width: 14px;
    height: 14px;
}

.version-badge.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.6), 0 0 20px rgba(99, 102, 241, 0.4);
    }
}

/* Version Comparison Modal */
.version-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.version-modal-overlay.active {
    display: flex;
}

.version-modal {
    background: var(--color-surface, #ffffff);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.version-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.version-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-modal-title svg {
    width: 28px;
    height: 28px;
}

.version-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.version-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.version-modal-close svg {
    width: 20px;
    height: 20px;
    color: white;
}

.version-modal-content {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* Version Selector */
.version-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--color-bg-secondary, #f8fafc);
    border-radius: 12px;
}

.version-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.version-select label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-secondary, #475569);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-select select {
    padding: 10px 14px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    font-size: 0.9375rem;
    background: var(--color-surface, #ffffff);
    color: var(--color-text, #0f172a);
    cursor: pointer;
    transition: all 0.2s ease;
}

.version-select select:hover {
    border-color: var(--color-accent, #6366f1);
}

.version-select select:focus {
    outline: none;
    border-color: var(--color-accent, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Version Comparison Content */
.version-comparison {
    display: none;
}

.version-comparison.active {
    display: block;
}

.version-section {
    margin-bottom: 32px;
}

.version-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text, #0f172a);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-section-icon {
    width: 24px;
    height: 24px;
    color: var(--color-accent, #6366f1);
}

.version-changes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.version-change-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-surface, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.version-change-item:hover {
    border-color: var(--color-accent, #6366f1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.version-change-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.version-change-icon.added {
    color: #10b981;
}

.version-change-icon.removed {
    color: #ef4444;
}

.version-change-icon.updated {
    color: #f59e0b;
}

.version-change-content {
    flex: 1;
}

.version-change-title {
    font-weight: 600;
    color: var(--color-text, #0f172a);
    margin-bottom: 4px;
}

.version-change-description {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #475569);
    line-height: 1.6;
}

/* No changes state */
.version-no-changes {
    text-align: center;
    padding: 48px 20px;
    color: var(--color-text-secondary, #475569);
}

.version-no-changes svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Dark mode */
[data-theme="dark"] .version-modal {
    background: var(--color-surface, #14141f);
}

[data-theme="dark"] .version-select select {
    background: var(--color-bg, #0a0a0f);
}

[data-theme="dark"] .version-change-item {
    background: var(--color-bg, #0a0a0f);
}

/* Mobile */
@media (max-width: 768px) {
    .version-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .version-modal-header {
        padding: 20px;
    }
    
    .version-modal-title {
        font-size: 1.25rem;
    }
    
    .version-modal-content {
        padding: 20px;
    }
    
    .version-selector {
        flex-direction: column;
        gap: 12px;
    }
    
    .version-badge {
        font-size: 0.6875rem;
        padding: 4px 10px;
    }
}
