/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --background: #0f0f1a;
    --surface: #1a1a2e;
    --surface-light: #252542;
    --surface-lighter: #2d2d4a;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #6366f1 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Background Animation ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: #8b5cf6;
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(-50px, -30px) scale(1.05); }
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

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

/* ===== Main Content ===== */
.main-content {
    padding-top: 80px;
    min-height: 100vh;
}

.page {
    display: none;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

/* ===== Hero Section ===== */
.hero-section {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Step Indicator ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
}

.step.completed .step-number {
    background: var(--success);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.step span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 0.5rem;
}

/* ===== Form Steps ===== */
.form-step {
    display: none;
    animation: slideIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.step-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

/* ===== Input Groups ===== */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.input-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.input-wrapper {
    position: relative;
}

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

.text-input:focus,
.textarea-input:focus,
.select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-wrapper .input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
}

.input-wrapper .input-icon svg {
    width: 20px;
    height: 20px;
}

.textarea-input {
    resize: vertical;
    min-height: 120px;
}

.select-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
}

/* ===== Source Tabs ===== */
.source-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.source-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.source-tab svg {
    width: 20px;
    height: 20px;
}

.source-tab:hover {
    border-color: var(--primary);
    color: var(--text);
}

.source-tab.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.input-section.hidden {
    display: none;
}

/* ===== Upload Zone ===== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--surface);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone.small {
    padding: 2rem 1.5rem;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--text-dim);
}

.upload-icon.small {
    width: 48px;
    height: 48px;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.upload-subtext {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.upload-formats {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== File Preview ===== */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.file-preview.hidden {
    display: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-info svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    color: var(--text);
}

.file-size {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.remove-file {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    transition: var(--transition);
}

.remove-file:hover {
    background: var(--error);
    color: white;
}

.remove-file svg {
    width: 16px;
    height: 16px;
}

/* ===== Images Preview ===== */
.images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.image-preview-item:hover .remove-image {
    opacity: 1;
}

.image-preview-item .remove-image:hover {
    background: var(--error);
}

.image-preview-item .remove-image svg {
    width: 14px;
    height: 14px;
}

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

.style-card {
    position: relative;
    cursor: pointer;
}

.style-card input {
    position: absolute;
    opacity: 0;
}

.style-preview {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.style-card input:checked + .style-preview {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.style-preview.cinematic { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.style-preview.animated { background: linear-gradient(135deg, #ff6b6b 0%, #feca57 50%, #48dbfb 100%); }
.style-preview.abstract { background: linear-gradient(135deg, #a855f7 0%, #6366f1 50%, #06b6d4 100%); }
.style-preview.retro { background: linear-gradient(135deg, #d4a574 0%, #c9a959 50%, #8b7355 100%); }
.style-preview.scifi { background: linear-gradient(135deg, #00d9ff 0%, #0052d4 50%, #6b0f1a 100%); }
.style-preview.nature { background: linear-gradient(135deg, #134e5e 0%, #71b280 50%, #27ae60 100%); }
.style-preview.urban { background: linear-gradient(135deg, #2c3e50 0%, #4a6741 50%, #e67e22 100%); }
.style-preview.custom { background: var(--surface-light); display: flex; align-items: center; justify-content: center; }
.style-preview.custom::after { content: '✏️'; font-size: 2rem; }

.style-name {
    display: block;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
}

.style-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ===== Options Grid ===== */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Aspect Ratio Options ===== */
.aspect-ratio-options {
    display: flex;
    gap: 1rem;
}

.aspect-option {
    flex: 1;
    cursor: pointer;
    text-align: center;
}

.aspect-option input {
    position: absolute;
    opacity: 0;
}

.aspect-preview {
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.aspect-option input:checked + .aspect-preview {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.aspect-preview svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.aspect-option span {
    display: block;
    font-weight: 500;
    color: var(--text);
}

.aspect-desc {
    font-size: 0.75rem;
    color: var(--text-dim) !important;
}

/* ===== Review Card ===== */
.review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.review-label {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.review-value {
    font-weight: 500;
    color: var(--text);
}

.review-images {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.review-images-grid {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.review-images-grid img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* ===== Cost Estimate ===== */
.cost-estimate {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cost-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-weight: 600;
}

.cost-header svg {
    width: 20px;
    height: 20px;
}

.cost-details {
    display: flex;
    justify-content: space-between;
}

.cost-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cost-item span:first-child {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.cost-item span:last-child {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.form-actions .btn-primary {
    margin-left: auto;
}

/* ===== Processing Page ===== */
.processing-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 0;
}

.processing-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse 2s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.processing-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

.processing-icon svg {
    width: 24px;
    height: 24px;
    color: white;
    margin-left: 4px;
}

@keyframes iconPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.processing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.processing-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.progress-container {
    margin-bottom: 2rem;
}

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

.progress-fill {
    height: 100%;
    background: var(--gradient-1);
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.processing-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.5;
    transition: var(--transition);
}

.processing-step.active {
    opacity: 1;
}

.processing-step.completed {
    opacity: 1;
}

.processing-step.completed .step-icon {
    background: var(--success);
}

.processing-step .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.processing-step.active .step-icon {
    background: var(--primary);
    animation: iconPulse 1s ease-in-out infinite;
}

.processing-step .step-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text);
}

.processing-step .step-content {
    display: flex;
    flex-direction: column;
}

.processing-step .step-name {
    font-weight: 500;
    color: var(--text);
}

.processing-step .step-status {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.processing-info {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.processing-info p {
    margin-bottom: 0.5rem;
}

/* ===== Results Page ===== */
.results-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.success-animation {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

.checkmark {
    width: 100%;
    height: 100%;
}

.checkmark-circle {
    stroke: var(--success);
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    stroke: var(--success);
    stroke-width: 3;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

.results-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.results-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.video-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-preview video {
    width: 100%;
    display: block;
}

.download-options {
    margin-bottom: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

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

.download-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.download-btn svg {
    width: 24px;
    height: 24px;
}

.additional-downloads {
    text-align: left;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.additional-downloads h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.download-item:hover {
    background: var(--surface-lighter);
}

.download-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ===== Edit Page ===== */
.edit-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.edit-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.edit-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.edit-timeline {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.timeline-header h3 {
    font-size: 1rem;
}

.scene-count {
    font-size: 0.875rem;
    color: var(--text-dim);
}

.scenes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.scene-card {
    position: relative;
    cursor: pointer;
}

.scene-card input {
    position: absolute;
    opacity: 0;
}

.scene-preview {
    aspect-ratio: 16/9;
    background: var(--surface-light);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scene-card input:checked + .scene-preview {
    border-color: var(--primary);
}

.scene-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-preview .scene-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dim);
}

.scene-time {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
    text-align: center;
}

.edit-options {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.edit-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* ===== Projects Page ===== */
.projects-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

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

.projects-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
}

.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-lg);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-thumbnail {
    aspect-ratio: 16/9;
    background: var(--surface-light);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1rem;
}

.project-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-meta {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* ===== Help Page ===== */
.help-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.help-container h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 2rem;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

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

.help-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.help-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.help-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.help-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.faq-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    transition: var(--transition);
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.25rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    border-left: 4px solid;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--error); }
.toast.warning { border-color: var(--warning); }

.toast-icon {
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
}

.toast-close {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
}

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

/* ===== Character Section ===== */
.character-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.section-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.character-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.character-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.character-tab svg {
    width: 24px;
    height: 24px;
}

.character-tab:hover {
    border-color: var(--primary);
    color: var(--text);
}

.character-tab.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.char-section {
    animation: fadeIn 0.3s ease;
}

.generate-options {
    display: grid;
    gap: 1rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
}

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

.radio-option input {
    accent-color: var(--primary);
}

.style-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.style-mini-card {
    position: relative;
    cursor: pointer;
}

.style-mini-card input {
    position: absolute;
    opacity: 0;
}

.style-mini-card span {
    display: block;
    padding: 0.75rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.style-mini-card input:checked + span {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.no-character-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.no-character-info svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

/* ===== Engine Pricing Badge ===== */
.engine-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.engine-badge.premium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .page {
        padding: 1rem;
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .step-line {
        display: none;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .review-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .edit-actions {
        flex-direction: column;
    }
}
