/* Import custom fonts from iOS app */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');

/* CSS Custom Properties for MIX Branding */
:root {
    /* MIX Brand Colors */
    --mix-primary-blue: #493EC6;
    --mix-secondary-blue: #372F9D;
    --mix-accent-orange: #FF4117;
    --mix-purple-accent: #7777BB;
    --mix-black: #141414;
    --mix-gray-dark: #494454;
    --mix-gray-light: #E8E8E8;
    --mix-gray-medium: #AEAABA;
    --mix-background-light: #F7F7FB;
    --mix-surface: #ffffff;
    --mix-border: #e1e5e9;

    /* Brand Gradients */
    --mix-primary-gradient: linear-gradient(135deg, #493EC6 0%, #372F9D 100%);
    --mix-accent-gradient: linear-gradient(135deg, #FF4117 0%, #ee5a24 100%);
    --mix-background-gradient: linear-gradient(135deg, #493EC6 0%, #372F9D 100%);

    /* Typography */
    --font-display: 'Archivo Black', sans-serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;

    /* Typography Scale - research-informed hierarchy */
    --font-size-hero: 72px;        /* Main headline */
    --font-size-section: 48px;     /* Section titles */
    --font-size-card-title: 24px;  /* Experience card titles */
    --font-size-model-title: 18px; /* Model card titles */
    --font-size-body: 16px;        /* Body text, descriptions */
    --font-size-meta: 14px;        /* Username, likes, metadata */

    /* Spacing Scale - 8px base unit (premium design systems) */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --spacing-3xl: 96px;

    /* Border radius consistent with iOS app */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;

    /* Shadow Scale - depth hierarchy */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-brand-sm: 0 4px 16px rgba(73, 62, 198, 0.2);
    --shadow-brand-lg: 0 8px 32px rgba(73, 62, 198, 0.3);

    /* Animation Values - research-informed durations & easing */
    --duration-fast: 0.15s;        /* Quick feedback */
    --duration-normal: 0.2s;       /* Standard transitions */
    --duration-slow: 0.3s;         /* Emphasis */
    --easing-standard: cubic-bezier(0.4, 0.0, 0.2, 1); /* Material Design standard */
    --easing-decelerate: cubic-bezier(0.0, 0.0, 0.2, 1); /* Entering screen */
    --easing-accelerate: cubic-bezier(0.4, 0.0, 1, 1); /* Leaving screen */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--mix-background-gradient);
    min-height: 100vh;
    color: var(--mix-black);
    line-height: 1.6;
    font-weight: 400;
}

.hidden {
    display: none !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--mix-primary-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Authentication Screen */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400; /* Archivo Black is already heavy */
    background: var(--mix-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.logo-section p {
    color: #666;
    font-size: 1.1rem;
}

/* Authentication Buttons */
.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 12px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.apple-btn {
    background: #000;
    color: white;
}

.apple-btn:hover {
    background: #1a1a1a;
}

.email-btn {
    background: #4285f4;
    color: white;
}

.email-btn:hover {
    background: #357ae8;
}

.google-btn {
    background: white;
    color: #333;
    border: 2px solid #ddd;
}

.google-btn:hover {
    border-color: #4285f4;
}

.apple-icon, .email-icon, .google-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.google-icon {
    fill: none;
}

/* Email Form */
.email-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.submit-btn, .generate-btn {
    background: var(--mix-primary-gradient);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover, .generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.toggle-btn, .back-btn {
    background: none;
    border: none;
    color: var(--mix-primary-blue);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 10px;
}

.toggle-btn:hover, .back-btn:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
}

.auth-footer p {
    color: #999;
    font-size: 0.8rem;
}

/* Main App */
.main-app {
    min-height: 100vh;
    background: var(--mix-background);
}

/* MIX Logo Header */
.mix-logo {
    height: 32px;
    width: auto;
    margin-right: var(--spacing-md);
}

.app-header .mix-branding {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.app-header .mix-branding h1 {
    margin: 0;
}

.app-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400; /* Archivo Black is already heavy */
    background: var(--mix-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: #c82333;
}

.app-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Generation Section */
.generation-section {
    background: white;
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prompt-container h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.generation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #999;
}

.generate-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 18px;
}

/* Generation Status */
.generation-status {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.progress-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid var(--mix-primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Progress Section */
.progress-section {
    margin: 25px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

#progress-percentage {
    font-weight: 700;
    color: var(--mix-primary-blue);
    font-size: 1.1rem;
}

#progress-text {
    color: #666;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--mix-primary-blue) 0%, var(--mix-secondary-blue) 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s ease-in-out;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

#status-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

#status-details {
    color: #666;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 4px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.5s ease-out;
}

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

/* Success Header */
.success-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f8f9fa;
}

.success-icon {
    color: var(--mix-primary-blue);
    margin-bottom: 20px;
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-header h3 {
    color: var(--mix-primary-blue);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.success-header p {
    color: #666;
    font-size: 1.1rem;
}

.model-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.model-preview {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.model-preview-container {
    position: relative;
    display: inline-block;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.model-thumbnail-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.model-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-preview-container:hover .model-preview-overlay {
    opacity: 1;
}

.preview-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.model-info h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #333;
}

.model-description-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 25px;
    font-style: italic;
}

/* Model Details Section */
.model-details {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 120px;
}

.detail-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

/* Download Section */
.download-section {
    margin: 30px 0;
}

.download-section h5 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.download-option:hover {
    border-color: var(--mix-primary-blue);
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.download-option.primary {
    background: linear-gradient(135deg, rgba(73, 62, 198, 0.06) 0%, rgba(55, 47, 157, 0.06) 100%);
    border-color: rgba(73, 62, 198, 0.19);
}

.download-option.downloading {
    opacity: 0.6;
    pointer-events: none;
}

.download-info {
    flex: 1;
    margin-right: 20px;
}

.download-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.format-icon {
    font-size: 1.4rem;
    line-height: 1;
}

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

.format-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.format-note {
    font-size: 0.8rem;
    color: var(--mix-primary-blue);
    font-weight: 500;
    margin-top: 2px;
}

.format-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.download-btn-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.download-btn-option.primary {
    background: var(--mix-primary-gradient);
    color: white;
    box-shadow: 0 3px 12px rgba(73, 62, 198, 0.3);
}

.download-btn-option.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.download-btn-option.secondary {
    background: var(--mix-primary-blue);
    color: white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.3);
}

.download-btn-option.secondary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.no-downloads {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

.model-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

/* Refine Button (Add Colors & Textures) - Prominent CTA */
#refine-model.primary-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 24px 48px;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
    position: relative;
    animation: pulse-glow 2s ease-in-out infinite alternate;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#refine-model.primary-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.6);
    background: linear-gradient(135deg, #ff5252 0%, #d84315 100%);
}

#refine-model.primary-btn:active {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.7);
}

/* Pulsing glow animation */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4), 0 0 0 0 rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4), 0 0 0 8px rgba(255, 107, 107, 0);
    }
}

.download-btn {
    background: var(--mix-primary-gradient);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* History Section */
.history-section {
    background: white;
    border-radius: 4px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.history-section h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 60px 20px;
}

.model-card {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.model-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
}

.model-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
}

.model-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-actions button,
.card-actions a {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.card-actions .download {
    background: var(--mix-primary-blue);
    color: white;
}

.card-actions .download:hover {
    background: #218838;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

#error-message {
    color: #dc3545;
    font-size: 1rem;
    line-height: 1.5;
}

/* Navigation Tabs */
.app-navigation {
    display: flex;
    gap: 2px;
    margin-bottom: 30px;
    background: white;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: #666;
}

.nav-tab.active {
    background: var(--mix-primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-tab:hover:not(.active) {
    color: #333;
    background: #f8f9fa;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Gallery Section */
.gallery-section {
    background: white;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.gallery-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #666;
}

.filter-btn.active {
    background: var(--mix-primary-gradient);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.filter-btn:hover:not(.active) {
    color: #333;
    background: white;
}

/* Gallery Search */
.gallery-search input {
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 200px;
    transition: border-color 0.2s ease;
}

.gallery-search input:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
}

.gallery-search input::placeholder {
    color: #999;
}

/* Gallery Sort */
.gallery-sort select {
    padding: 10px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.gallery-sort select:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
}

/* Refresh Button */
.refresh-btn {
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    border-color: var(--mix-primary-blue);
    color: var(--mix-primary-blue);
    transform: rotate(180deg);
}

/* Gallery Stats */
.gallery-stats {
    margin-bottom: 25px;
    color: #666;
    font-size: 0.9rem;
}

/* Gallery Loading */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top: 3px solid var(--mix-primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    min-height: 300px;
}

.gallery-grid.loading {
    opacity: 0.6;
}

/* Gallery Empty State */
.gallery-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 2px dashed #e9ecef;
}

/* Model Card */
.model-card {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid transparent;
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--mix-primary-blue);
}

/* Model Thumbnail */
.model-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.model-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.model-card:hover .model-thumbnail img {
    transform: scale(1.05);
}

/* Model Badges */
.model-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.availability-badge,
.owner-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.availability-badge.public {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.availability-badge.private {
    background: rgba(108, 117, 125, 0.9);
    color: white;
}

.owner-badge {
    background: rgba(102, 126, 234, 0.9);
    color: white;
}

/* Model Info */
.model-info {
    padding: 20px;
}

.model-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.model-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.model-date,
.model-size {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Model Actions */
.model-actions {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px 20px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 80px;
    justify-content: center;
}

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

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.edit-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: white;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.info-btn {
    background: #6c757d;
    color: white;
}

.info-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

/* Placeholder for model thumbnail */
.model-thumbnail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E") center no-repeat;
    background-size: contain;
    opacity: 0.3;
    z-index: 1;
}

.model-thumbnail img {
    position: relative;
    z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 20px;
    }
    
    .app-content {
        padding: 20px 10px;
    }
    
    .generation-section,
    .results-section,
    .history-section {
        padding: 20px;
    }
    
    .model-result {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .generation-options {
        grid-template-columns: 1fr;
    }
    
    .model-actions,
    .card-actions {
        flex-direction: column;
    }
    
    /* Enhanced Results Mobile Styles */
    .success-header {
        padding-bottom: 20px;
        margin-bottom: 30px;
    }
    
    .success-header h3 {
        font-size: 1.5rem;
    }
    
    .success-header p {
        font-size: 1rem;
    }
    
    .model-details {
        flex-direction: column;
        gap: 15px;
    }
    
    .detail-item {
        min-width: auto;
    }
    
    .download-option {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 15px;
    }
    
    .download-info {
        margin-right: 0;
        margin-bottom: 0;
    }
    
    .download-header {
        justify-content: center;
    }
    
    .download-btn-option {
        justify-content: center;
        width: 100%;
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
    }
    
    /* Gallery Responsive */
    .gallery-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .gallery-search input {
        width: 100%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .model-actions {
        flex-direction: column;
    }
    
    .action-btn {
        flex: none;
    }
}

@media (max-width: 480px) {
    .logo-section h1 {
        font-size: 2.5rem;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    /* Gallery Mobile */
    .gallery-section {
        padding: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-controls {
        gap: 10px;
    }
    
    .gallery-filters {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
    }
}

/* Tooltip and Help Text Styles */
.label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    color: var(--mix-primary-blue);
    cursor: help;
    transition: all 0.2s ease;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.info-icon:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: scale(1.1);
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
}

/* Checkbox with tooltip spacing */
.checkbox-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.checkbox-group .info-icon {
    margin-left: 4px;
}

.checkbox-group .help-text {
    margin-top: 8px;
    margin-left: 0;
    width: 100%;
}
/* Cancel Button Styles */
.status-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.cancel-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

.cancel-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Modal Actions Styles */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.cancel-confirm-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-confirm-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

/* Make sure modal-actions buttons are properly sized */
.modal-actions .secondary-btn,
.modal-actions .cancel-confirm-btn {
    flex: 0 0 auto;
    min-width: 120px;
}

/* Generation status improvements */
.generation-status {
    position: relative;
}

.status-actions {
    text-align: center;
}

/* ==========================================
   AI MODEL GENERATION STYLES - MIX BRAND
   ========================================== */

/* AI Generation Section */
.ai-generation-section {
    background: var(--mix-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-card);
    min-height: 600px;
    margin-bottom: var(--spacing-xl);
    transition: all 0.3s ease;
}

.ai-generation-section:hover {
    box-shadow: var(--shadow-card-hover);
}

/* AI Generation Form */
#ai-generation-form {
    max-width: 800px;
    margin: 0 auto;
}

.ai-prompt-container {
    text-align: center;
    margin-bottom: 40px;
}

.ai-prompt-container h2 {
    font-family: var(--font-display);
    font-size: var(--text-h1);
    font-weight: 900;
    color: var(--mix-black);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.ai-description {
    font-family: var(--font-body);
    color: var(--mix-gray-dark);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* AI Generation Form */
#ai-generation-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

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

#ai-generation-form label {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--mix-black);
    font-size: var(--text-h3);
    margin-bottom: var(--spacing-sm);
}

#ai-model-prompt {
    padding: var(--spacing-lg);
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background: var(--mix-surface);
    color: var(--mix-black);
}

#ai-model-prompt:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
    box-shadow: 0 0 0 3px rgba(73, 62, 198, 0.1);
}

#ai-model-prompt::placeholder {
    color: #999;
    font-style: italic;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

/* AI Advanced Options */
.ai-advanced-options {
    margin-top: var(--spacing-lg);
}

.ai-advanced-toggle {
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    padding: 0;
    background: var(--mix-background-light);
    transition: all 0.3s ease;
}

.ai-advanced-toggle[open] {
    border-color: var(--mix-primary-blue);
    background: var(--mix-surface);
    box-shadow: var(--shadow-card);
}

.ai-advanced-header {
    padding: var(--spacing-lg) var(--spacing-lg);
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--mix-black);
    cursor: pointer;
    font-size: var(--text-h3);
    background: var(--mix-background-light);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    list-style: none;
}

.ai-advanced-toggle[open] .ai-advanced-header {
    background: var(--mix-primary-gradient);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.ai-advanced-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.ai-advanced-toggle[open] .ai-advanced-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a5293 100%);
}

.ai-advanced-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-row .form-group {
    margin: 0;
}

#ai-negative-prompt {
    padding: var(--spacing-md) var(--spacing-md);
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--mix-black);
    background: var(--mix-surface);
    resize: vertical;
    min-height: 80px;
    transition: all 0.3s ease;
}

#ai-negative-prompt:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
    box-shadow: 0 0 0 3px rgba(73, 62, 198, 0.1);
}

#ai-face-limit {
    padding: var(--spacing-md) var(--spacing-md);
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--mix-black);
    background: var(--mix-surface);
    transition: all 0.3s ease;
}

#ai-face-limit:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
    box-shadow: 0 0 0 3px rgba(73, 62, 198, 0.1);
}

#ai-texture-resolution {
    padding: var(--spacing-md) var(--spacing-md);
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--mix-black);
    background: var(--mix-surface);
    cursor: pointer;
    transition: all 0.3s ease;
}

#ai-texture-resolution:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
    box-shadow: 0 0 0 3px rgba(73, 62, 198, 0.1);
}

/* AI Generate Button */
.ai-generate-btn {
    background: var(--mix-primary-gradient);
    color: white;
    border: none;
    padding: var(--spacing-lg) var(--spacing-xxl);
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: var(--text-h2);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-button);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ai-generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ai-generate-btn:hover::before {
    left: 100%;
}

.ai-generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(73, 62, 198, 0.6);
    background: linear-gradient(135deg, var(--mix-secondary-blue) 0%, #493EC6 100%);
}

.ai-generate-btn:active {
    transform: translateY(-1px);
}

.ai-generate-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* AI Generation Status */
.ai-generation-status {
    background: white;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    display: none; /* Hidden by default */
}

.ai-generation-status.active {
    display: block;
}

.ai-status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.ai-status-header h3 {
    font-family: var(--font-display);
    color: var(--mix-black);
    font-size: var(--text-h2);
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.ai-progress-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid var(--mix-primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ai-progress-section {
    margin-bottom: 25px;
}

.ai-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

#ai-progress-percentage {
    font-size: 1.2rem;
    color: var(--mix-primary-blue);
}

#ai-progress-text {
    font-size: 1rem;
    color: #666;
}

.ai-progress-bar-container {
    background: #e9ecef;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-progress-bar {
    height: 100%;
    background: var(--mix-primary-gradient);
    border-radius: var(--radius-md);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.ai-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-status-info {
    color: #666;
    line-height: 1.6;
}

#ai-status-message {
    font-size: 1.05rem;
    margin: 0 0 8px 0;
    font-weight: 500;
}

#ai-status-details {
    font-size: 0.9rem;
    margin: 0;
    color: #999;
}

.ai-status-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.ai-cancel-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--mix-gray-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(73, 68, 84, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-cancel-btn:hover {
    background: var(--mix-black);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(73, 68, 84, 0.4);
}

/* AI Results Section */
.ai-results-section {
    background: white;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto;
}

.ai-success-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.ai-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ai-success-icon svg {
    color: var(--mix-primary-blue);
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.ai-success-header h3 {
    font-family: var(--font-display);
    color: var(--mix-black);
    font-size: var(--text-h1);
    font-weight: 900;
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: uppercase;
}

.ai-success-header p {
    font-family: var(--font-body);
    color: var(--mix-gray-dark);
    font-size: var(--text-body);
    font-weight: 400;
    margin: 0;
}

.ai-model-result {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.ai-model-preview {
    position: sticky;
    top: 20px;
}

.ai-model-preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.ai-model-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ai-model-preview:hover .ai-model-thumbnail-img {
    transform: scale(1.05);
}

.ai-model-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    text-align: center;
}

.ai-preview-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-model-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

#ai-model-title {
    font-family: var(--font-display);
    color: var(--mix-black);
    font-size: var(--text-h2);
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
}

.ai-model-description-text {
    font-family: var(--font-body);
    color: var(--mix-gray-dark);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.ai-model-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--mix-background-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--mix-gray-light);
}

.ai-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ai-detail-label {
    font-family: var(--font-body);
    font-size: var(--text-small);
    color: var(--mix-gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ai-detail-value {
    font-family: var(--font-body);
    font-size: var(--text-h3);
    color: var(--mix-black);
    font-weight: 600;
}

.ai-download-section h5,
.ai-save-section h5 {
    font-family: var(--font-body);
    color: var(--mix-black);
    font-size: var(--text-h3);
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
}

.ai-download-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-save-section {
    padding: var(--spacing-lg);
    background: var(--mix-background-light);
    border-radius: var(--radius-md);
    border: 2px solid var(--mix-gray-light);
    transition: all 0.3s ease;
}

.ai-save-section:hover {
    border-color: var(--mix-primary-blue);
    box-shadow: 0 4px 16px rgba(73, 62, 198, 0.1);
}

.ai-save-form {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

#ai-model-filename {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-md);
    border: 2px solid var(--mix-gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--mix-black);
    background: var(--mix-surface);
    transition: all 0.3s ease;
}

#ai-model-filename:focus {
    outline: none;
    border-color: var(--mix-primary-blue);
    box-shadow: 0 0 0 3px rgba(73, 62, 198, 0.1);
}

.ai-accept-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--mix-accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 65, 23, 0.3);
}

.ai-accept-btn:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #d63031 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 65, 23, 0.4);
}

.ai-model-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.ai-secondary-btn {
    background: var(--mix-gray-dark);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: var(--text-h4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-secondary-btn:hover {
    background: var(--mix-black);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(73, 68, 84, 0.3);
}

/* Responsive Design for AI Generation */
@media (max-width: 768px) {
    .ai-generation-section,
    .ai-generation-status,
    .ai-results-section {
        padding: 25px 20px;
    }

    .ai-prompt-container h2 {
        font-size: 1.8rem;
    }

    .ai-description {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ai-model-result {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .ai-model-preview {
        position: static;
    }

    .ai-model-preview-container {
        height: 250px;
    }

    .ai-model-details {
        grid-template-columns: 1fr;
    }

    .ai-save-form {
        flex-direction: column;
    }

    .ai-accept-btn {
        justify-content: center;
    }

    .ai-success-header h3 {
        font-size: 1.6rem;
    }

    .ai-success-header p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .ai-generation-section,
    .ai-generation-status,
    .ai-results-section {
        padding: 20px 15px;
    }

    .ai-prompt-container h2 {
        font-size: 1.6rem;
    }

    .ai-description {
        font-size: 0.95rem;
    }

    .ai-generate-btn {
        font-size: 1rem;
        padding: 16px 30px;
    }

    .ai-model-preview-container {
        height: 200px;
    }

    #ai-model-title {
        font-size: 1.3rem;
    }

    .ai-success-header h3 {
        font-size: 1.4rem;
    }
}

/* Version Badge */
.version-badge {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: var(--mix-gray-dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.version-badge:hover {
    opacity: 1;
}

/* ==========================================
   NEW LANDING PAGE LAYOUT - PHASE 6
   ========================================== */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 10;
}

.page-header .header-logo {
    animation: none; /* Remove floating animation */
    margin: 0;
    padding: 0;
}

.page-header .mix-logo {
    height: 80px;
}

.language-selector-placeholder {
    width: 100px;
    height: 40px;
    /* Placeholder for language selector - will be implemented in Plan 06-03 */
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    margin-bottom: var(--spacing-2xl);
}

.hero-headline {
    font-family: var(--font-display);
    font-size: var(--font-size-hero);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5),
                 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

/* Experience Cards Section */
.experiences-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
}

.experience-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform var(--duration-normal) var(--easing-standard),
                box-shadow var(--duration-normal) var(--easing-standard);
    text-align: center;
    animation: fadeIn 0.6s var(--easing-decelerate) backwards;
}

.experience-card:nth-child(1) { animation-delay: 0.1s; }
.experience-card:nth-child(2) { animation-delay: 0.2s; }
.experience-card:nth-child(3) { animation-delay: 0.3s; }

.experience-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-brand-lg);
}

.card-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
    line-height: 1;
}

.experience-card h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-card-title);
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    margin: 0 0 var(--spacing-md) 0;
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.experience-card p {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Email Signup Section */
.email-signup-section {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xxl);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: var(--spacing-xl);
}

.email-signup-section h2 {
    font-family: var(--font-body);
    color: var(--mix-gray-dark);
    font-size: 20px;
    font-weight: 300;
    margin: 0 0 var(--spacing-lg) 0;
    line-height: 1.4;
}

/* Responsive */
/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .page-header .mix-logo {
        height: 60px;
    }

    .hero-headline {
        font-size: 48px;
    }

    .experiences-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        margin-bottom: var(--spacing-xl);
    }

    .experience-card {
        padding: var(--spacing-md);
    }

    .card-icon {
        font-size: 40px;
    }

    .experience-card h3 {
        font-size: 20px;
    }

    .experience-card p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .page-header .mix-logo {
        height: 50px;
    }

    .hero-headline {
        font-size: 24px;
    }

    .language-selector-placeholder {
        width: 60px;
        height: 30px;
    }

    .experiences-section {
        padding: 0;
    }

    .experience-card {
        padding: var(--spacing-lg);
    }

    .card-icon {
        font-size: 36px;
        margin-bottom: var(--spacing-md);
    }

    .experience-card h3 {
        font-size: 18px;
        margin-bottom: var(--spacing-sm);
    }

    .experience-card p {
        font-size: 14px;
    }
}

/* ===================================
   Model Browser Section
   =================================== */

.model-browser-section {
    max-width: 1200px;
    margin: var(--spacing-2xl) auto var(--spacing-2xl);
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--font-size-section);
    font-weight: 900;
    color: white;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 320px);
    gap: var(--spacing-sm);
}

.model-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--duration-normal) var(--easing-standard),
                box-shadow var(--duration-normal) var(--easing-standard);
    cursor: pointer;
    animation: fadeIn 0.6s var(--easing-decelerate) backwards;
}

.model-card:nth-child(1) { animation-delay: 0.1s; }
.model-card:nth-child(2) { animation-delay: 0.15s; }
.model-card:nth-child(3) { animation-delay: 0.2s; }
.model-card:nth-child(4) { animation-delay: 0.25s; }
.model-card:nth-child(5) { animation-delay: 0.3s; }

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand-lg);
}

.hero-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

#model-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

#model-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
}

#model-3 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

#model-4 {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
}

.model-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.model-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 16px 16px 16px;
    transform: translateY(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.model-card:hover .model-info {
    transform: translateY(-4px);
}

.model-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: white;
    margin: 0 0 6px 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.hero-card .model-name {
    font-size: 24px;
    margin-bottom: 8px;
}

.model-creator,
.model-likes {
    font-family: var(--font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 3px 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-card .model-creator,
.hero-card .model-likes {
    font-size: 16px;
}

.model-likes {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

/* Tablet Layout (768px - 1024px) */
@media (max-width: 1024px) {
    .section-title {
        font-size: 40px;
        margin-bottom: 40px;
    }

    .bento-grid {
        grid-template-rows: repeat(2, 280px);
        gap: 16px;
    }

    .model-name {
        font-size: 16px;
    }

    .hero-card .model-name {
        font-size: 20px;
    }

    .model-creator,
    .model-likes {
        font-size: 13px;
    }

    .hero-card .model-creator,
    .hero-card .model-likes {
        font-size: 14px;
    }
}

/* Mobile Layout (< 768px) */
@media (max-width: 768px) {
    .model-browser-section {
        margin: 64px auto 48px;
        padding: 0 16px;
    }

    .section-title {
        font-size: 32px;
        margin-bottom: 32px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }

    .hero-card,
    #model-1,
    #model-2,
    #model-3,
    #model-4 {
        grid-column: 1 / 2;
        grid-row: auto;
        height: 300px;
    }

    .model-name {
        font-size: 16px;
    }

    .model-creator,
    .model-likes {
        font-size: 13px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .bento-grid {
        gap: 12px;
    }

    .hero-card,
    #model-1,
    #model-2,
    #model-3,
    #model-4 {
        height: 250px;
    }

    .model-info {
        padding: 16px 12px 12px 12px;
    }

    .model-name {
        font-size: 15px;
    }

    .model-creator,
    .model-likes {
        font-size: 12px;
    }
}


/* Language Selector Styles */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-xl);
  z-index: 100;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
}

.logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
}

.language-selector {
  position: relative;
}

.lang-toggle-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 8px;
  color: white;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

#current-lang {
  font-weight: 600;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: var(--spacing-xs);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-height: 400px;
  overflow-y: auto;
  min-width: 200px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-dropdown.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
}

.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: var(--spacing-sm) var(--spacing-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--mix-black);
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.lang-option:hover {
  background: rgba(73, 62, 198, 0.1);
}

.lang-option.active {
  background: rgba(73, 62, 198, 0.2);
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .site-header {
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .logo {
    font-size: 24px;
  }

  .lang-toggle-btn {
    font-size: 14px;
    padding: 6px 12px;
  }

  .lang-dropdown {
    max-height: 300px;
    min-width: 180px;
  }
}

/* RTL support */
html[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

html[dir="rtl"] .site-header {
  flex-direction: row-reverse;
}

html[dir="rtl"] {
  text-align: right;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .language-selector {
  left: var(--spacing-xl);
  right: auto;
}

html[dir="rtl"] .experience-card,
html[dir="rtl"] .model-card {
  text-align: right;
}

html[dir="rtl"] .cta-section {
  text-align: center;
}

html[dir="rtl"] .model-info {
  left: auto;
  right: 16px;
}
