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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #fff5e6;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(173, 216, 230, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 218, 185, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: #ff9a9e;
    background-image: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.main-content {
    padding: 40px;
}

.mode-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.mode-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid transparent;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.mode-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.mode-card h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.mode-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.features {
    list-style: none;
    text-align: left;
    margin-top: 20px;
}

.features li {
    padding: 8px 0;
    color: #555;
}

footer {
    text-align: center;
    padding: 30px;
    color: #666;
    background: #f8f9fa;
}

/* 引导流程样式 */
.flow-container {
    padding: 40px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
    border-radius: 5px;
}

.progress-text {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-weight: bold;
}

.question-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.question-header {
    margin-bottom: 30px;
}

.question-header h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.question-desc {
    color: #666;
    font-size: 1.1em;
}

.question-item {
    margin-bottom: 25px;
}

.question-label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.checkbox-label input {
    margin-right: 8px;
}

.flow-actions {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-large {
    padding: 20px 40px;
    font-size: 1.2em;
}

.btn-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

/* 快速生成样式 */
.quick-container {
    padding: 40px;
    text-align: center;
}

.quick-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #666;
}

.quick-actions {
    margin: 40px 0;
}

.status-message {
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 1.1em;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 结果页面样式 */
.result-container {
    padding: 40px;
}

.result-section {
    margin-bottom: 40px;
}

.result-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.story-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.story-card h3 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.story-meta {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.story-content {
    line-height: 2;
    font-size: 1.1em;
    color: #333;
}

.story-content p {
    margin-bottom: 15px;
}

.video-script-info {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #0066cc;
}

.scenes-container {
    display: grid;
    gap: 20px;
}

.scene-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.scene-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.scene-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.scene-header h4 {
    color: #667eea;
    font-size: 1.3em;
}

.scene-duration {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.scene-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

.scene-content strong {
    color: #333;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .mode-selection {
        grid-template-columns: 1fr;
    }
    
    .flow-container,
    .quick-container,
    .result-container {
        padding: 20px;
    }
    
    .header-actions {
        position: static;
        margin-top: 20px;
        flex-direction: column;
    }
}

/* 按钮loading状态 */
.btn-loading-state {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn-loading {
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 日志显示区域 */
.log-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    user-select: none;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    transition: background 0.3s;
}

.log-header:hover {
    background: #e9ecef;
}

.log-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 1.2em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-content {
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.log-entry {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.6;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry.log-info {
    color: #333;
}

.log-entry.log-success {
    color: #28a745;
}

.log-entry.log-error {
    color: #dc3545;
    font-weight: bold;
}

.log-entry.log-warning {
    color: #ffc107;
}

