* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
*/
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

/* 文件上传区域 */
.file-info {
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 10px;
}

/* 页面信息提示样式 */
.page-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    padding: 5px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: center;
}

/* 文件上传区域 */
.upload-section {
    text-align: center;
    margin-bottom: 30px;
}

#fileInput {
    display: none;
}

.upload-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background-color: #2980b9;
}

/* 预览区域 */
.preview-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.preview-container {
    position: relative;
    min-width: 400px;
    min-height: 200px;
    max-width: 100%;
    max-height: 600px;
    overflow-y: auto;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* PDF预览 */
.pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.pdf-preview canvas {
    margin-bottom: 10px;
    border: 1px solid #eee;
    max-width: 100%;
    height: auto;
}

.preview-image {
    display: none;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.watermark-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.watermark {
    position: absolute;
    color: #000;
    font-size: 24px;
    opacity: 0.5;
    pointer-events: auto;
    cursor: move;
    user-select: none;
    white-space: nowrap;
}

.single-watermark {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* 控制面板 */
.control-panel {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.control-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.control-group label {
    /* min-width: 120px; */
    padding-left: 10px;
    margin-right: 10px;
    font-weight: bold;
}

.control-group input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.control-group input[type="range"] {
    flex: 1;
    min-width: 200px;
    margin-right: 10px;
}

.control-group input[type="color"] {
    width: 50px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.control-group select {
    /* flex: 1; */
    min-width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L1 4H11L6 9Z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.control-group select:hover {
    border-color: #aaa;
}

.control-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.control-group span {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
}

/* 模式切换按钮 */
.mode-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.mode-btn {
    padding: 10px 20px;
    border: 1px solid #3498db;
    background-color: #fff;
    color: #3498db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background-color: #3498db;
    color: white;
}

.mode-btn:hover {
    background-color: #2980b9;
    color: white;
}

/* 下载按钮 */
.download-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.download-btn:hover {
    background-color: #229954;
}

.download-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group label {
        margin-bottom: 5px;
    }
    
    .control-group input[type="text"],
    .control-group input[type="range"] {
        width: 100%;
        min-width: auto;
    }
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    margin-top: 15px;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 8px;
    background-color: #3498db;
    border-radius: 4px;
    transition: width 0.3s ease;
    display: none;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 14px;
    color: #7f8c8d;
    display: none;
}