/* 预览框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* 半透明背景 */
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    text-align: center;
}

.modal-content img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.modal-content pre {
    text-align: left;
    color: #e0e0e0;
    font-family: Consolas, Monaco, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 80vh; /* 限制最大高度 */
    overflow-y: auto; /* 显示垂直滚动条 */
    padding: 10px;
    background-color: #333;
    margin: 0;
    border-radius: 4px;
}

/* 控制滚动条 */
.modal-content pre::-webkit-scrollbar {
    width: 8px;
}

.modal-content pre::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.modal-content pre::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/* 暗黑模式适配 */
body.dark .modal {
    background-color: rgba(0, 0, 0, 0.9);
}

body.dark .close {
    color: #ccc;
}
