/* ==========================================
   Variables, Root, and Theme Configuration
   ========================================== */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-urdu: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaliq', 'Urdu Typesetting', Tahoma, sans-serif;
    
    /* Dark Theme Palette */
    --bg-app: #030308;
    --panel-bg: rgba(13, 13, 27, 0.65);
    --panel-border: rgba(255, 255, 255, 0.06);
    --panel-border-hover: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #475569;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-violet: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Reset & Base Elements */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Glowing Orbs */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(10, 10, 24, 1) 0%, rgba(3, 3, 8, 1) 90%);
    z-index: -3;
}

.app-glow-orb-1, .app-glow-orb-2 {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    z-index: -2;
    pointer-events: none;
}

.app-glow-orb-1 {
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: floatOrb1 25s infinite alternate ease-in-out;
}

.app-glow-orb-2 {
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    bottom: -200px;
    left: -100px;
    animation: floatOrb2 30s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 120px) scale(1.1); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, -100px) scale(1.05); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* ==========================================
   Layout Containers
   ========================================== */
.app-container {
    width: 100%;
    max-width: 1280px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-main);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.logo-icon {
    color: #fff;
    width: 22px;
    height: 22px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Workspace Grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    flex-grow: 1;
    align-items: stretch;
}

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

/* Panel Structure */
.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transition: border-color var(--transition-normal);
}

.panel:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 16px;
}

.panel-header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Input Panel & Forms */
.input-panel {
    align-self: start;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.label-info {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Upload Container */
.upload-container {
    position: relative;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.upload-container:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
    transform: translateY(-2px);
}

.upload-container.dragover {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.06);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

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

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.upload-container:hover .upload-icon-wrapper {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    transform: scale(1.1);
}

.upload-text {
    font-size: 13px;
    color: var(--text-primary);
}

.upload-text .highlight {
    color: var(--primary);
    font-weight: 600;
}

.upload-subtext {
    font-size: 11px;
    color: var(--text-muted);
}

/* Image Previews */
.upload-preview {
    position: relative;
    width: 100%;
    height: 150px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.remove-preview-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.remove-preview-btn:hover {
    background: var(--error);
    transform: scale(1.05);
}

/* Textarea styling */
textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: all var(--transition-normal);
}

textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-info {
    background: rgba(99, 102, 241, 0.15);
    color: #c7d2fe;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ==========================================
   Output Viewport & States
   ========================================== */
.output-viewport {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    justify-content: center;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 440px;
    margin: 0 auto;
    gap: 16px;
    animation: fadeIn var(--transition-slow);
}

.empty-icon-container {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.empty-icon {
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Error State */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    gap: 16px;
    animation: fadeIn var(--transition-normal);
}

.error-icon-container {
    width: 64px;
    height: 64px;
    background: var(--error-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.error-state h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--error);
}

.error-state p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Skeleton Loading Screens */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn var(--transition-normal);
}

.skeleton-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-text {
    height: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    width: 250px;
    height: 20px;
    border-radius: 6px;
}

.skeleton-subtitle {
    width: 140px;
    height: 12px;
}

.skeleton-timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.skeleton-med {
    width: 80px;
}

.skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   Timeline and Storyboard Prompt Outputs
   ========================================== */
.timeline-container {
    position: relative;
    padding-left: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: slideUp var(--transition-slow);
}

.timeline-line {
    position: absolute;
    left: 11px;
    top: 24px;
    bottom: 24px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
    opacity: 0.3;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.timeline-item {
    position: relative;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.05);
}

/* Dot Indicator */
.timeline-dot {
    position: absolute;
    left: -32px;
    top: 20px;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-app);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-dot {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    color: var(--accent);
}

/* Card Header */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.actions-group {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-action.success {
    color: var(--success) !important;
}

/* Video Prompt Sub-section */
.prompt-sub-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.prompt-content-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Urdu Voiceover / Dialogue Sub-section */
.urdu-script-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    padding: 16px;
    direction: rtl;
    text-align: right;
    font-family: var(--font-urdu);
    font-size: 18px;
    line-height: 2;
    color: #e2e8f0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-pulse-slow {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ==========================================
   Modal Overlay and Card Styling
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 2, 6, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn var(--transition-normal);
}

.modal-overlay.hidden {
    display: none;
}

.modal-card {
    background: #0d0d1b;
    border: 1px solid var(--panel-border-hover);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp var(--transition-normal);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.modal-card h2 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-intro {
    font-size: 13px;
    color: var(--text-secondary);
}

.help-link {
    font-size: 11px;
    color: var(--primary);
    text-decoration: none;
}

.help-link:hover {
    text-decoration: underline;
}

/* Custom Select styling */
.form-select {
    width: 100%;
    background: #0f0f22;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px 40px 12px 14px;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-sans);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.form-select:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background-color: #13132a;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    background-color: #13132a;
}

/* Style dropdown options — forces dark background in supported browsers */
.form-select option {
    background-color: #0f0f22;
    color: #f8fafc;
    padding: 10px 14px;
    font-size: 14px;
}

.form-select option:hover,
.form-select option:focus,
.form-select option:checked {
    background-color: #6366f1 !important;
    color: #ffffff !important;
}

/* Password eye toggling input container */
.password-input-container {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    padding-right: 44px;
    color: var(--text-primary);
    outline: none;
    font-family: var(--font-sans);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--text-primary);
}

/* Alert Boxes inside Modal */
.alert-box {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    line-height: 1.5;
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.alert-info {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--text-primary);
}

.alert-info a {
    color: #a78bfa;
    text-decoration: underline;
}

.alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================
   Toasts Notifications System
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 110;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0d0d1b;
    border: 1px solid var(--panel-border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    min-width: 280px;
    max-width: 380px;
    animation: toastIn var(--transition-normal) forwards;
}

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

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

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

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast.toast-out {
    animation: toastOut var(--transition-normal) forwards;
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Utility Helpers */
.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 16px;
}

/* Mode Selector Tabs */
.mode-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* ==========================================
   Model Quick-Switcher
   ========================================== */
.model-switcher-wrap {
    position: relative;
}

.model-switcher-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.model-switcher-btn:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.model-switcher-btn.open {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
    color: #fff;
}

#modelChevron {
    transition: transform 0.2s ease;
}
.model-switcher-btn.open #modelChevron {
    transform: rotate(180deg);
}

.model-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    background: rgba(15, 15, 35, 0.97);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 6px;
    min-width: 240px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99,102,241,0.1);
    backdrop-filter: blur(20px);
    animation: dropdownFadeIn 0.18s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.model-dropdown-header {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 10px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 4px;
}

.model-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.model-option-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    border-radius: 9px;
    padding: 9px 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
    font-family: var(--font-sans);
}

.model-option-btn:hover {
    background: rgba(99, 102, 241, 0.15);
}

.model-option-btn.active-model {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.model-option-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.model-option-tag {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.model-option-check {
    margin-left: auto;
    color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   Custom Genre Dropdown
   ========================================== */
.hidden-native-select {
    display: none !important;
}

.custom-select-wrap {
    position: relative;
    width: 100%;
}

.custom-select-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0f0f22;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.custom-select-btn:hover {
    border-color: rgba(99, 102, 241, 0.6);
    background: #13132a;
}

.custom-select-btn.open {
    border-color: var(--primary);
    background: #13132a;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-select-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1;
}

.custom-select-label {
    flex: 1;
    color: var(--text-primary);
}

.custom-select-chevron {
    margin-left: auto;
    color: var(--primary);
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.custom-select-btn.open .custom-select-chevron {
    transform: rotate(180deg);
}

/* Dropdown list panel */
.custom-select-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 300;
    background: #0d0d20;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-top: none;
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    list-style: none;
    padding: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    animation: customDropFadeIn 0.18s ease;
    overflow: hidden;
}

@keyframes customDropFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-select-option:hover {
    background: rgba(99, 102, 241, 0.18);
}

.custom-select-option.active-option {
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.option-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.option-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
}

.option-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.option-urdu {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-urdu);
    direction: rtl;
}

.option-check {
    margin-left: auto;
    color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   Video Generation UI Styles
   ========================================== */
.settings-section-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    padding-bottom: 6px;
}

.video-preview-container {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    animation: fadeIn var(--transition-normal);
}

.timeline-video-player {
    width: 100%;
    max-height: 280px;
    border-radius: 6px;
    background: #000;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.video-status-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.spinner-icon {
    animation: rotate-spinner 1.2s linear infinite;
    color: var(--primary);
    flex-shrink: 0;
}

@keyframes rotate-spinner {
    100% { transform: rotate(360deg); }
}

