/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

/* 输入区域样式 */
.input-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.url-tips {
    margin-bottom: 15px;
    margin-left: 100px;
}

.url-tips small {
    color: #7f8c8d;
    font-size: 0.9rem;
}

label {
    width: 100px;
    font-weight: bold;
}

input[type="text"], 
input[type="file"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #2980b9;
}

/* 加载动画效果 */
button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#download-btn {
    display: block;
    width: 200px;
    margin: 20px auto;
    padding: 12px;
    font-size: 1.1rem;
    background: #27ae60;
}

#download-btn:hover {
    background: #219653;
}

#download-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* 拖放区域样式 */
.drop-area {
    border: 2px dashed #3498db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
    background: #ecf0f1;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-area:hover, .drop-area.drag-over {
    background: #d6eaf8;
    border-color: #2980b9;
}

.drop-area p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* 预览区域样式 */
.preview-section {
    padding: 20px;
    display: none; /* 默认隐藏，直到有图片加载 */
}

.preview-section.show {
    display: block;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.original-preview, .split-preview {
    flex: 1;
    min-width: 300px;
}

.split-images {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.split-part {
    flex: 1;
    text-align: center;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
}

.split-part p {
    margin-top: 10px;
    font-weight: bold;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    background: #eee;
    display: block;
}

#original-img {
    max-height: 300px;
    margin: 0 auto;
}

.split-part img {
    max-height: 200px;
    margin: 0 auto;
} 

/* 模态框样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
} 