* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    
    
    
    --primary-color: #4C1D95;  
    --primary-dark: #3d1a7a;   
    --primary-light: #6d28d9;   
    --secondary-color: #2563eb;
    --blue-sky: #87ceeb;
    --blue-light: #4da6ff;
    --blue-medium: #1e90ff;
    --blue-dark: #0066cc;
    
    
    --primary-purple: #4C1D95;  
    --primary-purple-light: #6d28d9;  
    --primary-teal: #1e90ff;
    --primary-teal-light: #4da6ff;
    --accent-purple: #4C1D95;   
    --accent-amber: #ff9500;
    --accent-amber-light: #ffaa33;
    
    
    --surface-950: #12121A;
    --surface-900: #1A1B26;
    --surface-850: #242638;
    --surface-800: #2D2F45;
    --surface-700: #374151;
    --surface-600: #4B5563;
    --surface-400: #9CA3AF;
    --surface-300: #D1D5DB;
    --surface-200: #E5E7EB;
    
    
    --dark-bg: #12121A;
    --dark-bg-secondary: #1A1B26;
    --light-bg: #FFFFFF;
    --light-bg-secondary: #F8FAFC;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    
    
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-light: #FFFFFF;
    --text-dark: #1a1a2e;
    --text-gray: #666;
    
    
    --border-light: #E5E7EB;
    --border-dark: #374151;
    --border-purple: rgba(76, 29, 149, 0.2);  
    --border-color: #e0e0e0;
    
    
    --success: #10B981;
    --success-500: #10B981;
    --success-400: #34D399;
    --warning: #F59E0B;
    --warning-500: #4C1D95;  
    --error: #EF4444;
    --error-500: #EF4444;
    --error-400: #F87171;
    --info-500: #1e90ff;
    
    
    --sidebar-width: 320px;
    --navbar-height: 72px;
    --input-height: 56px;
    
    
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-blue: 0 8px 25px rgba(30, 144, 255, 0.2);
    --shadow-glow: 0 0 40px rgba(76, 29, 149, 0.3);  
    --shadow-blue-glow: 0 0 40px rgba(30, 144, 255, 0.3);
    
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    
    
    --blue-gradient: linear-gradient(135deg, #87ceeb, #1e90ff);
    --blue-gradient-dark: linear-gradient(135deg, #4da6ff, #0066cc);
    --orange-blue-gradient: linear-gradient(135deg, #4C1D95, #1e90ff);  
    --blue-orange-gradient: linear-gradient(135deg, #87ceeb, #ff9500);
    
    
    --gradient-primary: linear-gradient(135deg, #4C1D95, #1e90ff);  
    --gradient-secondary: linear-gradient(135deg, #87ceeb, #ff9500);
    --gradient-accent: linear-gradient(135deg, #4C1D95, #ff9500);  
    --gradient-dark: linear-gradient(135deg, var(--surface-900) 0%, var(--surface-950) 100%);
    
    
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    
    background: 
        
        linear-gradient(180deg, 
            rgba(10, 10, 15, 0.95) 0%,
            rgba(17, 24, 39, 0.92) 50%,
            rgba(10, 10, 15, 0.95) 100%),
        
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(76, 29, 149, 0.15) 0%, transparent 50%),  
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        
        var(--surface-950);
    background-attachment: fixed;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


html:not([data-theme]) body,
body:not([data-theme="light"]) {
    background: 
        
        linear-gradient(180deg, 
            rgba(10, 10, 15, 0.95) 0%,
            rgba(17, 24, 39, 0.92) 50%,
            rgba(10, 10, 15, 0.95) 100%),
        
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(76, 29, 149, 0.15) 0%, transparent 50%),  
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        
        var(--surface-950);
    background-attachment: fixed;
    color: var(--text-light);
}


html[data-theme="light"] body,
body[data-theme="light"] {
    background: 
        linear-gradient(180deg, 
            rgba(249, 250, 251, 0.98) 0%,
            rgba(255, 255, 255, 1) 50%,
            rgba(249, 250, 251, 0.98) 100%),
        radial-gradient(circle at 10% 10%, rgba(76, 29, 149, 0.05) 0%, transparent 50%),  
        radial-gradient(circle at 90% 90%, rgba(30, 144, 255, 0.05) 0%, transparent 50%),
        var(--bg-white);
    background-attachment: fixed;
    color: var(--text-dark);
}


h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light);
}


html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4,
body[data-theme="light"] h5,
body[data-theme="light"] h6 {
    color: var(--text-dark);
}



.jm_a1 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    padding: env(safe-area-inset-top, 0) max(2rem, env(safe-area-inset-right)) 0 max(2rem, env(safe-area-inset-left));
    background: rgba(18, 18, 26, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(76, 29, 149, 0.15);  
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05) inset, 0 4px 20px rgba(0, 0, 0, 0.1);
}

.jm_a1.jm_a2 {
    background: rgba(18, 18, 26, 0.95);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.05) inset, 0 8px 32px rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(76, 29, 149, 0.2);  
}


html[data-theme="light"] .jm_a1,
body[data-theme="light"] .jm_a1 {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(76, 29, 149, 0.15);  
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05) inset, 0 4px 20px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .jm_a1.jm_a2,
body[data-theme="light"] .jm_a1.jm_a2 {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.05) inset, 0 8px 32px rgba(0, 0, 0, 0.1);
    border-bottom-color: rgba(76, 29, 149, 0.2);  
}

.navbar-left,
.navbar-center,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}


.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.logo-container:hover {
    background: rgba(76, 29, 149, 0.1);  
    transform: translateY(-1px);
}

.logo-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-md);
    filter: drop-shadow(0 2px 8px rgba(76, 29, 149, 0.3));  
    transition: all var(--transition-normal);
    display: block;
    flex-shrink: 0;
}

.logo-container:hover .logo-image {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(76, 29, 149, 0.4));  
}

.logo-text {
    font-size: 1.625rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1;
    white-space: nowrap;
}


.btn-new-chat {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;  
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-new-chat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(76, 29, 149, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;  
    background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-teal-light) 100%);
}

.btn-new-chat:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.3);  
}

.btn-new-chat:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    background: rgba(76, 29, 149, 0.1);  
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(76, 29, 149, 0.2);  
}

.nav-link-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link-item:hover {
    color: var(--accent-purple);
    background: rgba(76, 29, 149, 0.1);  
    transform: translateY(-1px);
}

.nav-link-item.active {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
    box-shadow: var(--shadow-sm);
}

.nav-link-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--accent-purple));
    border-radius: 2px;
}


.jm_c8 {
    position: relative;
}

.jm_c9 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
}

.jm_c9:hover {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
}

.jm_d1 {
    font-weight: 600;
    max-width: min(42vw, 220px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jm_c8.open .jm_c9 {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
}




.jm_d2 {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--space-1);
    background: rgba(18, 18, 26, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(76, 29, 149, 0.3);  
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: var(--space-2) 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1000;
    pointer-events: none;
}

.jm_c8.open .jm_d2 {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


.jm_c8-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    transition: all var(--transition-fast);
    cursor: pointer;
    gap: var(--space-3);
}

.jm_c8-item:hover {
    background: rgba(76, 29, 149, 0.15);  
}

.version-option {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    flex: 1;
}


.dropdown-arrow {
    transition: transform var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: var(--space-1);
}

.jm_c8.open .dropdown-arrow {
    transform: rotate(180deg);
}

.btn-upgrade-small {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(76, 29, 149, 0.3);  
}

.btn-upgrade-small:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.4);  
}


.jm_d2.jm_d3 {
    min-width: min(92vw, 520px);
    max-width: min(96vw, 560px);
    padding: 0;
    max-height: min(72vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.jm-picker-free-tier,
.jm-picker-pro-tier {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.jm-picker-free-tier[hidden],
.jm-picker-pro-tier[hidden] {
    display: none !important;
}

.jm-picker-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.jm-picker-heading {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-light);
}

.jm-picker-subtitle {
    margin: 8px 0 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    line-height: 1.35;
}

.jm-free-single-col {
    width: 100%;
}

.jm-pro-stack-wide {
    width: 100%;
}

.jm_d5-wrap {
    padding: var(--space-2) var(--space-3) var(--space-3);
    border-top: 1px solid rgba(76, 29, 149, 0.3);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.jm_d5 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.08));
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.jm_d5:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 165, 0, 0.14));
    box-shadow: 0 4px 24px rgba(255, 215, 0, 0.12);
}

.jm_d5:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.8);
    outline-offset: 2px;
}

.jm_d5-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.jm_d5-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fde047, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.jm_d5-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.35;
}

.jm_d5-chevron {
    flex-shrink: 0;
    opacity: 0.9;
    display: flex;
    align-items: center;
}

.jm_d3-header {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(76, 29, 149, 0.25);
    flex-shrink: 0;
}

.jm-model-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.jm-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}

.jm-badge-free {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.jm-badge-pro {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
    color: #fde047;
    border: 1px solid rgba(255, 215, 0, 0.45);
}

.jm-model-scroll {
    overflow-y: auto;
    padding: var(--space-2) var(--space-3) var(--space-3);
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.jm-model-category {
    margin-bottom: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.jm-model-category:last-of-type {
    margin-bottom: var(--space-2);
}

.jm-category-heading {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 var(--space-2) 0;
}

.jm-category-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    align-items: start;
}

.jm-model-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.jm-col-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.45);
}

.jm-pro-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.jm_d4 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    text-align: left;
    padding: var(--space-3);
    margin: 0;
    border: 1px solid rgba(76, 29, 149, 0.35);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    font: inherit;
    position: relative;
}

.jm_d4:hover {
    background: rgba(76, 29, 149, 0.18);
    border-color: rgba(167, 139, 250, 0.45);
}

.jm_d4.is-active {
    border-color: rgba(255, 114, 0, 0.65);
    box-shadow: 0 0 0 1px rgba(255, 114, 0, 0.25);
    background: rgba(255, 114, 0, 0.1);
}

.jm_d4.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.jm_d4.is-locked:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(76, 29, 149, 0.35);
}

.jm_d4.is-locked::after {
    content: 'Pro';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #111;
}

.jm-model-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.jm-model-desc {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 400;
}

.jm_d3-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid rgba(76, 29, 149, 0.25);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
}

.jm-model-hint {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.5);
    max-width: 280px;
}

.jm-soon {
    color: rgba(255, 114, 0, 0.9);
    font-weight: 600;
}

.jm-inline-upgrade {
    flex-shrink: 0;
}


.btn-upgrade {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-upgrade:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}




.btn-theme-toggle {
    background: rgba(76, 29, 149, 0.1);  
    border: 1px solid rgba(76, 29, 149, 0.2);  
    border-radius: var(--radius-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    color: var(--text-light);
    position: relative;
}

.btn-theme-toggle:hover {
    background: rgba(76, 29, 149, 0.2);  
    border-color: var(--accent-purple);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.2);  
}


.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity var(--transition-fast);
}

.theme-icon-moon {
    display: none;
}

[data-theme="light"] .theme-icon-sun {
    display: none;
}

[data-theme="light"] .theme-icon-moon {
    display: block;
}

[data-theme="dark"] .theme-icon-sun {
    display: block;
}

[data-theme="dark"] .theme-icon-moon {
    display: none;
}


[data-theme="light"] .btn-theme-toggle {
    background: rgba(76, 29, 149, 0.08);  
    border: 1px solid rgba(76, 29, 149, 0.25);  
    color: var(--text-primary);
}

[data-theme="light"] .btn-theme-toggle:hover {
    background: rgba(76, 29, 149, 0.15);  
    border-color: var(--accent-purple);
}


.btn-login-nav,
a.btn-login-nav,
a.btn-logout-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-login-nav:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
}

.btn-login-nav:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}


.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(76, 29, 149, 0.12);
    border: 1px solid rgba(76, 29, 149, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all var(--transition-fast);
    color: var(--text-light);
}

.mobile-menu-toggle:hover {
    background: rgba(76, 29, 149, 0.2);
    color: var(--accent-purple);
}

.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.mobile-menu-toggle .dots-icon {
    display: block;
    transition: opacity var(--transition-fast);
}

.mobile-menu-toggle .dots-close-icon {
    display: none;
    position: relative;
    width: 20px;
    height: 20px;
}

.mobile-menu-toggle .dots-close-icon span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: all var(--transition-normal);
}

.mobile-menu-toggle .dots-close-icon span:nth-child(1) {
    transform: translate(-50%, -50%) rotate(45deg);
}

.mobile-menu-toggle .dots-close-icon span:nth-child(2) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.mobile-menu-toggle.active .dots-icon {
    display: none;
}

.mobile-menu-toggle.active .dots-close-icon {
    display: block;
}


#mobileMenu {
    position: fixed;
    top: var(--navbar-height);
    right: 0;
    width: 300px;
    max-width: 85vw;
    background: rgba(18, 18, 26, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(76, 29, 149, 0.15);  
    box-shadow: -4px 0 32px rgba(0, 0, 0, 0.25);
    z-index: 999;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    display: block;
}

#mobileMenu.show {
    transform: translateX(0);
}

#mobileMenu {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu-content {
    padding: var(--space-4);
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
}

.mobile-menu-content::before {
    content: 'Powered by Judemy';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--accent-purple);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid rgba(76, 29, 149, 0.1);  
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
}

.mobile-nav-link {
    padding: var(--space-3) var(--space-4);
    text-decoration: none;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: block;
    width: 100%;
}

.mobile-nav-link:hover {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
}

.mobile-actions {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(76, 29, 149, 0.1);  
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    z-index: 998;
    transition: all var(--transition-normal);
}

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


.chat-app-container {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    margin-top: var(--navbar-height);
    position: relative;
}



.jm_a3 {
    width: var(--sidebar-width);
    background: rgba(18, 18, 26, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid rgba(76, 29, 149, 0.1);  
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: var(--navbar-height);
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.15);
}

.jm_a4 {
    padding: var(--space-5) var(--space-4);
    border-bottom: 1px solid rgba(76, 29, 149, 0.1);  
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(76, 29, 149, 0.03);  
}

.jm_a5 {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}


html[data-theme="light"] .jm_a3,
body[data-theme="light"] .jm_a3 {
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid rgba(76, 29, 149, 0.15);  
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .jm_a4,
body[data-theme="light"] .jm_a4 {
    border-bottom: 1px solid rgba(76, 29, 149, 0.15);  
}

html[data-theme="light"] .jm_a5,
body[data-theme="light"] .jm_a5 {
    color: var(--text-dark);
}

.btn-sidebar-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-sidebar-close:hover {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
}

.jm_a6 {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}


.conversations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
}

.conversation-item:hover {
    background: rgba(76, 29, 149, 0.08);  
    border-color: rgba(76, 29, 149, 0.15);  
    transform: translateX(2px);
}

.conversation-item.active {
    background: rgba(76, 29, 149, 0.12);  
    border-color: rgba(76, 29, 149, 0.25);  
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.15), 0 0 0 1px rgba(76, 29, 149, 0.1) inset;  
}

.conversation-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 29, 149, 0.08);  
    border: 1px solid rgba(76, 29, 149, 0.2);  
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.2);  
    overflow: hidden;
    padding: 4px;
}

.conversation-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 1px 4px rgba(76, 29, 149, 0.3));  
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.conversation-preview {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.conversation-delete {
    opacity: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.conversation-item:hover .conversation-delete {
    opacity: 1;
}

.conversation-delete:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}


.jm_a7 {
    padding: var(--space-5) var(--space-4);
    border-top: 1px solid rgba(76, 29, 149, 0.1);  
    background: rgba(76, 29, 149, 0.02);  
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: rgba(76, 29, 149, 0.08);  
    border: 1px solid rgba(76, 29, 149, 0.15);  
    backdrop-filter: blur(10px);
}

.user-info:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.15);  
    background: rgba(76, 29, 149, 0.12);  
    transform: translateY(-1px);
}

.user-avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.3);  
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2px;
    line-height: 1.4;
}

.user-status {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    line-height: 1.3;
}


.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    background: transparent;
    position: relative;
}

.chat-header {
    padding: var(--space-5) var(--space-8);
    border-bottom: 1px solid rgba(76, 29, 149, 0.1);  
    display: flex;
    align-items: center;
    background: rgba(18, 18, 26, 0.6);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 72px;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    margin-right: 12px;
    transition: all var(--transition-fast);
}

.btn-sidebar-toggle:hover {
    background: rgba(76, 29, 149, 0.15);  
    color: var(--accent-purple);
}


.jm_a8 {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-8) var(--space-10);
    scroll-behavior: smooth;
    background: transparent;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}


.jm_c5 {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--navbar-height) - 200px);
    padding: 40px 0;
}

.jm_c5.hidden {
    display: none;
}

.jm_c6 {
    max-width: 680px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    margin: 0 auto;
    padding: var(--space-4);
}

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

.welcome-icon {
    margin-bottom: 24px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-10);
    background: rgba(76, 29, 149, 0.12);  
    border: 2px solid rgba(76, 29, 149, 0.25);  
    border-radius: var(--radius-2xl);
    box-shadow: 0 8px 32px rgba(76, 29, 149, 0.2), 0 0 0 1px rgba(76, 29, 149, 0.1) inset;  
    backdrop-filter: blur(10px);
    padding: var(--space-4);
}

.welcome-icon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(76, 29, 149, 0.3));  
}

.welcome-badge {
    display: inline-block;
    background: rgba(76, 29, 149, 0.15);  
    border: 1px solid rgba(76, 29, 149, 0.3);  
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-6);
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.15);  
}

.welcome-badge-text {
    color: var(--accent-purple);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.welcome-title {
    font-size: 2.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-5);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.welcome-description {
    font-size: 1.1875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-12);
    line-height: 1.7;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.suggested-questions {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

@media (min-width: 640px) {
    .suggested-questions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.jm_c7 {
    padding: var(--space-4) var(--space-6);
    background: rgba(76, 29, 149, 0.08);  
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(76, 29, 149, 0.2);  
    border-radius: var(--radius-xl);
    font-size: 0.9375rem;
    color: var(--text-light);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    line-height: 1.5;
}

.jm_c7:hover {
    background: rgba(76, 29, 149, 0.2);  
    border-color: var(--accent-purple);
    color: var(--primary-teal-light);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(76, 29, 149, 0.3);  
}


.chat-input-container {
    padding: var(--space-6) var(--space-8);
    border-top: 1px solid rgba(76, 29, 149, 0.1);  
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.4) 0%, rgba(18, 18, 26, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

.chat-input-form {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.file-upload-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    padding: 0;
}

.btn-upload-inline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(76, 29, 149, 0.2);  
    border: 1px solid rgba(76, 29, 149, 0.2);  
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-upload-inline:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(76, 29, 149, 0.3);  
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-upload-inline:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}




.file-preview-container {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(76, 29, 149, 0.08);  
    border: 1px solid rgba(76, 29, 149, 0.2);  
    border-radius: 10px;
    max-height: 60px;
    overflow: hidden;
}

.file-preview-container.has-files {
    display: flex;
}


.file-preview-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 4px;
}


.file-preview-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(76, 29, 149, 0.15);  
    border: 1px solid rgba(76, 29, 149, 0.3);  
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.file-preview-item:hover {
    background: rgba(76, 29, 149, 0.2);  
    border-color: var(--accent-purple);
    transform: translateY(-1px);
}


.file-preview-image {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(76, 29, 149, 0.3);  
}


.file-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 29, 149, 0.15);  
    border: 1px solid rgba(76, 29, 149, 0.3);  
    border-radius: 6px;
    color: var(--accent-purple);
}

.file-icon svg {
    width: 18px;
    height: 18px;
}


.btn-remove-file {
    position: absolute;
    top: -6px;
    right: -6px;
    background: rgba(239, 68, 68, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    padding: 2px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 2;
}

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

.btn-remove-file svg {
    width: 10px;
    height: 10px;
    stroke-width: 3;
}


.file-info,
.file-preview-name,
.file-size {
    display: none;
}


.file-preview-item:hover::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 26, 0.95);
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    border: 1px solid rgba(76, 29, 149, 0.3);  
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

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


.input-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(76, 29, 149, 0.15);  
    border-radius: var(--radius-2xl);
    padding: var(--space-4) var(--space-5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(12px);
}

.input-wrapper:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 16px rgba(76, 29, 149, 0.2), 0 0 0 1px rgba(76, 29, 149, 0.2) inset, 0 0 24px rgba(76, 29, 149, 0.15);  
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.input-wrapper.error {
    border-color: var(--error);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.chat-input {
    flex: 1;
    min-height: 28px;
    max-height: 180px;
    padding: var(--space-1) 0;
    border: none;
    border-radius: 0;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.7;
    resize: none;
    transition: all var(--transition-fast);
    background: transparent;
    color: var(--text-light);
    font-weight: 400;
    align-self: center;
}

.chat-input:focus {
    outline: none;
}

.chat-input:focus-visible {
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-tertiary);
}

.btn-send {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(76, 29, 149, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;  
}

.btn-send:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(76, 29, 149, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;  
    background: linear-gradient(135deg, var(--primary-purple-light) 0%, var(--primary-teal-light) 100%);
}

.btn-send:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}

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

.btn-send:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}


.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-4);
    padding: 0 var(--space-2);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.char-count {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.char-count.warning {
    color: var(--warning);
}

.char-count.error {
    color: var(--error);
}

.brand-caption {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: auto;
    margin-right: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    letter-spacing: 0.01em;
}

.brand-caption::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(76, 29, 149, 0.5);  
}

.input-actions {
    display: flex;
    gap: var(--space-3);
}

.btn-action {
    background: rgba(76, 29, 149, 0.1);  
    border: 1px solid rgba(76, 29, 149, 0.2);  
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-action:hover {
    background: rgba(76, 29, 149, 0.2);  
    color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-sm);
}

.btn-action:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}


.loading-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}


.message {
    max-width: 85%;
    margin-bottom: 24px;
    animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    50% {
        opacity: 0.5;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-user {
    margin-left: auto;
}

.message-ai {
    margin-right: auto;
}

.message-content {
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.message-user .message-content {
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
    box-shadow: 0 2px 12px rgba(255, 114, 0, 0.25);
}

.message-ai .message-content {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    color: var(--text-light);
    border: 1px solid rgba(255, 114, 0, 0.12);
    border-bottom-left-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

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

.message-avatar {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    flex-shrink: 0;
}

.message-user .message-avatar {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 12px rgba(255, 114, 0, 0.3);
}

.message-user .avatar-initial {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
}

.message-ai .message-avatar {
    background: rgba(255, 114, 0, 0.08);
    border: 1px solid rgba(255, 114, 0, 0.2);
    padding: 6px;
    box-shadow: 0 2px 8px rgba(255, 114, 0, 0.2);
}

.avatar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 1px 4px rgba(255, 114, 0, 0.3));
}

.message-sender {
    font-size: 0.875rem;
    font-weight: 600;
}

.message-user .message-sender {
    color: white;
}

.message-ai .message-sender {
    color: var(--accent-purple);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.8;
}


.thinking-indicator {
    opacity: 1;
    animation: fadeIn 0.3s ease-out;
}

.thinking-indicator .message-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.thinking-indicator .message-text {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.thinking-text {
    color: var(--text-light);
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.9;
}

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
    display: inline-block;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    40% {
        transform: translateY(-6px);
        opacity: 1;
    }
}


.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}


@media (max-width: 1440px) {
    .jm_a1 {
        padding: 0 var(--space-6);
    }
    
    .chat-header {
        padding: var(--space-5) var(--space-6);
    }
}

@media (max-width: 1024px) {
    :root {
        --navbar-height: 68px;
        --sidebar-width: 300px;
    }
    
    .jm_a1 {
        height: 68px;
        padding: 0 var(--space-5);
    }
    
    .chat-app-container {
        margin-top: 68px;
        height: calc(100vh - 68px);
    }
    
    .jm_a3 {
        top: 68px;
        transform: translateX(-100%);
        width: 300px;
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.25);
        transition: transform var(--transition-normal);
    }
    
    .jm_a3.active {
        transform: translateX(0);
    }
    
    .chat-main {
        margin-left: 0;
    }
    
    .btn-sidebar-toggle,
    .btn-sidebar-close {
        display: block;
    }
    
    .navbar-center {
        display: none;
    }
    
    .navbar-right {
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .message {
        max-width: 90%;
    }
    
    .logo-image {
        width: 42px;
        height: 42px;
    }
    
    .logo-text {
        font-size: 1.375rem;
    }
    
    
    
    body {
        background: var(--surface-950) !important;
    }
    
    html[data-theme="light"] body,
    body[data-theme="light"] {
        background: #FFFFFF !important;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 64px;
    }
    
    .jm_a1 {
        height: 64px;
        padding: 0 var(--space-4);
    }
    
    .jm_a1.jm_a2 {
        background: rgba(18, 18, 26, 0.98);
    }
    
    .chat-app-container {
        margin-top: 64px;
        height: calc(100vh - 64px);
    }
    
    .jm_a3 {
        top: 64px;
        width: 280px;
    }
    
    .logo-image {
        width: 38px;
        height: 38px;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .navbar-left {
        gap: var(--space-3);
    }
    
    .navbar-right {
        gap: 8px;
    }
    
    .btn-new-chat span {
        display: none;
    }
    
    .btn-new-chat {
        padding: var(--space-2);
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-theme-toggle,
    .btn-upgrade,
    .btn-login-nav,
    a.btn-login-nav {
        min-height: 44px;
    }
    
    .btn-upgrade span {
        display: none;
    }
    
    .btn-upgrade {
        width: 44px;
        padding: 0;
        min-width: 44px;
    }
    
    .chat-header {
        padding: var(--space-3) var(--space-4);
        min-height: 64px;
    }
    
    .jm_a8 {
        padding: var(--space-4);
    }
    
    .chat-input-container {
        padding: var(--space-4);
    }
    
    .welcome-title {
        font-size: 1.875rem;
    }
    
    .welcome-description {
        font-size: 1rem;
    }
    
    .suggested-questions {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .message {
        max-width: 85%;
    }
    
    .message-avatar {
        width: 36px;
        height: 36px;
    }
    
    .conversation-icon {
        width: 36px;
        height: 36px;
    }
    
    .brand-caption {
        display: none;
    }
    
    .input-footer {
        flex-wrap: wrap;
        gap: var(--space-3);
    }
    
    .char-count {
        order: 1;
    }
    
    .input-actions {
        order: 2;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    :root {
        --navbar-height: 60px;
    }
    
    .jm_a1 {
        height: 60px;
        padding: env(safe-area-inset-top, 0) max(var(--space-3), env(safe-area-inset-right)) 0 max(var(--space-3), env(safe-area-inset-left));
    }
    
    .navbar-right {
        gap: 6px;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    
    .chat-app-container {
        margin-top: 60px;
        height: calc(100vh - 60px);
    }
    
    .jm_a3 {
        top: 60px;
        width: 100%;
        max-width: 320px;
    }
    
    .logo-image {
        width: 36px;
        height: 36px;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .navbar-left {
        gap: var(--space-2);
    }
    
    .btn-new-chat {
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: var(--space-1);
    }
    
    .chat-header {
        padding: var(--space-3);
        min-height: 60px;
    }
    
    .jm_a8 {
        padding: var(--space-3);
    }
    
    .chat-input-container {
        padding: var(--space-3);
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-description {
        font-size: 0.9375rem;
    }
    
    .suggested-questions {
        gap: var(--space-2);
    }
    
    .message {
        max-width: 90%;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .conversation-icon {
        width: 32px;
        height: 32px;
    }
    
    .message-content {
        padding: var(--space-3) var(--space-4);
        font-size: 0.875rem;
    }
    
    .input-wrapper {
        padding: var(--space-3);
    }
    
    .btn-send {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 360px) {
    .jm_a1 {
        padding: 0 var(--space-2);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .welcome-title {
        font-size: 1.375rem;
    }
    
    .jm_a8,
    .chat-input-container {
        padding: var(--space-2);
    }
    
    .jm_a3 {
        width: 100%;
    }
}


@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .jm_a1,
    .jm_a3,
    .chat-input-container {
        backdrop-filter: blur(8px);
    }
    
    .message {
        animation: none;
    }
    
    .spinner {
        animation: spin 2s linear infinite;
    }
}


.jm_a8::-webkit-scrollbar,
.jm_a6::-webkit-scrollbar {
    width: 8px;
}

.jm_a8::-webkit-scrollbar-track,
.jm_a6::-webkit-scrollbar-track {
    background: transparent;
}

.jm_a8::-webkit-scrollbar-thumb,
.jm_a6::-webkit-scrollbar-thumb {
    background: rgba(255, 114, 0, 0.4);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

.jm_a8::-webkit-scrollbar-thumb:hover,
.jm_a6::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 114, 0, 0.6);
}




[data-theme="light"] {
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-tertiary: #6B7280;
    --text-light: #111827;
}


[data-theme="light"] html {
    background: #FFFFFF;
}

html[data-theme="light"] body,
[data-theme="light"] body,
body.light-theme {
    background: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 114, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 144, 255, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #F8FAFC 50%, #FFFFFF 100%),
        #FFFFFF !important;
    background-attachment: fixed !important;
    background-color: #FFFFFF !important;
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 114, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(30, 144, 255, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #F8FAFC 50%, #FFFFFF 100%),
        #FFFFFF !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .jm_a1 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 114, 0, 0.2);
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.02) inset, 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .jm_a1.jm_a2 {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.02) inset, 0 8px 32px rgba(0, 0, 0, 0.08);
    border-bottom-color: rgba(255, 114, 0, 0.25);
}

[data-theme="light"] .logo-text {
    color: var(--text-primary);
}

[data-theme="light"] .jm_a3 {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid rgba(255, 114, 0, 0.15);
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .jm_a4 {
    background: rgba(255, 114, 0, 0.05);
    border-bottom: 1px solid rgba(255, 114, 0, 0.15);
}

[data-theme="light"] .jm_a5 {
    color: var(--text-primary);
}

[data-theme="light"] .conversation-item {
    color: var(--text-primary);
}

[data-theme="light"] .conversation-item:hover {
    background: rgba(255, 114, 0, 0.08);
    border-color: rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .conversation-item.active {
    background: rgba(255, 114, 0, 0.12);
    border-color: rgba(255, 114, 0, 0.3);
}

[data-theme="light"] .conversation-title {
    color: var(--text-primary);
}

[data-theme="light"] .conversation-preview {
    color: var(--text-secondary);
}

[data-theme="light"] .user-info {
    background: rgba(255, 114, 0, 0.05);
    border: 1px solid rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .user-name {
    color: var(--text-primary);
}

[data-theme="light"] .user-status {
    color: var(--text-secondary);
}

[data-theme="light"] .chat-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 114, 0, 0.15);
}

[data-theme="light"] .message-ai .message-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 114, 0, 0.2);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02) inset;
}

[data-theme="light"] .message-user .message-content {
    background: var(--gradient-primary);
    color: white;
}

[data-theme="light"] .message-ai .message-avatar {
    background: rgba(255, 114, 0, 0.05);
    border: 1px solid rgba(255, 114, 0, 0.25);
}

[data-theme="light"] .conversation-icon {
    background: rgba(255, 114, 0, 0.05);
    border: 1px solid rgba(255, 114, 0, 0.25);
}

[data-theme="light"] .conversation-logo,
[data-theme="light"] .avatar-logo {
    filter: drop-shadow(0 1px 4px rgba(255, 114, 0, 0.2));
}

[data-theme="light"] .message-ai .message-sender {
    color: var(--primary-purple);
}

[data-theme="light"] .message-time {
    color: var(--text-secondary);
}

[data-theme="light"] .chat-input-container {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 114, 0, 0.15);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .input-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .input-wrapper:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 16px rgba(255, 114, 0, 0.15), 0 0 0 1px rgba(255, 114, 0, 0.2) inset, 0 0 24px rgba(255, 114, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .chat-input {
    background: transparent;
    color: var(--text-primary);
}

[data-theme="light"] .chat-input::placeholder {
    color: var(--text-secondary);
}

[data-theme="light"] .file-upload-bar {
    background: transparent;
}

[data-theme="light"] .btn-upload-inline {
    background: rgba(255, 114, 0, 0.08);
    border: 1px solid rgba(255, 114, 0, 0.25);
    color: var(--text-primary);
}

[data-theme="light"] .btn-upload-inline:hover {
    background: rgba(255, 114, 0, 0.15);
    border-color: var(--accent-purple);
    color: var(--primary-purple);
}


[data-theme="light"] .file-preview-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 114, 0, 0.25);
}

[data-theme="light"] .file-preview-item {
    background: rgba(255, 114, 0, 0.1);
    border: 1px solid rgba(255, 114, 0, 0.3);
}

[data-theme="light"] .file-preview-item:hover::before {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(255, 114, 0, 0.3);
}

[data-theme="light"] .welcome-badge {
    background: rgba(255, 114, 0, 0.1);
    border: 1px solid rgba(255, 114, 0, 0.3);
}

[data-theme="light"] .welcome-badge-text {
    color: var(--primary-purple);
}

[data-theme="light"] .welcome-title {
    color: var(--text-primary);
}

[data-theme="light"] .welcome-description {
    color: var(--text-secondary);
}

[data-theme="light"] .jm_c7 {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(255, 114, 0, 0.25);
    color: var(--text-primary);
}

[data-theme="light"] .jm_c7:hover {
    background: rgba(255, 114, 0, 0.1);
    border-color: var(--accent-purple);
    color: var(--primary-purple);
}

[data-theme="light"] .thinking-text {
    color: var(--text-primary);
}

[data-theme="light"] .char-count {
    color: var(--text-secondary);
}

[data-theme="light"] .brand-caption {
    color: var(--text-secondary);
}

[data-theme="light"] .btn-action {
    background: rgba(255, 114, 0, 0.08);
    border: 1px solid rgba(255, 114, 0, 0.2);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-action:hover {
    background: rgba(255, 114, 0, 0.15);
    color: var(--primary-purple);
    border-color: var(--accent-purple);
}

[data-theme="light"] .nav-links {
    background: rgba(255, 114, 0, 0.08);
    border: 1px solid rgba(255, 114, 0, 0.25);
}

[data-theme="light"] .nav-link-item {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-link-item:hover {
    color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .nav-link-item.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-purple);
}


[data-theme="light"] .jm_d2 {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 114, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02) inset;
}

[data-theme="light"] .version-option {
    color: var(--text-primary);
}

[data-theme="light"] .jm_c8-item:hover {
    background: rgba(255, 114, 0, 0.08);
}

[data-theme="light"] .jm_c9 {
    color: var(--text-secondary);
}

[data-theme="light"] .jm_c9:hover {
    background: rgba(255, 114, 0, 0.1);
    color: var(--primary-purple);
}

[data-theme="light"] .jm_c8.open .jm_c9 {
    background: rgba(255, 114, 0, 0.1);
    color: var(--primary-purple);
}

[data-theme="light"] .jm_d3-header,
[data-theme="light"] .jm_d3-footer {
    border-color: rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .jm_d3-footer {
    background: rgba(255, 114, 0, 0.06);
}

[data-theme="light"] .jm-col-label {
    color: rgba(31, 41, 55, 0.5);
}

[data-theme="light"] .jm_d4 {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 114, 0, 0.25);
    color: var(--text-primary);
}

[data-theme="light"] .jm_d4:hover {
    background: rgba(255, 114, 0, 0.08);
    border-color: rgba(255, 114, 0, 0.4);
}

[data-theme="light"] .jm_d4.is-active {
    background: rgba(255, 114, 0, 0.12);
    border-color: rgba(255, 114, 0, 0.55);
}

[data-theme="light"] .jm-model-desc {
    color: rgba(31, 41, 55, 0.65);
}

[data-theme="light"] .jm-model-hint {
    color: rgba(31, 41, 55, 0.55);
}

[data-theme="light"] .jm-picker-subtitle {
    color: rgba(31, 41, 55, 0.55);
}

[data-theme="light"] .jm-picker-heading {
    color: var(--text-primary);
}

[data-theme="light"] .jm-model-category {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .jm-category-heading {
    color: rgba(31, 41, 55, 0.55);
}

[data-theme="light"] .jm_d5-wrap {
    background: rgba(255, 114, 0, 0.06);
    border-top-color: rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .jm_d5 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 165, 0, 0.14));
    border-color: rgba(255, 165, 0, 0.5);
}

[data-theme="light"] .jm_d5-sub {
    color: rgba(31, 41, 55, 0.65);
}


@media (max-width: 768px) {
    .jm_d2 {
        position: fixed;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 200px;
        max-width: 90vw;
    }
    
    .jm_c8.open .jm_d2 {
        transform: translateX(-50%) translateY(0);
    }

    .jm_d2.jm_d3 {
        min-width: min(94vw, 520px);
        max-height: min(78vh, 560px);
    }
}

@media (max-width: 480px) {
    .jm-category-columns {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }

    .jm_d3-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .jm-inline-upgrade {
        width: 100%;
    }
}

[data-theme="light"] #mobileMenu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .mobile-nav-link {
    color: var(--text-primary);
}

[data-theme="light"] .mobile-nav-link:hover {
    background: rgba(255, 114, 0, 0.1);
    color: var(--primary-purple);
}

[data-theme="light"] .jm_a8::-webkit-scrollbar-thumb,
[data-theme="light"] .jm_a6::-webkit-scrollbar-thumb {
    background: rgba(255, 114, 0, 0.2);
}

[data-theme="light"] .jm_a8::-webkit-scrollbar-thumb:hover,
[data-theme="light"] .jm_a6::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 114, 0, 0.4);
}


.register-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.register-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}


.register-modal.jm-pro-modal {
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 215, 0, 0.1) inset;
}

.jm-pro-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    margin-bottom: var(--space-2);
}

.jm-pro-modal-icon .register-modal-logo {
    display: none;
}

.jm-pro-modal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #111;
    box-shadow: 0 8px 28px rgba(255, 215, 0, 0.35);
}

.jm-pro-modal .register-modal-title {
    background: linear-gradient(90deg, #fde047, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.jm-pro-subscribe-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #111 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4) !important;
}

.jm-pro-subscribe-btn:hover {
    box-shadow: 0 6px 28px rgba(255, 215, 0, 0.5) !important;
}

.register-modal {
    position: relative;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 114, 0, 0.25);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.register-modal-overlay.show .register-modal {
    transform: scale(1);
}

.register-modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 114, 0, 0.2);
    color: var(--text-light);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.register-modal-close:hover {
    background: rgba(255, 114, 0, 0.15);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.register-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-5);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 114, 0, 0.12);
    border: 2px solid rgba(255, 114, 0, 0.25);
    border-radius: var(--radius-xl);
}

.register-modal-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.register-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.register-modal-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-5);
    line-height: 1.5;
}

.register-modal-features {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
}

.register-modal-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.5;
}

.register-modal-features li:last-child {
    border-bottom: none;
}

.register-feature-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 114, 0, 0.12);
    border: 1px solid rgba(255, 114, 0, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent-purple);
}

.register-modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.btn-register-primary {
    display: block;
    text-align: center;
    padding: var(--space-4) var(--space-6);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 12px rgba(255, 114, 0, 0.3);
}

.btn-register-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 114, 0, 0.4);
}

.btn-register-secondary {
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-register-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 114, 0, 0.3);
    color: var(--text-light);
}

.btn-register-login {
    text-align: center;
    text-decoration: none;
    color: var(--accent-purple);
    border: none;
    background: transparent;
}

.btn-register-login:hover {
    background: rgba(255, 114, 0, 0.1);
    color: var(--primary-teal-light);
}

[data-theme="light"] .register-modal {
    background: #FFFFFF;
    border: 1px solid rgba(255, 114, 0, 0.3);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .register-modal-title {
    color: var(--text-primary);
}

[data-theme="light"] .register-modal-text {
    color: var(--text-secondary);
}

[data-theme="light"] .register-modal-features li {
    color: var(--text-primary);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .register-modal-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 114, 0, 0.2);
    color: var(--text-primary);
}

[data-theme="light"] .register-modal-close:hover {
    background: rgba(255, 114, 0, 0.1);
    color: var(--primary-purple);
}