/* 基础样式 */
:root {
    --modal-overlay: rgba(0, 0, 0, 0.5);
    --modal-bg: #fff;
    --modal-border-radius: 8px;
    --modal-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --modal-transition: all 0.3s ease;
}

/* 弹窗容器 - 默认隐藏 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1000;
justify-content: center;
align-items: center;
}

/* 当弹窗有open类时显示 */
.modal.open {
display: flex;
}

/* 遮罩层 */
.modal-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--modal-overlay);
backdrop-filter: blur(2px);
}

/* 弹窗内容 */
.modal-content {
    position: relative;
    width: clamp(800px, 85%, 1600px);
    max-height: 90vh;
    background-color: var(--modal-bg);
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    animation: modalFadeIn 0.3s ease;
}

/* 弹窗动画 */
@keyframes modalFadeIn {
from {
    opacity: 0;
    transform: translateY(-20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

/* 弹窗头部 */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
margin: 0;
font-size: 1.25rem;
}

/* 关闭按钮 */
.modal-close {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
padding: 0 0.5rem;
color: #666;
}

.modal-close:hover {
color: #333;
}

/* 弹窗主体 */
.modal-body {
    padding: 1.5rem;
    line-height: 1.8;
    overflow-y: auto; /* 超出时显示垂直滚动条 */
    flex-grow: 1; /* 占据剩余空间 */
    min-height: 0;
}
.modal-body img{
    width: auto!important;
    display: inline-block;
}

/* 弹窗底部 */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* 按钮样式 */
.modal-footer button {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-confirm {
background-color: #4CAF50;
color: white;
border: none;
}

.modal-confirm:hover {
background-color: #45a049;
}

.modal-cancel {
background-color: #f1f1f1;
color: #333;
border: 1px solid #ddd;
}

.modal-cancel:hover {
background-color: #ddd;
}

/* 滚动条样式（可选美化） */
.modal-body::-webkit-scrollbar {
    width: 8px;
}
.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 600px) {
.modal-content {
    margin: 0.5rem;
}

.modal-header,
.modal-body,
.modal-footer {
    padding: 1rem;
}
}