* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 24px;
    font-weight: 500;
}

.blue-book {
    background-color: #e6f2ff;
    color: #0077cc;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

main {
    padding: 20px;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.left-panel,
.right-panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.left-panel {
    flex: 1;
    min-width: 400px;
}

.right-panel {
    flex: 1;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #333;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 15px 0 20px;
}

.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e88e5;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: #1976d2;
}

.plus-icon {
    margin-right: 5px;
    font-weight: bold;
}

input[type="file"] {
    display: none;
}

.file-status {
    color: #999;
    font-size: 14px;
}

.settings-section {
    margin-bottom: 20px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.setting-item {
    width: 48%;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

.input-with-unit {
    display: flex;
    align-items: center;
}

.input-with-unit input {
    width: 80%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.unit {
    margin-left: 5px;
    color: #777;
}

.color-picker {
    display: flex;
    align-items: center;
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.color-code {
    font-size: 14px;
    color: #777;
}

select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

.caption-content {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.primary-btn {
    background-color: #1e88e5;
    color: white;
}

.primary-btn:hover {
    background-color: #1976d2;
}

.secondary-btn {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.secondary-btn:hover {
    background-color: #e5e5e5;
}

.preview-container {
    width: 100%;
    height: 500px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #999;
    text-align: center;
}

.placeholder-icon {
    margin-bottom: 10px;
}

#previewCanvas {
    max-width: 100%;
    max-height: 100%;
    display: none;
}

footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    font-size: 14px;
    color: #777;
}

.hit-counter {
    margin-top: 5px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        width: 100%;
    }
}