/* ======================================
   MOBILE-FIRST DESIGN SYSTEM
   SelfieBump - Light Pastel Theme
   ====================================== */

/* ======================================
   CSS CUSTOM PROPERTIES (LIGHT PASTEL THEME)
   ====================================== */
:root {
    /* Core Colors - Coral/Salmon accent */
    --primary-coral: #E8A598;
    --primary-coral-hover: #D4938A;
    --primary-lavender: #D4C8F0;
    --primary-gradient: linear-gradient(135deg, #E8A598 0%, #D4C8F0 100%);
    
    /* Legacy aliases for compatibility */
    --primary-rose: #E8A598;
    --primary-rose-hover: #D4938A;
    
    /* Light Theme Backgrounds */
    --background: #FFFBF8;
    --background-warm: #FDF8F5;
    --surface: #FFFFFF;
    --surface-lavender: #F0EBFA;
    --surface-lighter: #FAF7FF;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    
    /* Pastels */
    --pastel-blush: #FFF0F3;
    --pastel-lavender: #EDE7F8;
    --pastel-mint: #E8F8F2;
    --pastel-peach: #FFF4E8;
    --pastel-cream: #FFF9F5;
    
    /* Legacy variable aliases (for compatibility) */
    --bg-app: #FDF8F5;
    --bg-card: #FFFFFF;
    
    /* Light Theme Text */
    --text-primary: #2D2A3E;
    --text-secondary: #5A5670;
    --text-muted: #8A8699;
    --text-on-coral: #FFFFFF;
    
    /* Accents */
    --accent-purple: #9B8AC4;
    --accent-green: #7BC9A3;
    --accent-star: #9B8AC4;
    
    /* Spacing */
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    --header-height: 60px;
    --bottom-nav-height: 70px;
    
    /* Shadows - Softer for light theme */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 20px rgba(232, 165, 152, 0.25);
    --shadow-lavender: 0 4px 20px rgba(212, 200, 240, 0.3);
    
    /* Borders */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --border-light: 1px solid rgba(0, 0, 0, 0.06);
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ======================================
   BASE STYLES
   ====================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Force light color scheme to prevent browser dark mode overrides */
    color-scheme: light only;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Light theme body overrides for mobile pages */
body.app-page-mobile,
body.dashboard-page,
body.history-page,
body.profile-page,
body.chatbot-page {
    background: var(--background-warm);
}

/* ======================================
   ONBOARDING MODAL
   ====================================== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-smooth);
}

.onboarding-overlay.active {
    opacity: 1;
    visibility: visible;
}

.onboarding-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s var(--ease-bounce);
    box-shadow: var(--shadow-lg);
}

.onboarding-overlay.active .onboarding-modal {
    transform: scale(1) translateY(0);
}

.onboarding-header {
    padding: 28px 24px 20px;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.onboarding-emoji {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.onboarding-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 8px;
}

.onboarding-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin: 0;
}

.onboarding-content {
    padding: 24px;
}

/* Tips List */
.selfie-tips-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.selfie-tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.selfie-tips-list li:last-child {
    border-bottom: none;
}

.tip-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tip-icon.good {
    background: var(--pastel-mint);
    color: #22C55E;
}

.tip-icon.bad {
    background: #FEE2E2;
    color: #EF4444;
}

/* Selfie Examples Carousel */
.selfie-examples {
    margin-bottom: 24px;
}

.selfie-examples-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.examples-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.example-card {
    flex: 0 0 45%;
    min-width: 140px;
    scroll-snap-align: start;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.example-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.example-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: white;
}

.example-card.good .example-label {
    background: linear-gradient(to top, rgba(34, 197, 94, 0.9), transparent);
}

.example-card.bad .example-label {
    background: linear-gradient(to top, rgba(239, 68, 68, 0.9), transparent);
}

/* Onboarding CTA */
.onboarding-cta {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    box-shadow: var(--shadow-glow);
}

.onboarding-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(229, 99, 153, 0.5);
}

.onboarding-skip {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.onboarding-skip:hover {
    color: var(--text-secondary);
}

/* ======================================
   STYLE RECOMMENDATION BADGE
   ====================================== */
.style-recommendation {
    background: linear-gradient(135deg, #065F46 0%, #047857 100%);
    border: 2px solid rgba(34, 197, 94, 0.5);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 0 20px 24px;
    display: none;
    animation: slideInUp 0.4s var(--ease-smooth);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.style-recommendation.visible {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.recommendation-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.recommendation-text {
    flex: 1;
}

.recommendation-text strong {
    display: block;
    font-size: 16px;
    color: #FFFFFF;
    margin-bottom: 4px;
    font-weight: 600;
}

.recommendation-text span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* ======================================
   RECOMMENDED STYLE HIGHLIGHT
   ====================================== */
.style-card-mobile.recommended {
    position: relative;
    border: 2px solid rgba(188, 167, 255, 0.35);
    box-shadow: 0 0 20px rgba(188, 167, 255, 0.12), 
                0 0 40px rgba(229, 99, 153, 0.06);
    animation: softGlow 3s ease-in-out infinite;
}

@keyframes softGlow {
    0%, 100% {
        border-color: rgba(188, 167, 255, 0.35);
        box-shadow: 0 0 20px rgba(188, 167, 255, 0.12), 
                    0 0 40px rgba(229, 99, 153, 0.06);
    }
    50% {
        border-color: rgba(229, 99, 153, 0.35);
        box-shadow: 0 0 25px rgba(229, 99, 153, 0.15), 
                    0 0 50px rgba(188, 167, 255, 0.08);
    }
}

/* Small "Our Pick" badge */
.style-card-mobile.recommended::before {
    content: '👆 Our Pick';
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(188, 167, 255, 0.9);
    color: #1A1A2E;
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 12px;
    z-index: 20;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hide badge and glow once selected */
.style-card-mobile.recommended.selected::before {
    display: none;
}

.style-card-mobile.recommended.selected {
    animation: none;
    border-color: var(--primary-rose);
    box-shadow: var(--shadow-glow);
}

/* ======================================
   MOBILE-FIRST APP LAYOUT
   ====================================== */
.app-page-mobile {
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
    background: var(--bg-app);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Mobile Header */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.mobile-logo {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    font-style: normal;
    color: var(--text-primary);
    text-decoration: none;
}

.mobile-credits {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--pastel-lavender);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-credits-icon {
    font-size: 14px;
}

/* Credit countdown animation */
.credits-updating {
    animation: creditPulse 0.5s var(--ease-bounce);
}

@keyframes creditPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--primary-rose); }
}

/* Main App Content */
.mobile-app-content {
    flex: 1;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ======================================
   FULL-SCREEN UPLOAD SECTION
   ====================================== */
.upload-section-mobile {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    min-height: calc(100dvh - var(--header-height) - var(--bottom-nav-height));
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.upload-header-mobile {
    text-align: center;
    margin-bottom: 20px;
}

.upload-header-mobile h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.upload-header-mobile p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* Upload Area */
.upload-area-mobile {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface-lavender);
    border: 3px dashed var(--primary-lavender);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.upload-area-mobile:hover,
.upload-area-mobile.drag-over {
    border-color: var(--primary-coral);
    background: var(--pastel-cream);
    transform: scale(1.01);
}

.upload-placeholder-mobile {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
}

.upload-icon-mobile {
    width: 80px;
    height: 80px;
    background: var(--primary-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-glow);
}

.upload-icon-mobile svg {
    width: 36px;
    height: 36px;
    color: white;
}

.upload-text-mobile {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint-mobile {
    font-size: 14px;
    color: var(--text-muted);
}

/* Camera Button (prominent on mobile) */
.camera-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 28px;
    background: var(--primary-coral);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s var(--ease-smooth);
}

.camera-btn-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(232, 165, 152, 0.5);
}

/* Upload Preview */
.upload-preview-mobile {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.upload-preview-mobile.active {
    display: flex;
}

.preview-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--surface-lavender, #F0EBFA);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 50vh;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.preview-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.preview-action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.preview-action-btn.secondary {
    background: var(--bg-app);
    border: 2px solid var(--text-muted);
    color: var(--text-primary);
}

.preview-action-btn.primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    box-shadow: var(--shadow-glow);
}

/* ======================================
   SWIPEABLE STYLE SELECTOR
   ====================================== */
.style-section-mobile {
    padding: 24px 0;
    display: none;
}

.style-section-mobile.active {
    display: block;
    animation: slideInUp 0.5s var(--ease-smooth);
}

.style-section-header {
    padding: 0 20px;
    margin-bottom: 20px;
}

.style-section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.style-section-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Style Category */
.style-category-mobile {
    margin-bottom: 32px;
}

.category-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 16px;
}

.category-title-mobile {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.category-see-all {
    font-size: 13px;
    color: var(--primary-rose);
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}

/* Horizontal Scroll Carousel */
.style-carousel-mobile {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 4px 20px 16px;
    scrollbar-width: none;
}

.style-carousel-mobile::-webkit-scrollbar {
    display: none;
}

/* Style Card - TikTok/Instagram Style */
.style-card-mobile {
    flex: 0 0 auto;
    width: 150px;
    scroll-snap-align: start;
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 3px solid transparent;
    transition: all 0.25s var(--ease-smooth);
    cursor: pointer;
    position: relative;
}

.style-card-mobile:active {
    transform: scale(0.97);
}

.style-card-mobile.selected {
    border-color: var(--primary-coral);
    box-shadow: var(--shadow-glow);
}

.style-card-mobile.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--primary-coral);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.style-image-mobile {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, var(--pastel-blush), var(--pastel-lavender));
}

.style-info-mobile {
    padding: 12px;
}

.style-name-mobile {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.style-desc-mobile {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================================
   STICKY GENERATE BUTTON
   ====================================== */
.sticky-generate-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height, 70px) + var(--safe-bottom, 0px));
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, var(--background-warm) 0%, rgba(253, 248, 245, 0.98) 80%, transparent 100%);
    z-index: 90;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease-smooth);
}

.sticky-generate-container.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.generate-btn-mobile {
    width: 100%;
    padding: 18px 32px;
    background: var(--primary-coral);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: 'DM Sans', sans-serif;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn-mobile:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.generate-btn-mobile:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(229, 99, 153, 0.5);
}

.generate-btn-mobile .btn-loader {
    display: none;
}

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

.generate-btn-mobile.loading .btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

.generate-cost {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 500;
}

/* ======================================
   BOTTOM NAVIGATION
   ====================================== */
.bottom-nav-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    padding-bottom: var(--safe-bottom);
    background: var(--surface);
    border-top: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.nav-item-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}

.nav-item-mobile.active {
    color: var(--primary-coral);
}

.nav-item-mobile svg {
    width: 26px;
    height: 26px;
    margin-bottom: 2px;
    stroke-width: 1.8;
}

.nav-item-mobile span {
    font-size: 10px;
    font-weight: 500;
    font-weight: 600;
}

/* ======================================
   RESULT PAGE - MOBILE
   ====================================== */
.result-page-mobile {
    min-height: 100vh;
    min-height: 100dvh;
    background: #000;
    display: flex;
    flex-direction: column;
}

.result-image-fullscreen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-top: calc(var(--header-height) + 16px);
}

.result-image-fullscreen img {
    max-width: 100%;
    max-height: calc(100vh - var(--header-height) - 200px);
    border-radius: var(--radius-md);
    object-fit: contain;
}

.result-actions-mobile {
    background: var(--bg-card);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 20px;
    padding-bottom: calc(24px + var(--safe-bottom));
}

.result-title-mobile {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
    text-align: center;
}

.result-subtitle-mobile {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px;
    text-align: center;
}

.result-btns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.result-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.result-btn-mobile.primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-glow);
    grid-column: span 2;
}

.result-btn-mobile.secondary {
    background: var(--bg-app);
    color: var(--text-primary);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.result-btn-mobile:active {
    transform: scale(0.98);
}

.edit-counter-badge {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

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

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

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

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

/* Loading shimmer */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ======================================
   REFERRAL SECTION
   ====================================== */
.referral-card {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    margin: 20px;
    text-align: center;
}

.referral-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin: 0 0 8px;
}

.referral-card p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0 0 20px;
}

.referral-code-box {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}

.referral-code {
    font-size: 24px;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 3px;
}

.copy-referral-btn {
    width: 100%;
    padding: 14px;
    background: white;
    color: var(--primary-rose);
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}

.copy-referral-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ======================================
   RESPONSIVE - TABLET AND DESKTOP
   ====================================== */
@media (min-width: 768px) {
    .mobile-app-content {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .style-card-mobile {
        width: 180px;
    }
    
    .upload-area-mobile {
        min-height: 400px;
    }
}

@media (min-width: 1024px) {
    :root {
        --header-height: 72px;
    }
    
    /* ===== DESKTOP LAYOUT CONTAINER ===== */
    .mobile-app-content {
        max-width: 900px;
        padding: 40px 60px;
    }
    
    /* ===== DESKTOP HEADER ===== */
    .mobile-header {
        max-width: 100%;
        padding: 16px 60px;
    }
    
    .mobile-logo {
        font-size: 1.5rem;
    }
    
    /* Add desktop nav links to header */
    .mobile-header::after {
        content: '';
        display: none; /* Desktop nav handled separately */
    }
    
    /* ===== DESKTOP UPLOAD AREA ===== */
    .upload-area-mobile {
        max-width: 600px;
        margin: 0 auto;
        min-height: 450px;
    }
    
    .upload-icon-mobile {
        width: 80px;
        height: 80px;
    }
    
    .upload-icon-mobile svg {
        width: 40px;
        height: 40px;
    }
    
    .upload-text-mobile {
        font-size: 1.1rem;
    }
    
    /* ===== DESKTOP PREVIEW BUTTONS ===== */
    .preview-actions-mobile {
        max-width: 500px;
        margin: 0 auto;
        gap: 16px;
    }
    
    .preview-btn-mobile {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    /* ===== DESKTOP STYLE CAROUSEL ===== */
    .style-carousel-mobile {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        padding: 20px 40px;
        gap: 20px;
    }
    
    .style-card-mobile {
        width: 180px;
        flex-shrink: 0;
    }
    
    .style-card-mobile img {
        height: 220px;
    }
    
    /* ===== DESKTOP GENERATE BUTTON ===== */
    .sticky-generate-container {
        position: relative;
        bottom: auto;
        padding: 30px 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .generate-btn-mobile {
        max-width: 400px;
        margin: 0 auto;
        padding: 18px 48px;
        font-size: 1.1rem;
        border-radius: 16px;
    }
    
    /* ===== DESKTOP BOTTOM NAV - SHOW AS TOP NAV ===== */
    .bottom-nav-mobile {
        position: fixed;
        top: 14px;
        bottom: auto;
        left: auto;
        right: 160px; /* Leave room for credits badge */
        width: auto;
        height: auto;
        flex-direction: row;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        gap: 8px;
        z-index: 1001;
    }
    
    .nav-item-mobile {
        flex-direction: row;
        gap: 6px;
        padding: 10px 16px;
        background: var(--surface-lavender);
        border-radius: var(--radius-full);
        transition: all 0.2s ease;
    }
    
    .nav-item-mobile:hover {
        background: var(--primary-coral);
        color: white;
    }
    
    .nav-item-mobile.active {
        background: var(--primary-coral);
        color: white;
    }
    
    .nav-item-mobile svg {
        width: 18px;
        height: 18px;
    }
    
    .nav-item-mobile span {
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    /* ===== DESKTOP RESULT PAGE ===== */
    .result-page-mobile .result-content-mobile {
        max-width: 900px;
        margin: 0 auto;
        padding: 40px;
    }
    
    .result-image-area {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .result-actions-panel {
        max-width: 500px;
        margin: 30px auto 0;
    }
    
    .result-action-btns {
        flex-direction: row;
        justify-content: center;
    }
    
    .result-btn {
        flex: 0 1 auto;
        min-width: 150px;
    }
    
    /* ===== DESKTOP CHATBOT PAGE ===== */
    .chatbot-page .chat-container {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .chat-messages {
        padding: 30px 40px;
    }
    
    .chat-input-area {
        max-width: 700px;
        margin: 0 auto;
        padding: 20px 40px;
    }
    
    /* ===== DESKTOP HEADERS (ALL PAGES) ===== */
    .dashboard-header,
    .profile-header,
    .history-header,
    .result-header-mobile,
    .chat-header {
        padding: 16px 60px;
        max-width: 100%;
    }
    
    .dashboard-logo,
    .profile-logo,
    .history-logo {
        font-size: 1.5rem;
    }
    
    /* ===== DESKTOP DASHBOARD ===== */
    .dashboard-page {
        padding-bottom: 40px; /* Remove extra padding since nav is at top */
    }
    
    .dashboard-content {
        max-width: 1000px;
        margin: 0 auto;
        padding: 40px 60px;
    }
    
    .quick-create-card,
    .create-cta-card {
        max-width: 700px;
        margin: 0 auto 40px;
    }
    
    .creations-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .creations-scroll {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        overflow-x: visible;
        padding: 0;
    }
    
    .creation-card {
        min-width: auto;
    }
    
    /* ===== DESKTOP PROFILE PAGE ===== */
    .profile-page {
        padding-bottom: 40px;
    }
    
    .profile-content {
        max-width: 700px;
        margin: 0 auto;
        padding: 40px 60px;
    }
    
    .profile-title {
        text-align: center;
        margin-bottom: 32px;
    }
    
    /* ===== DESKTOP HISTORY PAGE ===== */
    .history-page {
        padding-bottom: 40px;
    }
    
    .history-content {
        max-width: 1000px;
        margin: 0 auto;
        padding: 40px 60px;
    }
    
    .history-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    /* ===== DESKTOP RESULT PAGE ===== */
    .result-page-mobile {
        padding-bottom: 40px;
    }
    
    /* ===== DESKTOP CHATBOT PAGE ===== */
    .chatbot-page {
        padding-bottom: 40px;
    }
}

/* ======================================
   RESPONSIVE - EXTRA LARGE SCREENS (1440px+)
   ====================================== */
@media (min-width: 1440px) {
    .mobile-app-content {
        max-width: 1000px;
    }
    
    .style-carousel-mobile {
        gap: 24px;
    }
    
    .style-card-mobile {
        width: 200px;
    }
    
    .style-card-mobile img {
        height: 250px;
    }
    
    .bottom-nav-mobile {
        right: 180px; /* Leave room for credits badge */
        top: 16px;
    }
    
    .mobile-header,
    .dashboard-header,
    .profile-header,
    .history-header {
        padding: 16px 80px;
    }
    
    .result-image-area {
        max-width: 700px;
    }
    
    .dashboard-content,
    .history-content {
        max-width: 1200px;
        padding: 40px 80px;
    }
    
    .profile-content {
        max-width: 800px;
        padding: 40px 80px;
    }
    
    .creations-grid,
    .history-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .creations-scroll {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-create-card,
    .create-cta-card {
        max-width: 800px;
    }
}

/* ======================================
   DARK MODE SUPPORT - DISABLED
   We're using a light-only theme that matches the website
   ====================================== */
/* Dark mode overrides disabled - using light theme only */

