* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
.container { max-width: 960px; margin: 0 auto; padding: 20px; }
.header { text-align: center; margin-bottom: 30px; padding: 30px 0; }
.header h1 { font-size: 28px; color: #1a1a2e; margin-bottom: 8px; }
.subtitle { color: #666; font-size: 14px; }

/* Cards & Sections */
.upload-section, .tasks-section, .task-info, .log-section, .action-section, .result-section, .shots-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.upload-section h2, .tasks-section h2, .log-section h3, .action-section h3, .result-section h3, .shots-section h3 {
    margin-bottom: 16px;
    color: #1a1a2e;
    font-size: 18px;
}

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #444; font-size: 14px; }
.form-group input[type="text"], .form-group input[type="file"], .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #4a6cf7; }
.form-group textarea { resize: vertical; font-family: monospace; font-size: 13px; }
.hint { font-size: 12px; color: #999; margin-top: 4px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e8eaf0;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn:hover { background: #dcdfe8; }
.btn-primary { background: #4a6cf7; color: #fff; }
.btn-primary:hover { background: #3a5ce7; }
.btn-large { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Task Table */
.task-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.task-table th, .task-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #eee; }
.task-table th { background: #f8f9fc; font-weight: 600; color: #555; }
.task-table tr:hover { background: #f8f9fc; }

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.status-pending { background: #e8eaf0; color: #666; }
.status-generating { background: #fff3cd; color: #856404; }
.status-completed { background: #d4edda; color: #155724; }
.status-error { background: #f8d7da; color: #721c24; }
.status-concatenating { background: #d1ecf1; color: #0c5460; }

/* Progress Bar */
.progress-bar {
    display: inline-block;
    width: 120px;
    height: 8px;
    background: #e8eaf0;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
    margin: 0 8px;
}
.progress-bar.large { width: 200px; height: 12px; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a6cf7, #6c8cff);
    border-radius: 4px;
    transition: width 0.5s;
}
.progress-text { font-size: 13px; color: #666; }
.shot-count { font-size: 13px; color: #999; margin-left: 10px; }

/* Info Row */
.info-row { margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; }
.info-label { font-weight: 600; color: #555; min-width: 60px; }

/* Shots List (edit page) */
.shots-list { margin-bottom: 20px; }
.shot-item {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #4a6cf7;
}
.shot-header { margin-bottom: 8px; }
.shot-num { font-weight: 700; color: #4a6cf7; font-size: 15px; }
.shot-scene { font-size: 12px; color: #999; margin-left: 10px; }
.shot-desc { font-size: 13px; color: #555; margin-bottom: 10px; }
.form-actions { text-align: center; padding: 20px 0; }
.form-actions .btn { margin: 0 8px; }

/* Shots Grid */
.shots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.shot-card {
    background: #f8f9fc;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}
.shot-card-header {
    background: #4a6cf7;
    color: #fff;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
}
.shot-card-body { padding: 10px 12px; }
.shot-card-desc { font-size: 12px; color: #666; line-height: 1.5; }

/* Log Output */
.log-output {
    background: #1a1a2e;
    color: #0f0;
    padding: 16px;
    border-radius: 8px;
    font-family: "Consolas", "Monaco", monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Video Player */
.video-player { text-align: center; margin: 15px 0; }

/* Boxes */
.error-box {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.success-box {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}
.success-box h3 { margin-bottom: 10px; }
.warn { color: #856404; font-weight: 600; margin-top: 10px; }
.empty { color: #999; text-align: center; padding: 20px; }

/* Install Page */
.install-result { margin: 20px 0; }
.step {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: #f8f9fc;
}
.step.ok { background: #d4edda; }
.step.fail { background: #f8d7da; }
.step .icon { font-weight: 700; margin-right: 10px; width: 20px; }
.step.ok .icon { color: #155724; }
.step.fail .icon { color: #721c24; }
.step .name { font-weight: 600; }
.step .msg { margin-left: auto; font-size: 12px; color: #666; }

@media (max-width: 600px) {
    .container { padding: 12px; }
    .header h1 { font-size: 22px; }
    .task-table { font-size: 12px; }
    .task-table th, .task-table td { padding: 8px 4px; }
}
.btn-danger { background:#dc3545; color:#fff; }
.btn-danger:hover { background:#c82333; }
