/* Video Toolkit - Main Styles */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #475569;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Heebo', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: var(--surface);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-light);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Wizard */
.wizard {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
}

.wizard h1 {
    margin-bottom: 2rem;
    text-align: center;
}

.wizard h2 {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.wizard-step {
    animation: fadeIn 0.3s ease;
}

.wizard-step.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Style Grid */
.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.style-card {
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.style-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.style-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.style-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.style-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.style-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

/* Option Buttons */
.duration-options,
.language-options,
.voice-options,
.music-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.option-btn {
    padding: 0.5rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: var(--primary);
}

.option-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-accent {
    background: var(--accent);
    color: var(--background);
}

.btn-accent:hover {
    filter: brightness(1.1);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    font-size: 1.25rem;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Or Divider */
.or-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.or-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
}

/* Script Preview */
.script-preview {
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.script-preview h3 {
    margin-bottom: 1rem;
}

/* Scene List */
.scene-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.scene-item {
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scene-number {
    background: var(--primary);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.scene-info {
    flex: 1;
}

.scene-info h4 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.scene-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.scene-status {
    font-size: 1.25rem;
}

/* Progress */
.progress-container {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Generation Controls */
.generation-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.generation-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
}

.project-card .thumbnail {
    height: 160px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.project-card .info {
    padding: 1rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card .meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.draft { background: var(--secondary); }
.status-badge.generating { background: var(--accent); color: var(--background); }
.status-badge.ready { background: var(--success); }

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.template-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.template-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.template-card h3 {
    margin-bottom: 0.5rem;
}

.template-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Examples */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.example-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.example-card h3 {
    margin-bottom: 0.5rem;
}

.example-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Footer */
.app-footer {
    background: var(--surface);
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
    }

    .wizard-nav {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .wizard-nav .btn {
        width: 100%;
    }
}

/* Cost Estimate */
.cost-estimate {
    background: var(--surface-light);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.cost-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cost-header h4 {
    margin: 0;
    font-size: 1rem;
}

.total-cost {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success);
}

.total-cost.high {
    color: var(--accent);
}

.cost-items {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border);
}

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

.approval-notice {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent);
    font-size: 0.9rem;
    text-align: center;
}

.admin-notice {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    font-size: 0.85rem;
    text-align: center;
}

/* User selector in header */
.user-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-selector select {
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Hidden utility */
.hidden {
    display: none !important;
}
