/**
 * 通用弹窗样式
 *
 * 创建日期：2026-02-08
 * 主题：绿色系
 */

/* ==================== 弹窗遮罩层 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ==================== 弹窗内容容器 ==================== */
.modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== 弹窗头部 ==================== */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #98DBC6;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a7a5a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* ==================== 弹窗主体 ==================== */
.modal-body {
    margin-bottom: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

/* ==================== 弹窗底部 ==================== */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== 弹窗按钮 ==================== */
.modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    border: 1px solid transparent;
}

/* 取消按钮 */
.modal-btn-cancel {
    background-color: #ffffff;
    color: #666;
    border-color: #98DBC6;
}

.modal-btn-cancel:hover {
    background-color: #f5f5f5;
    border-color: #87cbb5;
}

/* 确认按钮 */
.modal-btn-confirm {
    background: linear-gradient(135deg, #98DBC6 0%, #87cbb5 100%);
    color: #ffffff;
    border: none;
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #87cbb5 0%, #76b5a4 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(152, 219, 198, 0.4);
}

.modal-btn-confirm:active {
    transform: translateY(0);
}

/* 默认按钮 */
.modal-btn-default {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.modal-btn-default:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
}

/* ==================== 列表选择弹窗 ==================== */
.modal-select-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-select-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-select-item:hover {
    background: linear-gradient(135deg, #e6f7f2 0%, #d9f0eb 100%);
    border-color: #98DBC6;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(152, 219, 198, 0.2);
}

.modal-select-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.modal-select-info {
    flex: 1;
}

.modal-select-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.modal-select-desc {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.4;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px;
        border-radius: 12px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .modal-select-item {
        padding: 12px;
    }

    .modal-select-icon {
        font-size: 28px;
        width: 40px;
        height: 40px;
    }
}

/* ==================== 字数统计弹窗特定样式 ==================== */
.count-words-result {
    background: linear-gradient(135deg, #e6f7f2 0%, #d9f0eb 100%);
    border-radius: 12px;
    padding: 20px;
}

.count-words-total {
    font-size: 28px;
    font-weight: 600;
    color: #1a7a5a;
    margin-bottom: 16px;
    text-align: center;
}

.count-words-total-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 400;
}

.count-words-detail {
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.count-words-item {
    text-align: center;
    flex: 1;
}

.count-words-item-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.count-words-item-value {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}
