/* ==================== VARIABLES ==================== */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --cyan: #06b6d4;
    
    --bg-0: #06060a;
    --bg-1: #0c0c14;
    --bg-2: #12121c;
    --bg-3: #1a1a28;
    --bg-4: #222234;
    --bg-hover: #1e1e2e;
    
    --text-1: #f0f0f5;
    --text-2: #a0a0b8;
    --text-3: #6b6b80;
    
    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.12);
    
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --nav-h: 64px;
    --sidebar-w: 280px;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-0);
    color: var(--text-1);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration:none; color:inherit; transition: color 0.2s var(--ease); }
button { cursor:pointer; border:none; background:none; font-family:inherit; }
button:disabled { opacity:0.4; cursor:not-allowed; pointer-events:none; }
input, textarea, select { font-family:inherit; outline:none; }
ul, ol { list-style:none; }
img { max-width:100%; height:auto; display:block; }

h1,h2,h3,h4,h5,h6 { font-weight:700; line-height:1.2; }
h1 { font-size:2.5rem; }
h2 { font-size:1.75rem; }
h3 { font-size:1.35rem; }
h4 { font-size:1.15rem; }

/* Scrollbar */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.08); border-radius:10px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.15); }
::selection { background:var(--primary); color:#fff; }

/* ==================== GLASS ==================== */
.glass {
    background: rgba(14,14,22,0.75);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border: 1px solid var(--border);
}

.glass-btn {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-strong);
    color: var(--text-1);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.25s var(--ease);
}
.glass-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.glass-container {
    background: rgba(14,14,22,0.5);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
}

/* ==================== BACKGROUND ==================== */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.bg-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(99,102,241,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(139,92,246,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236,72,153,0.04) 0%, transparent 60%);
}
.bg-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.08) 0%, transparent 100%);
    background-size: 200px 200px, 300px 300px, 250px 250px;
    animation: particlesDrift 60s linear infinite;
}
@keyframes particlesDrift {
    0% { transform: translate(0,0); }
    100% { transform: translate(-200px, -200px); }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity:0; transform:translateY(8px); }
    to { opacity:1; transform:translateY(0); }
}
@keyframes slideInLeft {
    from { opacity:0; transform:translateX(-16px); }
    to { opacity:1; transform:translateX(0); }
}
@keyframes scaleIn {
    from { opacity:0; transform:scale(0.92); }
    to { opacity:1; transform:scale(1); }
}
@keyframes pulse {
    0%,100% { transform:scale(1); opacity:1; }
    50% { transform:scale(1.05); opacity:0.8; }
}
@keyframes spin {
    from { transform:rotate(0deg); }
    to { transform:rotate(360deg); }
}
@keyframes float {
    0%,100% { transform:translateY(0); }
    50% { transform:translateY(-8px); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes gradientShift {
    0%,100% { background-position:0% 50%; }
    50% { background-position:100% 50%; }
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    background: rgba(6,6,10,0.8);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.nav-container {
    max-width: 1800px;
    margin: 0 auto;
    height: var(--nav-h);
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s var(--ease);
}
.sidebar-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    padding: 4px;
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.brand-logo img { width:100%; height:100%; object-fit:contain; }

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 30%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-ai {
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-location {
    font-size: 0.65rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    position: relative;
}
.nav-item:hover {
    color: var(--text-1);
    background: rgba(255,255,255,0.05);
}
.nav-item.active {
    color: var(--text-1);
    background: rgba(255,255,255,0.07);
}
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Unique Nav Icon Colors */
.nav-icon-chat { background: rgba(16,185,129,0.15); color: #10b981; }
.nav-icon-code { background: rgba(245,158,11,0.15); color: #f59e0b; }
.nav-icon-image { background: rgba(236,72,153,0.15); color: #ec4899; }
.nav-icon-docs { background: rgba(99,102,241,0.15); color: #6366f1; }
.nav-icon-admin { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Agent Mode Toggle */
.agent-mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.15);
    border-radius: var(--radius-sm);
    margin-left: 0.25rem;
}
.switch { position:relative; display:inline-block; width:36px; height:20px; }
.switch input { opacity:0; width:0; height:0; }
.slider {
    position:absolute; cursor:pointer; inset:0;
    background: var(--bg-4);
    border-radius:20px;
    transition:0.3s var(--ease);
}
.slider:before {
    content:"";
    position:absolute;
    width:14px; height:14px;
    left:3px; bottom:3px;
    background:#fff;
    border-radius:50%;
    transition:0.3s var(--ease);
}
input:checked + .slider {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
}
input:checked + .slider:before {
    transform:translateX(16px);
}
.agent-label {
    color: var(--text-2);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.badge-agent {
    padding: 2px 6px;
    background: var(--success);
    color: #fff;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: pulse 2s ease-in-out infinite;
}

/* User Menu */
.user-menu { position:relative; margin-left:0.25rem; }
.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem 0.4rem 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s var(--ease);
}
.user-btn:hover {
    background: rgba(255,255,255,0.07);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
}
.user-chevron { font-size:0.6rem; color:var(--text-3); transition:transform 0.2s; }
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    padding: 6px;
    display: none;
    z-index: 800;
    animation: scaleIn 0.15s var(--ease);
}
.user-dropdown.active { display:block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: var(--text-2);
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s var(--ease);
    cursor: pointer;
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-1);
}
.dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}
.dropdown-item-danger:hover { color: var(--error); }

.btn-login {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.25s var(--ease);
    box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}

/* ==================== MAIN LAYOUT ==================== */
.main-container {
    display: flex;
    margin-top: var(--nav-h);
    min-height: calc(100vh - var(--nav-h));
    position: relative;
    z-index: 1;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: rgba(10,10,16,0.85);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.35s var(--ease);
}
.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-1);
}
.btn-new-chat {
    width: 100%;
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.12));
    border: 1px solid rgba(99,102,241,0.2);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.25s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn-new-chat:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
    border-color: rgba(99,102,241,0.35);
    box-shadow: 0 0 20px rgba(99,102,241,0.15);
    transform: translateY(-1px);
}
.conversations-list {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-3);
}
.empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(139,92,246,0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.75rem;
}
.empty-state p { font-size:0.85rem; font-weight:500; color:var(--text-2); }
.empty-state span { font-size:0.75rem; color:var(--text-3); }

.conversation-item {
    padding: 0.7rem 0.85rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    margin-bottom: 0.35rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    position: relative;
    overflow: hidden;
}
.conversation-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--border);
}
.conversation-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.08));
    border-color: rgba(99,102,241,0.25);
}
.conversation-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}
.conversation-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conversation-item p {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 2px;
}

/* ==================== CONTENT ==================== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.section { display:none; flex-direction:column; flex:1; overflow:hidden; }
.section.active { display:flex; }

/* ==================== CHAT HEADER ==================== */
.chat-header {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: rgba(10,10,16,0.5);
    backdrop-filter: blur(16px);
}
.model-selector-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}
.model-info-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.12);
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    color: var(--text-2);
}

/* Custom Select */
.custom-select {
    position: relative;
    min-width: 220px;
    z-index: 50;
}
.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.selected-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.model-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
    flex-shrink: 0;
}
.selected-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
}
.select-chevron {
    font-size: 0.65rem;
    color: var(--text-3);
    transition: transform 0.2s;
}
.custom-select.open .select-chevron { transform: rotate(180deg); }

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    padding: 4px;
    display: none;
    max-height: 320px;
    overflow-y: auto;
    animation: scaleIn 0.15s var(--ease);
}
.custom-select.open .custom-select-options { display:block; }

.select-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.65rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.15s var(--ease);
}
.select-option:hover {
    background: rgba(255,255,255,0.05);
}
.select-option.active {
    background: rgba(99,102,241,0.1);
}
.option-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    flex-shrink: 0;
}
.option-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.option-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-1);
}
.option-desc {
    font-size: 0.7rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Simple select option (language, etc.) */
.custom-select-options .select-option span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-1);
}

/* Web Search Toggle */
.web-search-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.12);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease);
}
.web-search-toggle:hover {
    background: rgba(6,182,212,0.1);
    border-color: rgba(6,182,212,0.2);
}
.web-search-toggle input { display:none; }
.toggle-track {
    width: 34px;
    height: 18px;
    background: var(--bg-4);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s var(--ease);
}
.toggle-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s var(--ease);
}
.web-search-toggle input:checked ~ .toggle-track {
    background: var(--cyan);
}
.web-search-toggle input:checked ~ .toggle-track .toggle-thumb {
    transform: translateX(16px);
}
.toggle-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== CHAT CONTAINER ==================== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: transparent;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    min-height: 60vh;
    text-align: center;
    animation: fadeIn 0.6s var(--ease);
}
.icon-glow {
    position: relative;
    margin-bottom: 1.5rem;
}
.icon-glow::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}
.welcome-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(99,102,241,0.3);
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
.welcome-logo img { width:100%; height:100%; object-fit:contain; }

.gradient-text {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--accent) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    margin-bottom: 0.5rem;
}
.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 0.5rem;
    max-width: 500px;
}
.welcome-dev {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}
.feature-card {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.3s var(--ease);
    cursor: pointer;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    margin: 0 auto 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.feature-card h3 {
    font-size: 0.9rem;
    color: var(--text-1);
    margin-bottom: 0.25rem;
}
.feature-card p {
    font-size: 0.75rem;
    color: var(--text-3);
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.quick-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-2);
}
.quick-icon { font-size: 0.85rem; }

/* ==================== MESSAGES ==================== */
.message {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    animation: fadeIn 0.3s var(--ease);
    max-width: 85%;
}
.message.user { margin-left:auto; flex-direction:row-reverse; }
.message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.message.user .message-avatar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.message.assistant .message-avatar {
    background: var(--bg-3);
    border: 1.5px solid rgba(99,102,241,0.3);
    font-size: 0.85rem;
}
.message-content {
    flex: 1;
    background: var(--bg-2);
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.message.user .message-content {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.1));
    border-color: rgba(99,102,241,0.25);
}
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}
.message-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary-light);
}
.message.user .message-name { color: var(--accent); }
.message-time {
    color: var(--text-3);
    font-size: 0.7rem;
}
.message-text {
    color: var(--text-1);
    font-size: 0.9rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.message-text a { color:var(--cyan); text-decoration:underline; }
.message-text pre {
    background: var(--bg-0);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0.75rem 0;
    border: 1px solid var(--border);
}
.message-text code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85em;
    background: var(--bg-3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}
.message-text pre code { background:none; padding:0; }

.search-results {
    margin-top: 0.75rem;
    padding: 0.85rem;
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.12);
    border-radius: var(--radius-sm);
}
.search-results h4 {
    font-size: 0.8rem;
    color: var(--cyan);
    margin-bottom: 0.5rem;
}
.search-results ul li {
    margin-bottom: 0.4rem;
}
.search-results ul li a {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
}
.search-results ul li p {
    font-size: 0.72rem;
    color: var(--text-3);
}

/* ==================== INPUT CONTAINER ==================== */
.input-container {
    padding: 0.85rem 1.5rem 1rem;
    border-top: 1px solid var(--border);
    background: rgba(10,10,16,0.6);
    backdrop-filter: blur(16px);
}
.usage-bar { margin-bottom:0.75rem; }
.usage-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-3);
    font-size: 0.75rem;
}
.usage-progress {
    height: 3px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.35rem;
}
.usage-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.5s var(--ease);
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: var(--bg-2);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: all 0.25s var(--ease);
}
.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: var(--bg-3);
}
.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-1);
    resize: none;
    max-height: 150px;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.35rem 0;
}
.input-wrapper textarea::placeholder { color: var(--text-3); }
.input-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    padding-bottom: 2px;
}

/* File Upload Plus Button */
.btn-file-upload {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16,185,129,0.1);
    border: 1.5px solid rgba(16,185,129,0.2);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.25s var(--ease);
}
.btn-file-upload:hover {
    background: rgba(16,185,129,0.18);
    border-color: rgba(16,185,129,0.35);
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(16,185,129,0.2);
}

.btn-send {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-send:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.uploaded-files-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.file-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem 0.3rem 0.5rem;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    color: var(--text-2);
    animation: scaleIn 0.2s var(--ease);
}
.file-chip i { color: var(--primary); font-size:0.7rem; }
.file-chip .file-remove {
    color: var(--text-3);
    cursor: pointer;
    margin-left: 0.2rem;
    padding: 2px;
    border-radius: 4px;
    transition: all 0.15s;
}
.file-chip .file-remove:hover { color:var(--error); background:rgba(239,68,68,0.1); }

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-3);
}
.input-hint kbd {
    padding: 1px 5px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}

/* ==================== CODE FIX SECTION ==================== */
.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.section-title-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    flex-shrink: 0;
}
.section-title-area h2 {
    font-size: 1.35rem;
    color: var(--text-1);
}
.section-title-area p {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 2px;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0;
}
.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s var(--ease);
}
.tab-btn:hover {
    background: var(--bg-3);
    border-color: var(--border-strong);
    color: var(--text-1);
}
.tab-btn.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
    border-color: rgba(99,102,241,0.3);
    color: var(--primary-light);
}

.tab-content { display:none; padding:1.5rem; }
.tab-content.active { display:block; animation: fadeIn 0.3s var(--ease); }

.upload-area {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-2);
    transition: all 0.3s var(--ease);
    cursor: pointer;
}
.upload-area:hover,
.upload-area.dragover {
    border-color: var(--warning);
    background: rgba(245,158,11,0.03);
}
.upload-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 16px rgba(245,158,11,0.25);
    animation: float 3s ease-in-out infinite;
}
.upload-area h3 { color:var(--text-1); margin-bottom:0.35rem; font-size:1.1rem; }
.upload-area p { color:var(--text-3); font-size:0.8rem; }

.code-editor { margin-top:0; }
.editor-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.editor-header label {
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.85rem;
}
.editor-header .custom-select { min-width:160px; }
.editor-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}
.btn-analyze {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s var(--ease);
}
.btn-analyze:hover {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.35);
}
.btn-fix-code {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s var(--ease);
    box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.btn-fix-code:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

#codeInput {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    background: var(--bg-2);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-1);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.7;
    resize: vertical;
    transition: all 0.2s var(--ease);
}
#codeInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
#codeInput::placeholder { color: var(--text-3); }

.result-container {
    margin-top: 1.5rem;
    animation: fadeIn 0.3s var(--ease);
}
.result-container h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-1);
    margin-bottom: 1rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
}
.stat-card h4 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card p { font-size:0.7rem; color:var(--text-3); margin-top:2px; }
.file-list h4 { font-size:0.9rem; color:var(--text-2); margin-bottom:0.5rem; }
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-2);
    border-radius: var(--radius-xs);
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-2);
}
.file-item i { color: var(--warning); margin-right:0.4rem; }
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-success { background:rgba(16,185,129,0.12); color:var(--success); }
.badge-info { background:rgba(99,102,241,0.12); color:var(--primary-light); }

.code-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}
.code-panel h4 { font-size:0.85rem; color:var(--text-2); margin-bottom:0.5rem; }
.code-panel pre {
    background: var(--bg-0);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow: auto;
    max-height: 400px;
    border: 1px solid var(--border);
}
.code-panel pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-1);
    line-height: 1.6;
}

/* ==================== IMAGE GEN SECTION ==================== */
.image-gen-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}
.prompt-area { display:flex; flex-direction:column; gap:1rem; }
.prompt-area > label {
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.9rem;
}
#imagePrompt {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-2);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-1);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s var(--ease);
}
#imagePrompt:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(236,72,153,0.1);
}
#imagePrompt::placeholder { color: var(--text-3); }

.image-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.option-group label {
    color: var(--text-3);
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.option-group .custom-select { min-width:auto; }

.btn-generate {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--accent), #f43f5e);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s var(--ease);
    box-shadow: 0 2px 12px rgba(236,72,153,0.25);
}
.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(236,72,153,0.35);
}

.image-result {
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-placeholder {
    text-align: center;
    color: var(--text-3);
}
.placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    margin: 0 auto 1rem;
    opacity: 0.6;
}
.image-placeholder p { font-size:0.85rem; }
.generated-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.image-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.image-actions a,
.image-actions button {
    flex: 1;
    padding: 0.55rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s var(--ease);
}
.image-actions a {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    text-decoration: none;
}
.image-actions button {
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-2);
}
.image-info { font-size:0.7rem; color:var(--text-3); margin-top:0.5rem; }

.usage-info-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-3);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s var(--ease);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
}
.modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s var(--ease);
}
.modal-close:hover {
    background: rgba(239,68,68,0.12);
    color: var(--error);
}
.modal-body { padding: 1.5rem; }

.api-description {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
    background: rgba(99,102,241,0.05);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
}
.api-desc-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.api-description p { font-size:0.8rem; color:var(--text-2); line-height:1.5; }

.btn-generate-key {
    width: 100%;
    padding: 0.65rem;
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.25s var(--ease);
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(245,158,11,0.25);
}
.btn-generate-key:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}

.api-docs-link a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
}
.api-docs-link a:hover { color:var(--primary); }

.api-key-box {
    margin-bottom: 0.85rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
}
.api-key-box label { font-size:0.75rem; color:var(--text-3); font-weight:600; margin-bottom:0.35rem; display:block; }
.key-display {
    display: flex;
    gap: 0.5rem;
}
.key-display input {
    flex: 1;
    padding: 0.5rem 0.65rem;
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--primary-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}
.btn-copy-key {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.15);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s var(--ease);
}
.btn-copy-key:hover { background:rgba(99,102,241,0.2); }

.api-actions { display:flex; gap:0.5rem; margin-top:1rem; }
.btn-view-docs {
    flex: 1;
    padding: 0.55rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s var(--ease);
}
.btn-view-docs:hover { border-color:var(--primary); color:var(--text-1); }
.btn-revoke {
    flex: 1;
    padding: 0.55rem;
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.15);
    border-radius: var(--radius-sm);
    color: var(--error);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s var(--ease);
}
.btn-revoke:hover { background:rgba(239,68,68,0.15); }

/* Alert */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.alert-warning {
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.15);
    color: var(--warning);
}
.alert i { margin-top:2px; flex-shrink:0; }

/* About Modal */
.about-content { text-align:center; }
.about-logo {
    margin-bottom: 1.5rem;
}
.about-logo img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #fff;
    padding: 6px;
    margin: 0 auto 0.5rem;
    box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}
.about-logo h3 {
    font-size: 1.1rem;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.about-section {
    text-align: left;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-3);
    border-radius: var(--radius-sm);
}
.about-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-1);
    margin-bottom: 0.5rem;
}
.about-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.about-section p { font-size:0.8rem; color:var(--text-2); margin-bottom:0.25rem; }
.about-location { font-size:0.75rem !important; color:var(--text-3) !important; }
.social-link.instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    background: linear-gradient(135deg, #833AB4, #FD1D1D, #F77737);
    color: #fff;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: all 0.2s var(--ease);
}
.social-link.instagram:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(131,58,180,0.3); }
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    transition: all 0.2s var(--ease);
}
.whatsapp-btn:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(37,211,102,0.3); }
.bot-powered { font-size:0.7rem; color:var(--text-3); margin-top:0.35rem; }
.bot-powered strong { color:var(--success); }
.powered-badges { display:flex; flex-wrap:wrap; gap:0.35rem; margin-top:0.35rem; }
.badge-tech {
    padding: 3px 8px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.12);
    border-radius: 4px;
    color: var(--primary-light);
    font-size: 0.7rem;
    font-weight: 600;
}
.about-links li { margin-bottom:0.4rem; }
.about-links a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-2);
    transition: all 0.2s var(--ease);
}
.about-links a:hover { color:var(--text-1); transform:translateX(4px); }
.about-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.about-footer p { font-size:0.7rem; color:var(--text-3); margin-bottom:0.15rem; }

/* ==================== FOOTER ==================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem 1.25rem;
    margin-top: auto;
    position: relative;
    z-index: 1;
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.footer-section h4 {
    color: var(--text-1);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}
.footer-logo img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #fff;
    padding: 4px;
}
.footer-logo h3 {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.footer-tagline { color:var(--text-2); font-size:0.8rem; margin-bottom:0.25rem; }
.footer-powered { color:var(--text-3); font-size:0.75rem; }
.footer-powered strong { color:var(--primary); }
.footer-location { color:var(--text-3); font-size:0.75rem; display:flex; align-items:center; gap:4px; margin-top:0.25rem; }
.social-links { margin-top:0.75rem; }

.footer-links li { margin-bottom:0.4rem; }
.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-2);
    font-size: 0.8rem;
    transition: all 0.2s var(--ease);
}
.footer-links a:hover { color:var(--text-1); transform:translateX(4px); }

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.footer-copyright p { font-size:0.7rem; color:var(--text-3); margin-bottom:0.1rem; }
.footer-badges { display:flex; gap:0.35rem; flex-wrap:wrap; }

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6,6,10,0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease);
}
.loading-overlay.active { opacity:1; visibility:visible; }
.loading-spinner { text-align:center; }
.spinner-ring {
    width: 44px;
    height: 44px;
    border: 3px solid var(--bg-3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.85rem;
}
.loading-spinner p { color:var(--text-2); font-size:0.85rem; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-item span { display:none; }
    .agent-label span { display:none; }
    .image-gen-container { grid-template-columns:1fr; }
}

@media (max-width: 768px) {
    .nav-container { padding:0 0.75rem; }
    .brand-info { display:none; }
    .nav-links { gap:0.15rem; }
    .sidebar { position:fixed; top:var(--nav-h); left:0; bottom:0; z-index:900; width:var(--sidebar-w); min-width:var(--sidebar-w); transform:translateX(-100%); }
    .sidebar.open { transform:translateX(0); }
    .chat-container { padding:1rem; }
    .input-container { padding:0.75rem; }
    .input-hint { display:none; }
    .features-grid { grid-template-columns:1fr 1fr; gap:0.65rem; }
    .feature-card { padding:1rem 0.75rem; }
    .gradient-text { font-size:1.75rem; }
    .welcome-subtitle { font-size:0.9rem; }
    .image-options { grid-template-columns:1fr; }
    .code-comparison { grid-template-columns:1fr; }
    .chat-header { padding:0.65rem 1rem; }
    .custom-select { min-width:180px; }
    .footer-content { grid-template-columns:1fr; gap:1.5rem; }
    .footer-bottom { flex-direction:column; text-align:center; }
    .footer-badges { justify-content:center; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns:1fr; }
    .quick-actions { flex-direction:column; width:100%; }
    .quick-btn { justify-content:center; }
    .agent-mode-toggle .agent-label { display:none; }
}