* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 15px;
    color: #3498db;
    font-size: 1.3em;
}

.upload-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.upload-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background-color: #e3f2fd;
    border: 1px dashed #3498db;
    border-radius: 4px;
    cursor: pointer;
}

.hint {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: 5px;
}

textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.text-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.control-group {
    margin-bottom: 10px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

select, input[type="range"], input[type="color"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

input[type="color"] {
    height: 40px;
    cursor: pointer;
}

.preview-section {
    text-align: center;
}

.preview-container {
    position: relative;
    width: 640px;
    height: 192px;
    margin: 0 auto 20px;
    background-color: #000;
    border: 1px solid #ddd;
    overflow: hidden;
}

#previewCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

.no-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7);
}

.controls {
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    margin: 0 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .preview-container {
        width: 100%;
        height: auto;
        aspect-ratio: 640/192;
    }
}