/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --bg-dark: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-input: #252525;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #333333;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-text: linear-gradient(135deg, #667eea 0%, #f093fb 50%, #764ba2 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo svg {
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 1rem 4rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

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

/* Models Showcase */
.models-showcase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.models-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.models-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.model-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.model-badge:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.model-badge:nth-child(1) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.4);
    color: var(--text-primary);
}

.model-badge:nth-child(2) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--text-primary);
}

.model-badge:nth-child(3) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--text-primary);
}

.model-badge:nth-child(4) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
}

.model-badge:last-child {
    background: var(--bg-input);
    border-style: dashed;
    color: var(--text-muted);
}

/* Generator Section */
.generator {
    margin-bottom: 4rem;
}

/* Generator Tabs */
.generator-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab-btn.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tab-btn svg {
    flex-shrink: 0;
}

.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border);
}

@media (max-width: 968px) {
    .generator-container {
        grid-template-columns: 1fr;
    }
}

/* Input Section */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.prompt-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.prompt-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease;
}

.prompt-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.prompt-input::placeholder {
    color: var(--text-muted);
}

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

.example-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.char-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Model Selector */
.model-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.model-selector .input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.model-selector .input-label svg {
    opacity: 0.7;
}

.model-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23666666' 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 12px center;
    padding-right: 40px;
}

.model-select:hover {
    border-color: var(--primary);
}

.model-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.model-select option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px;
}

/* Advanced Options */
.advanced-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.advanced-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.advanced-toggle svg {
    transition: transform 0.3s ease;
}

.advanced-toggle.active svg {
    transform: rotate(180deg);
}

.advanced-panel {
    display: none;
    padding: 1.5rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}

.advanced-panel.active {
    display: block;
}

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

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.option-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.option-textarea,
.option-input,
.option-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

.option-textarea {
    resize: vertical;
    min-height: 60px;
}

.option-select {
    cursor: pointer;
}

.option-slider {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

.option-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.option-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.seed-input-container {
    display: flex;
    gap: 8px;
}

.seed-input-container .option-input {
    flex: 1;
}

.random-btn {
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.random-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

/* Generate Button */
.generate-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.generate-btn .btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-btn .btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn.loading .btn-text {
    display: none;
}

.generate-btn.loading .btn-loader {
    display: flex;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Output Section */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.output-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.output-placeholder svg {
    opacity: 0.5;
}

.output-placeholder p {
    font-size: 0.95rem;
}

.generated-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.output-container:hover .image-overlay {
    opacity: 1;
}

.overlay-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.overlay-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.output-info {
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.output-prompt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.output-model {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Gallery Section */
.gallery-section {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-prompt {
    font-size: 0.8rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.settings-group {
    margin-bottom: 1.5rem;
}

.settings-group:last-child {
    margin-bottom: 0;
}

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

.settings-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.settings-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.password-input-container {
    position: relative;
    display: flex;
}

.password-input-container .settings-input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.settings-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.settings-status {
    padding: 12px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: none;
}

.settings-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.settings-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-secondary,
.btn-primary {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.fullscreen-modal.active {
    display: flex;
}

.fullscreen-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius);
}

.fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1002;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    max-width: 400px;
}

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

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

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

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

.toast-icon {
    flex-shrink: 0;
}

.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.9rem;
}

.toast-close {
    padding: 4px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .logo span {
        display: none;
    }

    .main {
        padding: 1rem;
    }

    .hero {
        padding: 2rem 0.5rem 3rem;
    }

    .generator-container {
        padding: 1.5rem;
    }

    .option-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 0.5rem;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        max-width: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Video Generation Specific Styles */

/* Video Output Container */
.video-output {
    aspect-ratio: 16/9;
}

.generated-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-lg);
    background: #000;
}

.fullscreen-video {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: var(--radius);
}

/* Video Button Gradient */
.video-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.video-btn:hover:not(:disabled) {
    box-shadow: 0 10px 20px rgba(240, 147, 251, 0.3);
}

/* Video Progress Overlay */
.video-progress {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
}

.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem;
}

.spinner.large {
    width: 48px;
    height: 48px;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Generation Info Box */
.generation-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.generation-info svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary);
}

/* Image Upload / Drop Zone */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.image-drop-zone {
    position: relative;
    width: 100%;
    min-height: 120px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-drop-zone:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.image-drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.drop-zone-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

.drop-zone-placeholder svg {
    opacity: 0.6;
}

.drop-zone-placeholder p {
    font-size: 0.9rem;
    font-weight: 500;
}

.drop-zone-hint {
    font-size: 0.75rem;
    opacity: 0.7;
}

.reference-image-preview {
    width: 100%;
    height: 100%;
    min-height: 120px;
    max-height: 200px;
    object-fit: contain;
    padding: 0.5rem;
}

.clear-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--error);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-image-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
}

/* Gallery Video Items */
.gallery-item.video-item {
    position: relative;
}

.gallery-item.video-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item.video-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(2px);
    border-left: 16px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    z-index: 2;
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .generator-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .video-output {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .tab-btn svg {
        display: none;
    }
}
