/* ========================================================
   VERSION & CHANGELOG MODAL STYLES (WERKSTATT-TOOLS)
   ======================================================== */

/* --- Versions-Badge im Hero / Header --- */
.version-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(96, 165, 250, 0.5);
    color: #f8fafc;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    user-select: none;
    backdrop-filter: blur(8px);
}

.version-hero-badge:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4), 0 0 15px rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.95));
}

.version-hero-badge:active {
    transform: translateY(1px) scale(0.98);
}

.version-hero-badge .version-number {
    letter-spacing: 0.04em;
    color: #93c5fd;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.version-hero-badge .version-status-pill {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.96); }
}

/* Header-Version Button (Kompakt) */
.version-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
}

.version-header-btn:hover {
    color: #e2e8f0;
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(51, 65, 85, 0.8);
    transform: translateY(-1px);
}

.version-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
}

/* Footer Link */
.footer-changelog-link {
    color: #60a5fa !important;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
}
.footer-changelog-link:hover {
    color: #93c5fd !important;
    text-decoration: underline;
}

/* --- MODAL OVERLAY & CONTAINER --- */
.changelog-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 15, 29, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.changelog-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.changelog-modal-window {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 35px rgba(96, 165, 250, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f1f5f9;
    transform: scale(0.95) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Modal Header */
.changelog-header {
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.changelog-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.changelog-icon-bubble {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.changelog-title-group h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.changelog-title-group p {
    margin: 4px 0 0 0;
    font-size: 0.88rem;
    color: #94a3b8;
}

.changelog-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.changelog-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    color: white;
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Filter & Search Bar */
.changelog-toolbar {
    padding: 14px 28px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.changelog-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.changelog-pill {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.changelog-pill:hover {
    color: #e2e8f0;
    border-color: rgba(96, 165, 250, 0.4);
}

.changelog-pill.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.changelog-search-box {
    position: relative;
    min-width: 220px;
    flex-grow: 1;
    max-width: 320px;
}

.changelog-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px 8px 34px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.changelog-search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

.changelog-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #64748b;
    pointer-events: none;
}

/* Modal Body / Timeline */
.changelog-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.changelog-body::-webkit-scrollbar {
    width: 8px;
}
.changelog-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
.changelog-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 4px;
}
.changelog-body::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Version Card */
.version-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.version-card:hover {
    border-color: rgba(96, 165, 250, 0.25);
    background: rgba(30, 41, 59, 0.75);
}

.version-card.current {
    border: 1px solid rgba(96, 165, 250, 0.4);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.85));
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.12);
}

.version-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.version-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.version-card-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #60a5fa;
}

.version-badge-current {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.version-card-date {
    font-size: 0.85rem;
    color: #64748b;
}

.version-card-theme-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 500;
}

/* Feature List */
.version-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.version-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.94rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.feature-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-content {
    flex-grow: 1;
}

.feature-title {
    font-weight: 700;
    color: #f8fafc;
    margin-right: 6px;
}

.feature-desc {
    color: #cbd5e1;
}

/* Modal Footer */
.changelog-footer {
    padding: 16px 28px;
    background: rgba(15, 23, 42, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.changelog-status-info {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-status-info strong {
    color: #38bdf8;
}

.changelog-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.changelog-update-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(96, 165, 250, 0.4);
    color: #93c5fd;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.changelog-update-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
    border-color: #60a5fa;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.changelog-update-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.changelog-close-action-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.changelog-close-action-btn:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

@media (max-width: 640px) {
    .changelog-header {
        padding: 16px 18px;
    }
    .changelog-toolbar {
        padding: 10px 18px;
        flex-direction: column;
        align-items: stretch;
    }
    .changelog-search-box {
        max-width: 100%;
    }
    .changelog-body {
        padding: 16px 18px;
    }
    .changelog-footer {
        padding: 12px 18px;
    }
    .version-hero-badge {
        font-size: 0.85rem;
        padding: 4px 10px;
    }
}
