.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 500px;
    max-width: 90vw;
    background: var(--panel-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--panel-border);
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-color);
}

.close-modal {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--sub-text);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 30px;
    flex: 1;
}

.settings-group {
    margin-bottom: 24px;
}

.settings-group h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sub-text);
    margin-bottom: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.setting-label {
    font-size: 14px;
    font-weight: 600;
}

.setting-item select, 
.setting-item input[type="number"],
.setting-item input[type="text"] {
    background: var(--item-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.setting-item select:focus,
.setting-item input:focus {
    border-color: var(--accent-color);
}

.setting-item select option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.setting-item input[type="color"] {
    appearance: none;
    width: 40px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.setting-item input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--panel-border);
    border-radius: 4px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--panel-border);
    display: flex;
    justify-content: flex-end;
}
