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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #d32f2f;
    margin-bottom: 30px;
    font-size: 28px;
}

.content-section {
    display: none;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-section.active {
    display: block;
}

.upload-area {
    text-align: center;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.preview-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.preview-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.preview-label {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.info {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* 语言选择器样式 */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* 左侧文字效果设置 */
.text-effects-left {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.text-input-group {
    margin-bottom: 15px;
}

.text-input-group input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin: 10px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.text-effect-controls {
    display: grid;
    gap: 10px;
    max-width: 200px;
}

/* 右侧语言选择和预览 */
.text-effects-right {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.language-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.language-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.text-preview {
    background: #fff;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.text-preview .preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.text-preview .preview-item:last-child {
    border-bottom: none;
}

.text-preview .preview-item strong {
    min-width: 40px;
    font-size: 14px;
}

.translation-edit {
    width: 150px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 错误提示样式 */
.error-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ff5252;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* 拖放效果 */
.upload-area.drag-over {
    background: #f0f9ff;
    border-color: #2196F3;
}

.text-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.position-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.position-controls button {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.position-controls button:hover {
    background: #f0f0f0;
}

#confirmPosition {
    grid-column: 1 / -1;
    background: #4CAF50;
    color: white;
}

.preview-item strong {
    min-width: 60px;
}

.translation-edit {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.translation-edit:hover {
    border-color: #2196F3;
}

.translation-edit:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* 文字输入和预览区域样式 */
.text-input-preview {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.text-input-group input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.text-preview {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    min-height: 100px;
}
  