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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 头部样式 */
header {
    background-color: #4CAF50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-primary {
    background-color: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #da190b;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: #333;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 脚本列表样式 */
.script-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.script-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.script-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.script-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.script-card p {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.script-card .script-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.script-card .script-actions {
    display: flex;
    gap: 10px;
}

/* 视频模板选择 */
.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.template-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.template-card .template-info {
    padding: 15px;
}

.template-card h4 {
    margin-bottom: 5px;
    color: #333;
}

.template-card p {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.template-card .template-select {
    width: 100%;
    padding: 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* 视频生成状态 */
.status-container {
    text-align: center;
    padding: 40px 0;
}

.status-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.status-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.status-description {
    color: #666;
    margin-bottom: 30px;
}

/* 视频播放器 */
.video-player {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-player video {
    width: 100%;
    height: auto;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.video-progress {
    flex: 1;
    height: 4px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.video-progress .progress-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 2px;
}

/* 视频操作 */
.video-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .script-list {
        grid-template-columns: 1fr;
    }
    
    .template-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .template-list {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .card {
        padding: 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误提示 */
.error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* 成功提示 */
.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}
