/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2.5em;
}

.main-content {
    display: flex;
    gap: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 左侧面板样式 */
.left-panel {
    flex: 1;
    padding: 25px;
}

.right-panel {
    flex: 1;
    padding: 25px;
    background-color: #fafafa;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h3,
.subtitle-settings h3,
.subtitle-content h3,
.right-panel h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.2em;
    font-weight: 600;
}

.upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1890ff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #40a9ff;
}

.file-name {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    word-break: break-all;
    max-width: 100%;
}

/* 字幕设置区域样式 */
.subtitle-settings {
    margin-bottom: 30px;
}

.settings-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.setting-item {
    flex: 1;
    min-width: 200px;
}

.setting-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.setting-item input[type="number"],
.setting-item select,
.setting-item input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.setting-item input[type="number"]:focus,
.setting-item select:focus,
.setting-item input[type="text"]:focus {
    border-color: #40a9ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.setting-item .unit {
    margin-left: 5px;
    color: #888;
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 40px;
    height: 36px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
}

.color-picker input[type="text"] {
    flex: 1;
}

/* 字幕内容区域样式 */
.subtitle-content {
    margin-bottom: 30px;
}

#subtitleText {
    width: 100%;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

#subtitleText:focus {
    border-color: #40a9ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.generate-btn {
    padding: 12px 24px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.generate-btn:hover {
    background-color: #40a9ff;
}

.save-btn {
    padding: 12px 24px;
    background-color: #d9d9d9;
    color: #8c8c8c;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: not-allowed;
    transition: all 0.3s;
}

.save-btn.enabled {
    background-color: #52c41a;
    color: white;
    cursor: pointer;
}

.save-btn.enabled:hover {
    background-color: #73d13d;
}

.status-message {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-left: auto;
}

.status-message.success {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* 预览区域样式 */
.preview-container {
    background-color: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 15px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.preview-canvas {
    max-width: 100%;
    max-height: 600px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .settings-row {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .status-message {
        margin-left: 0;
        margin-top: 15px;
        text-align: center;
    }
}