/* IArea - Premium SaaS Design */
/* Dark Mode Elegante - Profissional */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Premium Color Palette - Dark Mode Elegante */
    --primary: #14B8A6;
    --primary-dark: #0D9488;
    --primary-light: #2DD4BF;
    --primary-glow: rgba(20, 184, 166, 0.4);
    --secondary: #8B5CF6;
    --secondary-light: #A78BFA;
    --accent: #F472B6;
    --accent-gold: #FBBF24;

    /* Dark Theme - Slate Blue */
    --background: #0F172A;
    --surface: #1E293B;
    --surface-light: #334155;
    --surface-lighter: #475569;
    --surface-glass: rgba(30, 41, 59, 0.85);

    /* Text */
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;

    /* Borders & Effects */
    --border: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(20, 184, 166, 0.4);

    /* Status */
    --success: #10B981;
    --warning: #FBBF24;
    --error: #EF4444;

    /* Gradients - More refined */
    --gradient-primary: linear-gradient(135deg, #14B8A6 0%, #0D9488 50%, #06B6D4 100%);
    --gradient-hero: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #A855F7 100%);
    --gradient-accent: linear-gradient(135deg, #F472B6 0%, #EC4899 50%, #DB2777 100%);
    --gradient-gold: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
    --gradient-dark: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.12) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(244, 114, 182, 0.08) 0px, transparent 50%);

    /* Shadows - Enhanced depth */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(20, 184, 166, 0.25);
    --shadow-glow-hover: 0 0 60px rgba(20, 184, 166, 0.35);
    --shadow-purple: 0 0 40px rgba(139, 92, 246, 0.2);

    /* Radius - Slightly more rounded for modern feel */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background Mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--gradient-mesh);
    pointer-events: none;
    z-index: 0;
}

#app {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR - Premium Glass Effect
   ═══════════════════════════════════════════════════════════ */
.sidebar {
    width: 300px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--primary-glow), transparent);
    opacity: 0.5;
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: float 3s ease-in-out infinite;
}

.logo-img {
    width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(0, 212, 170, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px var(--primary-glow);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.nav-item:hover {
    color: var(--text);
    transform: translateX(4px);
}

.nav-item:hover::before {
    opacity: 0.1;
}

.nav-item.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: var(--shadow-glow);
}

.nav-item.active::before {
    opacity: 0;
}

.nav-icon {
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.nav-label {
    font-size: 15px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15) 0%, rgba(108, 92, 231, 0.1) 100%);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glow);
    transition: all var(--transition-normal);
}

.credits-badge:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.credits-icon {
    font-size: 22px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.credits-count {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.credits-label {
    font-size: 13px;
    color: var(--text-muted);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--gradient-hero);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-md);
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.user-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.user-menu {
    position: relative;
}

.user-menu.open .user-arrow {
    transform: rotate(180deg);
}

.user-menu.open .user-info {
    background: var(--surface-light);
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 100;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--surface-light);
}

.dropdown-item.logout:hover {
    background: rgba(255, 118, 117, 0.15);
    color: var(--error);
}

.dropdown-icon {
    font-size: 18px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--gradient-dark);
}

.page {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.page.active {
    display: flex;
    flex-direction: column;
}

.page-header {
    padding: 40px 48px 32px;
    position: relative;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   CHAT PAGE - Premium Chat Interface
   ═══════════════════════════════════════════════════════════ */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    padding: 24px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    animation: messageIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.message.assistant .message-avatar {
    background: var(--gradient-primary);
    animation: float 3s ease-in-out infinite;
}

.avatar-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.message.user .message-avatar {
    background: var(--gradient-hero);
}

.message-content {
    max-width: 70%;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    position: relative;
    transition: all var(--transition-normal);
}

.message-content:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Typing cursor animation */
.typing-cursor {
    display: inline-block;
    color: var(--primary);
    font-weight: bold;
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2) 0%, rgba(167, 139, 250, 0.1) 100%);
    border-color: rgba(108, 92, 231, 0.3);
}

.message-text {
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    text-align: left;
}

/* ═══════════════════════════════════════════════════════════
   OPTIONS GRID - Beautiful Selection Cards
   ═══════════════════════════════════════════════════════════ */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.option-btn:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.option-btn:hover::before {
    opacity: 0.1;
}

.option-btn.selected {
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.15);
    box-shadow: var(--shadow-glow);
}

.option-btn.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 14px;
    color: var(--primary);
    font-weight: bold;
}

.option-icon {
    font-size: 36px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.option-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.option-desc {
    font-size: 11px;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}

/* Disabled state for answered questions */
.option-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.option-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border);
}

.option-btn.disabled.selected {
    opacity: 1;
    border-color: var(--primary);
    background: rgba(0, 212, 170, 0.15);
}

/* Back button for navigation */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    margin-top: 16px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
    color: var(--text);
}

.back-btn span {
    font-size: 16px;
}

/* Answered message styling */
.message.answered .options-grid {
    opacity: 0.7;
}

.message.answered .message-content {
    border-color: rgba(0, 212, 170, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   UPLOAD ZONE - Stunning Drag & Drop
   ═══════════════════════════════════════════════════════════ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.03) 0%, rgba(108, 92, 231, 0.03) 100%);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.upload-zone:hover {
    border-color: var(--primary);
    transform: scale(1.01);
}

.upload-zone:hover::before {
    opacity: 0.05;
}

.upload-zone.dragover {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(0, 212, 170, 0.1);
    box-shadow: var(--shadow-glow);
}

.upload-zone.hidden {
    display: none;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 64px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.upload-text {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   CHAT INPUT - Glass Effect Input
   ═══════════════════════════════════════════════════════════ */
.chat-input-wrapper {
    display: flex;
    gap: 14px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 10px;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    padding: 14px 18px;
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-input:disabled {
    opacity: 0.5;
}

.send-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 20px;
    color: white;
    box-shadow: var(--shadow-md);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Image Preview in Chat */
.message-image {
    max-width: 320px;
    border-radius: var(--radius-lg);
    margin-top: 16px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.message-image:hover {
    transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════
   HISTORY PAGE - Beautiful Project Gallery
   ═══════════════════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 0 48px 48px;
}

.project-card {
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow-hover);
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.project-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.project-rating {
    color: var(--accent-gold);
    font-size: 16px;
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════════
   CREDITS PAGE - Stunning Pricing Cards
   ═══════════════════════════════════════════════════════════ */
.credits-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    padding: 0 48px 48px;
    max-width: 900px;
}

.credit-card {
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 40px 28px;
    text-align: center;
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.credit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.credit-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.credit-card:hover::before {
    opacity: 1;
}

.credit-card.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(108, 92, 231, 0.05) 100%);
    transform: scale(1.05);
}

.credit-card.popular::before {
    opacity: 1;
}

.credit-card.popular:hover {
    transform: scale(1.08);
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credit-amount {
    font-size: 56px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-top: 16px;
}

.credit-type {
    font-size: 15px;
    color: var(--text-muted);
    margin: 10px 0 20px;
    font-weight: 500;
}

.credit-price {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.credit-savings {
    font-size: 13px;
    color: var(--success);
    margin-bottom: 20px;
    font-weight: 600;
}

.buy-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    width: 100%;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buy-btn:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════════════════
   MODALS - Glassmorphism Overlays
   ═══════════════════════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.9);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal.active {
    display: flex;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-2xl);
    max-width: 640px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: modalContentIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Result Modal */
.result-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--background);
    overflow: hidden;
}

.result-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blur-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(25px);
    background: rgba(10, 14, 23, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blur-overlay.hidden {
    display: none;
}

.loading-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    color: white;
    font-size: 15px;
    font-weight: 500;
}

.loading-indicator.hidden {
    display: none;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px;
}

.action-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.action-btn.secondary {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.action-btn.tertiary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.action-btn.tertiary:hover {
    background: var(--surface-light);
    color: var(--text);
}

.action-btn:hover {
    transform: scale(1.03);
}

.action-btn.primary:hover {
    box-shadow: var(--shadow-glow);
}

.rating-section {
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.rating-label {
    font-size: 14px;
    color: var(--text-muted);
}

.star-rating {
    display: flex;
    gap: 6px;
}

.star {
    font-size: 32px;
    color: var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.star:hover,
.star.active {
    color: var(--accent-gold);
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 234, 167, 0.5));
}

/* ═══════════════════════════════════════════════════════════
   AUTH MODAL - Premium Login Experience
   ═══════════════════════════════════════════════════════════ */
.auth-modal .auth-container {
    background: var(--surface);
    border-radius: var(--radius-2xl);
    max-width: 420px;
    width: 100%;
    padding: 48px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.auth-modal .auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 16px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 15px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface-light);
    padding: 4px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.auth-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.auth-form.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    padding: 16px 18px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: all var(--transition-normal);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.submit-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 18px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 10px;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES & RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-lighter);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* ═══════════════════════════════════════════════════════════
   IMAGE EDITOR MODAL
   ═══════════════════════════════════════════════════════════ */
.edit-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
}

.edit-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.edit-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 14px;
}

.edit-canvas-container {
    position: relative;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

#edit-canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
    touch-action: none;
}

.edit-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.brush-size-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brush-size-control label {
    font-size: 14px;
    color: var(--text-muted);
}

.brush-size-control input[type="range"] {
    width: 120px;
    accent-color: var(--primary);
}

#brush-size-value {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    min-width: 40px;
}

.edit-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.edit-tool-btn:hover {
    background: var(--error);
    border-color: var(--error);
}

.edit-prompt-section {
    margin-bottom: 24px;
}

.edit-prompt-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

#edit-prompt {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color var(--transition-normal);
}

#edit-prompt:focus {
    outline: none;
    border-color: var(--primary);
}

#edit-prompt::placeholder {
    color: var(--text-dim);
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.edit-actions .action-btn {
    padding: 14px 28px;
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU BUTTON & OVERLAY
   ═══════════════════════════════════════════════════════════ */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 150;
    width: 48px;
    height: 48px;
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all var(--transition-normal);
}

.mobile-menu-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.mobile-menu-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-overlay.active {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE - Mobile
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-overlay.active {
        pointer-events: auto;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        width: 100%;
        padding-top: 70px;
    }

    .page-header {
        padding: 24px;
    }

    .projects-grid,
    .credits-options {
        padding: 0 24px 24px;
    }

    .chat-container {
        padding: 16px;
    }

    .message-content {
        max-width: 85%;
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-modal .auth-container {
        padding: 32px;
    }

    /* Adjust chat messages area for mobile header */
    .page-chat .chat-container {
        padding-top: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   MODE SELECTION - Beautiful Choice Cards
   ═══════════════════════════════════════════════════════════ */
.mode-selection {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-card {
    flex: 1;
    min-width: 200px;
    max-width: 240px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mode-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.25);
}

.mode-card:hover::before {
    opacity: 0.08;
}

.mode-card.transform-mode:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.3);
}

.mode-card.render-mode::before {
    background: var(--gradient-hero);
}

.mode-card.render-mode:hover {
    border-color: var(--secondary);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.mode-icon {
    font-size: 48px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.mode-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    position: relative;
    z-index: 1;
}

.mode-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.mode-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gradient-hero);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   RENDER HISTORY TIMELINE
   ═══════════════════════════════════════════════════════════ */
.render-history {
    margin-top: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.render-history-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.render-timeline {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--surface-light) transparent;
}

.render-timeline::-webkit-scrollbar {
    height: 6px;
}

.render-timeline::-webkit-scrollbar-track {
    background: transparent;
}

.render-timeline::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 3px;
}

.render-item {
    flex-shrink: 0;
    width: 160px;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.render-item:hover {
    border-color: var(--secondary);
    transform: scale(1.05);
    box-shadow: var(--shadow-purple);
}

.render-item-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.render-item-info {
    padding: 12px;
}

.render-item-date {
    font-size: 11px;
    color: var(--text-dim);
}

@media (max-width: 768px) {
    .mode-selection {
        flex-direction: column;
        align-items: center;
    }

    .mode-card {
        max-width: 100%;
        padding: 32px 24px;
    }
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE - Professional Hero Section
   ═══════════════════════════════════════════════════════════ */
.landing-page {
    position: fixed;
    inset: 0;
    background: var(--background);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 80px 20px 40px 20px;
}

.landing-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    pointer-events: none;
}

.landing-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.landing-logo {
    margin-bottom: 32px;
}

.landing-logo-img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(20, 184, 166, 0.3));
}

.landing-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Comparison Slider */
.comparison-container {
    margin-bottom: 48px;
}

.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16/9;
    cursor: ew-resize;
}

.comparison-before,
.comparison-after {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.comparison-after {
    z-index: 1;
}

.comparison-before {
    z-index: 2;
}

.comparison-before img,
.comparison-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comparison-before {
    clip-path: inset(0 50% 0 0);
}

.comparison-label {
    position: absolute;
    bottom: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-before .comparison-label {
    left: 16px;
}

.comparison-after .comparison-label {
    right: 16px;
}

.comparison-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 10;
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: white;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.comparison-handle::before {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--background);
    box-shadow: var(--shadow-md);
    letter-spacing: 2px;
}

/* CTA Button */
.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 20px 48px;
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-glow);
    margin-bottom: 20px;
}

.landing-cta:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-hover);
}

.cta-icon {
    font-size: 24px;
}

.cta-arrow {
    font-size: 24px;
    transition: transform var(--transition-fast);
}

.landing-cta:hover .cta-arrow {
    transform: translateX(5px);
}

.landing-note {
    font-size: 14px;
    color: var(--text-dim);
}

/* Hide landing when not needed */
.landing-page.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .landing-title {
        font-size: 32px;
    }

    .landing-subtitle {
        font-size: 16px;
    }

    .landing-cta {
        padding: 16px 32px;
        font-size: 16px;
    }

    .comparison-slider {
        aspect-ratio: 4/3;
    }
}

/* Google Auth Section */
.google-auth-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px 0;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    background: #ffffff;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.google-login-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.google-login-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.google-icon {
    flex-shrink: 0;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 300px;
    text-align: left;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

.terms-checkbox label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--primary);
    text-decoration: none;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Auth Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.auth-modal.active {
    display: flex;
}

.auth-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border);
}

.auth-header {
    margin-bottom: 20px;
}

.auth-header .logo-img {
    height: 50px;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 15px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.auth-tab.active {
    background: var(--primary);
    color: white;
}

.auth-tab:hover:not(.active) {
    background: var(--surface-hover);
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.auth-form.hidden {
    display: none;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--transition-fast);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-form input::placeholder {
    color: var(--text-dim);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS GRID - Meus Projetos Page
   ═══════════════════════════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 48px 48px;
}

.project-card {
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.project-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--surface);
}

.project-image img,
.project-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.project-card:hover .project-image img,
.project-card:hover .project-image video {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-action-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 20px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    max-width: 160px;
}

.project-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.project-info {
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.project-type {
    background: var(--gradient-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.project-style {
    background: rgba(139, 92, 246, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    color: var(--secondary-light);
}

.project-date {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-dim);
}

/* Loading and Empty States */
.loading-projects,
.empty-projects {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.loading-projects .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-projects p {
    color: var(--text-muted);
    font-size: 15px;
}

.empty-projects .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-projects h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.empty-projects p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.empty-projects.error .empty-icon {
    color: var(--error);
}

@media (max-width: 768px) {
    .projects-grid {
        padding: 0 16px 24px;
        gap: 16px;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .project-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    }
}

/* Page Header Styles */
.page-header {
    padding: 32px 48px 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-header {
        padding: 24px 20px 20px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    /* Mobile sidebar */
    .sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 300px;
        z-index: 1000;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    /* User menu always visible in mobile sidebar */
    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background: var(--surface-glass);
        backdrop-filter: blur(20px);
        padding-bottom: 30px;
    }

    .user-menu {
        display: block !important;
    }

    .user-info {
        display: flex !important;
        cursor: pointer;
    }

    /* Mobile dropdown opens upward */
    .user-dropdown {
        bottom: 100%;
        margin-bottom: 8px;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
        background: var(--surface-glass);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        width: 44px;
        height: 44px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .hamburger-line {
        width: 22px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Mobile overlay */
    .mobile-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Main content adjustments */
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .chat-container {
        padding-top: 70px;
    }

    /* Override base display: none */
    .mobile-menu-btn {
        display: flex !important;
    }

    /* Body scroll on mobile */
    html,
    body {
        overflow-x: hidden;
        overflow-y: auto;
        height: auto;
        min-height: 100%;
    }

    .main-content {
        overflow-y: auto;
        min-height: 100vh;
    }
}

/* Base rules - hidden by default on desktop */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.mobile-overlay {
    display: none;
}

.mobile-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Hide hamburger when landing page is visible */
.landing-page:not(.hidden)~.mobile-menu-btn {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   UI ANIMATIONS & LOADING STATES
   ═══════════════════════════════════════════════════════════ */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    animation: fadeInScale 0.3s ease;
}

.loading-content .loading-spinner {
    margin-bottom: 16px;
}

.loading-content p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Button Click Animation */
.btn-animate,
.nav-item,
.option-card,
.feature-option,
.action-btn,
.landing-cta,
.google-login-btn,
button[type="submit"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animate:active,
.nav-item:active,
.option-card:active,
.feature-option:active,
.action-btn:active,
.landing-cta:active,
.google-login-btn:active,
button[type="submit"]:active {
    transform: scale(0.97);
}

/* Ripple Effect */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    animation: ripple 0.6s ease-out forwards;
}

/* Message Animation */
.message {
    animation: fadeInUp 0.4s ease forwards;
}

.message:nth-child(odd) {
    animation: slideInLeft 0.4s ease forwards;
}

.message:nth-child(even) {
    animation: slideInRight 0.4s ease forwards;
}

/* Option Cards Animation */
.option-card,
.feature-option {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.option-card:nth-child(1) {
    animation-delay: 0.05s;
}

.option-card:nth-child(2) {
    animation-delay: 0.1s;
}

.option-card:nth-child(3) {
    animation-delay: 0.15s;
}

.option-card:nth-child(4) {
    animation-delay: 0.2s;
}

.option-card:nth-child(5) {
    animation-delay: 0.25s;
}

.option-card:nth-child(6) {
    animation-delay: 0.3s;
}

.feature-option:nth-child(1) {
    animation-delay: 0.05s;
}

.feature-option:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-option:nth-child(3) {
    animation-delay: 0.15s;
}

.feature-option:nth-child(4) {
    animation-delay: 0.2s;
}

.feature-option:nth-child(5) {
    animation-delay: 0.25s;
}

.feature-option:nth-child(6) {
    animation-delay: 0.3s;
}

/* Page Transitions */
.page {
    animation: fadeIn 0.4s ease;
}

/* Nav Item Hover Effect */
.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after {
    width: 80%;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-light) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading .btn-text {
    visibility: hidden;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Smooth hover transitions */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Pulse animation for important elements */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow effect on hover */
.hover-glow:hover {
    box-shadow: var(--shadow-glow-hover);
}

/* ═══════════════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   ═══════════════════════════════════════════════════════════ */

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    animation: bounceIn 0.6s ease, pulse-glow 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    color: white;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* Hide when landing page is visible */
.landing-page:not(.hidden)~.whatsapp-float {
    opacity: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   USER AVATAR STYLES
   ═══════════════════════════════════════════════════════════ */

img.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.user-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   REVIEWS PAGE STYLES
   ═══════════════════════════════════════════════════════════ */

.page-reviews {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reviews-header {
    text-align: center;
    margin-bottom: 1rem;
}

.reviews-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.reviews-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.reviews-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reviews-loading,
.no-reviews,
.reviews-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.no-reviews-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.no-reviews-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Review Card */
.review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.review-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.review-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.review-user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.review-name {
    font-weight: 600;
    color: var(--text-primary);
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.review-stars {
    font-size: 1.1rem;
    color: #ffc107;
    letter-spacing: 2px;
}

.review-comment {
    margin: 0;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Rating Modal Enhancements */
.rating-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.star-rating .star {
    font-size: 1.75rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #ffc107;
    transform: scale(1.2);
}

.review-comment-input,
textarea.review-comment {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
}

textarea.review-comment:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2);
}

.submit-review-btn {
    margin-top: 0.5rem;
}

.review-success {
    color: #00d4aa;
    font-weight: 500;
    animation: bounceIn 0.5s ease;
}

.review-success.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .page-reviews {
        padding: 1rem;
    }

    .reviews-stats {
        gap: 1.5rem;
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .review-card {
        padding: 1rem;
    }

    .review-avatar,
    .review-avatar-fallback {
        width: 36px;
        height: 36px;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESULT ACTIONS FIX - Ensure Expand button is visible
   ═══════════════════════════════════════════════════════════ */

#result-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
}

#result-actions button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#expand-btn {
    grid-column: span 2;
    background: var(--surface-light) !important;
    border: 1px solid var(--border);
}

#expand-btn:hover {
    background: var(--surface-lighter) !important;
    transform: translateY(-2px);
}