/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

header p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background-color: #f8f9fa;
    border-color: #2980b9;
}

.upload-content {
    max-width: 500px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-area p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #7f8c8d;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
    margin: 0 5px;
}

.btn-secondary:hover {
    background-color: #d5dbdb;
}

/* 控制区域样式 */
.controls-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.control-group label {
    min-width: 120px;
    font-weight: bold;
    margin-right: 15px;
}

.control-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    margin-right: 15px;
    flex: 1;
    max-width: 300px;
}

/* 预览区域样式 */
.preview-section {
    margin-bottom: 30px;
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.preview-item {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.preview-item h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.image-container img, .image-container canvas {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 全屏覆盖层 */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.fullscreen-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

.fullscreen-content canvas {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.btn-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* 底部样式 */
footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .preview-container {
        flex-direction: column;
    }
    
    .control-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-group label {
        margin-bottom: 5px;
    }
    
    .control-group select {
        width: 100%;
        max-width: 100%;
    }
    
    .btn-secondary {
        margin: 5px 0;
        width: 100%;
    }
}