.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 50;
    overflow: hidden;
    touch-action: none;
}

.dark .modal-overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    width: 95vw;
    max-width: 1200px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    touch-action: none;
}

.dark .modal-content {
    background-color: #1f2937;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.modal-header {
    flex: none;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.dark .modal-header {
    background-color: #111827;
    border-color: #374151;
}

.modal-body {
    flex: 1;
    min-height: 0;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.dark .modal-body {
    background-color: #1f2937;
}

.modal-footer {
    flex: none;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.dark .modal-footer {
    background-color: #111827;
    border-color: #374151;
}

.modal-close-btn {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5e7eb;
    color: #4b5563;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.dark .modal-close-btn {
    background-color: #374151;
    color: #9ca3af;
}

.modal-close-btn:hover {
    background-color: #d1d5db;
    color: #1f2937;
}

.dark .modal-close-btn:hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

.modal-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* 在模态框打开时禁用页面滚动的辅助样式 */
.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}
