/**
 * 黑色涟漪 - 全局弹窗样式
 * 依赖 theme.css 变量，随 data-theme 切换
 */
.dr-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: dr-modal-fadeIn 0.2s ease forwards;
    transition: background 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal-overlay.dr-modal--closing {
    animation: dr-modal-fadeOut 0.2s ease forwards;
}

@keyframes dr-modal-fadeIn {
    to { opacity: 1; }
}

@keyframes dr-modal-fadeOut {
    to { opacity: 0; }
}

.dr-modal {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 32px var(--shadow-color);
    min-width: 280px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.95);
    animation: dr-modal-scaleIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: background 1.2s cubic-bezier(0.25, 0.1, 0.25, 1),
                border-color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal-overlay.dr-modal--closing .dr-modal {
    animation: dr-modal-scaleOut 0.2s ease forwards;
}

@keyframes dr-modal-scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes dr-modal-scaleOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.dr-modal__title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    padding: 1.25rem 1.25rem 0.5rem;
    transition: color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal__title:empty {
    display: none;
}

.dr-modal__body {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    transition: color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
    transition: border-color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal__btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 1.2s cubic-bezier(0.25, 0.1, 0.25, 1),
                border-color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1),
                color 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.dr-modal__btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.dr-modal__btn--primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.dr-modal__btn--primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: #fff;
}
