/* =========================================
   CodeDile Design System Variables
   ========================================= */
   :root {
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    /* CodeDile Dark Theme (Matches image_81eaa4.jpg) */
    --bg-main: #0a1110;        /* Deep teal-black background */
    --bg-sidebar: #0f1715;     /* Slightly lighter panel bg */
    --bg-card: #131c1a;        /* Card background */
    --bg-hover: #1a2623;
    --bg-topbar: rgba(10, 17, 16, 0.86);
    
    --border-color: #1f2d29;
    --border-light: rgba(255, 255, 255, 0.05);
    
    --accent: #86efac;         /* CodeDile Mint Green */
    --accent-hover: #4ade80;
    --accent-glow: rgba(134, 239, 172, 0.15);
    --search-surface: #0c1715;
    --search-border: rgba(134, 239, 172, 0.28);
    
    --text-main: #f8fafc;
    --text-muted: #8ea09b;
    --text-on-accent: #022c22; /* Dark text for mint buttons */

    /* Chat specifics */
    --bg-bubble-user: #172a23; 
    --bg-bubble-bot: #131c1a;
    --chat-wallpaper: #0b1512;
    --chat-header: #15241f;
    --chat-pattern: rgba(134, 239, 172, 0.07);
    
    /* Code editor */
    --code-bg: #090e0d;
    --code-header: #0f1715;
}

[data-theme="light"] {
    /* CodeDile Light Theme (Matches image_81ee86.jpg) */
    --bg-main: #f4f7f6;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #e8f3ed;
    --bg-topbar: rgba(248, 252, 250, 0.9);
    
    --border-color: #d3e3da;
    --border-light: rgba(19, 75, 54, 0.12);
    
    --accent: #059669;         /* Deeper Green for light mode contrast */
    --accent-hover: #047857;
    --accent-glow: rgba(5, 150, 105, 0.15);
    --search-surface: #f7fcf9;
    --search-border: rgba(5, 150, 105, 0.3);
    
    --text-main: #12352a;
    --text-muted: #527066;
    --text-on-accent: #ffffff;

    --bg-bubble-user: #dcefe5;
    --bg-bubble-bot: #ffffff;
    --chat-wallpaper: #edf5f0;
    --chat-header: #f9fcfa;
    --chat-pattern: rgba(5, 150, 105, 0.09);
    
    --code-bg: #f8faf9;
    --code-header: #f1f5f4;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: var(--font-family); }

body { background: var(--bg-main); color: var(--text-main); height: 100vh; overflow: hidden; transition: background 0.4s ease, color 0.4s ease; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.app-container { display: flex; height: 100vh; }

/* =========================================
   Sidebar Styling
   ========================================= */
.sidebar { 
    width: 340px; 
    background: var(--bg-sidebar); 
    border-right: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: column; 
    z-index: 10; 
    transition: background 0.4s ease; 
}

.sidebar-header { 
    padding: 20px 22px 12px; 
}

.logo-container { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

.brand-logo { 
    display: block; 
    width: 90%; 
    max-width: 270px; 
    height: auto; 
    object-fit: contain; 
    
    /* Blends the black background seamlessly into the dark sidebar */
    mix-blend-mode: screen; 
    filter: drop-shadow(0 4px 15px rgba(134, 239, 172, 0.15)); 
}

/* Light mode fallback */
[data-theme="light"] .brand-logo { 
    mix-blend-mode: normal; 
    opacity: 1; 
    filter: contrast(1.16) saturate(1.18) drop-shadow(0 5px 14px rgba(5, 150, 105, 0.18)); 
}

/* CodeDile database search */
.search-container { padding: 0 25px 17px; border-bottom: 1px solid var(--border-color); }
.search-wrapper { position: relative; display: flex; align-items: center; min-height: 52px; overflow: hidden; border: 1px solid var(--search-border); border-radius: 16px; background: var(--search-surface); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 20px rgba(0, 0, 0, 0.12); transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease; }
.search-wrapper::before { content: ''; position: absolute; left: 12px; width: 27px; height: 27px; border-radius: 9px; background: var(--accent-glow); box-shadow: 0 0 16px var(--accent-glow); }
.search-icon { position: absolute; left: 18px; z-index: 1; width: 16px; color: var(--accent); }
#search-input { width: 100%; height: 52px; background: transparent; border: 0; color: var(--text-main); padding: 12px 44px 12px 51px; border-radius: 16px; font-size: 0.88rem; font-weight: 600; outline: none; transition: all 0.3s ease; }
#search-input::placeholder { color: var(--text-muted); font-weight: 400; }
#search-input:focus { box-shadow: none; }
.search-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), 0 10px 24px rgba(0, 0, 0, 0.16); transform: translateY(-1px); }
.clear-search { position: absolute; right: 10px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: var(--bg-hover); color: var(--text-muted); cursor: pointer; font-size: 0; line-height: 1; transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease; }
.clear-search::before, .clear-search::after { content: ''; position: absolute; top: 13px; left: 8px; width: 12px; height: 2px; border-radius: 2px; background: currentColor; }
.clear-search::before { transform: rotate(45deg); }
.clear-search::after { transform: rotate(-45deg); }
.clear-search:hover { color: var(--text-main); background: var(--border-color); transform: scale(1.06); }

/* Navigation Links */
.nav-links { overflow-y: auto; flex: 1; padding: 20px 15px; }
.level-group { margin-bottom: 25px; }
.level-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); font-weight: 800; padding: 0 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; opacity: 0.8; }
.level-title::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }

.nav-btn { width: 100%; text-align: left; background: transparent; border: none; padding: 12px 18px; border-radius: 12px; color: var(--text-muted); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin-bottom: 4px; border: 1px solid transparent; }
.nav-btn:hover { color: var(--text-main); background: var(--bg-hover); }

/* The "Week 1 se start karo" Mint Button Style */
.nav-btn.active { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); box-shadow: 0 4px 15px var(--accent-glow); font-weight: 700; transform: scale(1.02); }

/* =========================================
   Main Content & Top Bar
   ========================================= */
.main-content { flex: 1; display: flex; flex-direction: column; position: relative; }

.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; background: var(--bg-topbar); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-color); z-index: 20; position: absolute; top: 0; left: 0; right: 0; height: 75px; }
.category-info { display: flex; align-items: center; gap: 15px; }
.badge { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted); padding: 5px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
#current-category-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; }

/* Control Buttons */
.controls { display: flex; gap: 12px; }
.toggle-btn { padding: 10px 20px; border-radius: 50px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; transition: all 0.3s ease; }
.toggle-btn:hover { color: var(--text-main); border-color: var(--text-muted); }
.toggle-btn.active { background: var(--bg-hover); color: var(--text-main); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sidebar-toggle { display: none; padding: 7px 9px; border: 1px solid var(--border-color); border-radius: 5px; background: var(--bg-card); color: var(--text-muted); cursor: pointer; font-size: 1.05rem; }

/* =========================================
   View Containers & Animations
   ========================================= */
.view-container { flex: 1; overflow-y: auto; padding: 110px 40px 60px; scroll-behavior: smooth; }
.mode-strip { max-width: 900px; margin: 0 auto 16px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border-color); border-radius: 5px; background: var(--bg-card); color: var(--text-muted); font-size: 0.78rem; }
.mode-strip button { padding: 7px 10px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--text-on-accent); cursor: pointer; font: inherit; font-size: 0.76rem; font-weight: 800; }
.mode-strip button:hover { background: var(--accent-hover); }
.view-container#chat-view { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 0; background-color: var(--chat-wallpaper); background-image: radial-gradient(var(--border-light) 0.7px, transparent 0.7px); background-size: 18px 18px; }
.view-container#chat-view::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.85; background-image: radial-gradient(circle at 12% 18%, transparent 0 13px, var(--chat-pattern) 14px 15px, transparent 16px), radial-gradient(circle at 76% 34%, transparent 0 9px, var(--chat-pattern) 10px 11px, transparent 12px), linear-gradient(135deg, transparent 46%, var(--chat-pattern) 47% 48%, transparent 49%); background-size: 210px 190px, 260px 230px, 150px 150px; background-position: 0 0, 80px 40px, 30px 90px; }
.chat-shell { position: relative; z-index: 1; width: 100%; max-width: 900px; height: 100%; min-height: 0; margin: 0 auto; display: flex; flex-direction: column; }
.hidden { display: none !important; }

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes textThanosVanish {
    0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
    45% { opacity: 0.75; transform: translate3d(-3px, -2px, 0) scale(0.995); filter: blur(0.5px); }
    100% { opacity: 0; transform: translate3d(8px, -5px, 0) scale(0.97); filter: blur(5px); }
}

@keyframes languageAssemble {
    0% { opacity: 0; transform: translate3d(-12px, 8px, 0) scale(0.985); filter: blur(4px); }
    65% { opacity: 0.9; transform: translate3d(3px, -2px, 0) scale(1.005); filter: blur(0.5px); }
    100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@keyframes dustScatter {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg); }
    18% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(var(--dust-x), var(--dust-y), 0) scale(0.05) rotate(140deg); }
}

.language-dissolve { animation: textThanosVanish 0.43s cubic-bezier(0.55, 0, 0.85, 0.35) forwards !important; }
.language-arrival { animation: languageAssemble 0.7s cubic-bezier(0.16, 1, 0.3, 1) both !important; }
.language-static { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.language-static-container { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.language-translation .chat-bubble, .language-translation .faq-card { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
.language-dust-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.language-dust { position: absolute; width: var(--dust-size); height: var(--dust-size); border-radius: 35% 65% 55% 45%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: dustScatter 0.72s cubic-bezier(0.2, 0.7, 0.3, 1) var(--dust-delay) both; }

/* =========================================
   Classic View (Accordion)
   ========================================= */
.accordion-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; transition: opacity 0.22s ease, transform 0.22s ease; }
.accordion-list.content-refresh, .chat-body.content-refresh { opacity: 0; transform: translateY(8px); }
.faq-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.faq-card:hover { border-color: var(--accent); box-shadow: 0 4px 20px var(--accent-glow); }
.faq-question { padding: 22px 25px; font-weight: 700; font-size: 1.1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--text-main); letter-spacing: -0.3px; }
.faq-question > span:first-child { flex: 1; }
.faq-question .indicator { flex: 0 0 24px; text-align: center; transition: transform 0.4s ease; color: var(--accent); }
.faq-card.open .faq-question .indicator { transform: rotate(180deg); }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); opacity: 0; line-height: 1.8; color: var(--text-muted); font-size: 0.95rem; }
.faq-card.open .faq-answer { padding: 0 25px 25px 25px; max-height: 3000px; opacity: 1; border-top: 1px solid var(--border-light); margin-top: 5px; padding-top: 25px; }

/* =========================================
   Chat View (Modern Bubbles)
   ========================================= */
.chat-profile { position: relative; z-index: 2; flex: 0 0 auto; min-height: 68px; margin: 0 0 14px; padding: 11px 15px; display: flex; align-items: center; gap: 11px; background: var(--chat-header); border: 1px solid var(--border-color); border-radius: 5px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16); }
.chat-profile:has(.profile-menu.open) { z-index: 10; }
.profile-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; background: var(--accent); color: var(--text-on-accent); border: 2px solid var(--bg-card); border-radius: 50%; font-size: 1.3rem; box-shadow: 0 0 0 2px var(--accent-glow); }
.profile-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-copy strong { color: var(--text-main); font-size: 0.94rem; line-height: 1.2; }
.profile-copy span { color: var(--text-muted); font-size: 0.74rem; }
.profile-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; color: var(--text-muted); font-size: 1.35rem; line-height: 1; }
.profile-action { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; line-height: 1; }
.profile-action:hover { color: var(--accent); }
.profile-search { display: none; flex-basis: 100%; align-items: center; gap: 8px; padding: 8px 10px; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; }
.chat-profile.search-open { flex-wrap: wrap; }
.chat-profile.search-open .profile-search { display: flex; }
.profile-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 0.82rem; }
.profile-search input::placeholder { color: var(--text-muted); }
.profile-search .clear-search { position: relative; right: auto; flex: 0 0 28px; }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 5; width: min(310px, calc(100vw - 28px)); padding: 10px; display: none; flex-direction: column; gap: 4px; background: var(--chat-header); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28); }
.profile-menu.open { display: flex; }
.menu-title { padding: 8px 9px 10px; color: var(--text-main); font-size: 0.82rem; }
.menu-action { width: 100%; min-height: 38px; padding: 8px 9px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text-muted); cursor: pointer; text-align: left; font: inherit; font-size: 0.78rem; }
.menu-action:hover { background: var(--bg-hover); color: var(--text-main); }
.menu-action-icon { width: 22px; flex: 0 0 22px; display: inline-grid; place-items: center; color: var(--accent); font-size: 1rem; font-weight: 800; }
.menu-section { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 10px 3px 3px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.72rem; }
.menu-section > span { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.search-highlight { padding: 0 3px; border-radius: 3px; background: #ffbd2e; color: #17211d; box-shadow: 0 0 0 1px rgba(255, 189, 46, 0.25); }
.chat-body { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; max-width: none; margin: 0; padding: 0 4px 60px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; transition: opacity 0.22s ease, transform 0.22s ease; }
.chat-bubble { max-width: 76%; padding: 10px 13px; border-radius: 5px; position: relative; font-size: 0.91rem; line-height: 1.58; animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; border: 1px solid var(--border-color); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); }

.msg-user { align-self: flex-end; background: var(--bg-bubble-user); color: var(--text-main); border-bottom-right-radius: 1px; font-weight: 500; border-color: rgba(134, 239, 172, 0.2); }
.msg-user::after { content: ''; position: absolute; right: -7px; bottom: -1px; border-top: 8px solid transparent; border-left: 8px solid var(--bg-bubble-user); }
.msg-bot { align-self: flex-start; background: var(--bg-bubble-bot); color: var(--text-muted); border-bottom-left-radius: 1px; }
.msg-bot::after { content: ''; position: absolute; left: -7px; bottom: -1px; border-top: 8px solid transparent; border-right: 8px solid var(--bg-bubble-bot); }

.message-label { color: var(--accent); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; line-height: 1; margin-bottom: 9px; text-transform: uppercase; }
.message-text { color: inherit; }
.bookmark-btn { flex: 0 0 38px; width: 38px; height: 38px; margin-left: 0; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.bookmark-btn:hover, .bookmark-btn.saved { color: var(--accent); }
.faq-question .bookmark-btn:hover { background: var(--bg-hover); }
.bookmark-pulse { animation: bookmarkPulse 0.32s ease-out; }
.msg-bot > .bookmark-btn { display: block; margin: 9px 0 0 auto; }

@keyframes bookmarkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.45) rotate(-8deg); }
    100% { transform: scale(1); }
}

.no-results { max-width: 500px; display: flex; flex-direction: column; align-items: flex-start; gap: 11px; padding: 16px 18px; color: var(--text-muted); }
.no-results strong { color: var(--text-main); font-size: 1.05rem; }
.no-results span { font-size: 0.88rem; line-height: 1.6; }
.no-results small { color: var(--text-muted); font-size: 0.78rem; overflow-wrap: anywhere; }
.web-search-btn { margin-top: 4px; padding: 11px 16px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: var(--text-on-accent); cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 800; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; }
.web-search-btn:hover { background: var(--accent-hover); box-shadow: 0 5px 14px var(--accent-glow); transform: translateY(-1px); }
.web-search-btn span { color: inherit; font-size: 1rem; line-height: 0.8; }
.no-results-bubble { max-width: 540px; }
.no-bookmarks-bubble { max-width: 390px; padding: 0; overflow: hidden; border-color: var(--search-border); background: linear-gradient(145deg, var(--bg-card), var(--search-surface)); }
.no-bookmarks-state { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 24px 25px; text-align: center; }
.no-bookmarks-state::before { content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 2px; background: var(--accent); box-shadow: 0 0 18px var(--accent-glow); }
.no-bookmarks-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 3px; border: 1px solid var(--search-border); border-radius: 50%; color: var(--accent); background: var(--accent-glow); font-size: 1.9rem; line-height: 1; box-shadow: 0 0 24px var(--accent-glow); }
.no-bookmarks-state strong { color: var(--text-main); font-size: 1.08rem; font-weight: 800; }
.no-bookmarks-state span { max-width: 270px; color: var(--text-muted); font-size: 0.8rem; line-height: 1.6; }

.bot-header { font-size: 0.8rem; color: var(--accent); font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 1px; }

/* =========================================
   CodeDile Terminal Style Code Block
   ========================================= */
.code-wrapper { 
    background: var(--code-bg); 
    border-radius: 12px; 
    margin: 20px 0 5px 0; 
    overflow: hidden; 
    font-family: var(--font-mono); 
    font-size: 0.85rem; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
}

.code-header { 
    background: var(--code-header); 
    padding: 12px 18px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-color); 
}

/* Authentic macOS Terminal Dots */
.mac-dots { display: flex; gap: 8px; align-items: center; }
.mac-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; } 
.mac-dot.r { background: #ff5f56; border: 1px solid #e0443e; } 
.mac-dot.y { background: #ffbd2e; border: 1px solid #dea123; } 
.mac-dot.g { background: #27c93f; border: 1px solid #1aab29; }

.code-lang { 
    color: var(--text-muted); 
    font-size: 0.7rem; 
    font-weight: 700; 
    text-transform: lowercase; 
    letter-spacing: 1px; 
    font-family: var(--font-family); 
}

.code-content { 
    padding: 20px; 
    color: var(--text-main); 
    white-space: pre-wrap; 
    overflow-x: auto; 
    line-height: 1.6; 
}

/* Minimalist Syntax Highlighting */
.syn-comment { color: #5f706a; font-style: italic; }
.syn-string { color: #a1e3b8; }
.syn-keyword { color: var(--accent); font-weight: 600; }
.syn-func { color: #f8fafc; font-weight: 600; }
.syn-type { color: #69a794; }

/* Light Mode Mac Window Tweaks */
[data-theme="light"] .syn-func { color: #0f172a; }
[data-theme="light"] .syn-string { color: #059669; }
[data-theme="light"] .code-wrapper { background: #ffffff; border: 1px solid #e2e8e5; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
[data-theme="light"] .code-header { background: #f1f5f4; border-bottom: 1px solid #e2e8e5; }
[data-theme="light"] .msg-user { border-color: rgba(5, 150, 105, 0.22); box-shadow: 0 8px 24px rgba(5, 150, 105, 0.08); }
[data-theme="light"] .msg-bot { border-color: #dbe9e1; box-shadow: 0 8px 24px rgba(31, 74, 56, 0.06); }
[data-theme="light"] .chat-profile { box-shadow: 0 5px 16px rgba(31, 74, 56, 0.08); }
[data-theme="light"] .toggle-btn.active { background: #e3f2e9; }

@media (max-width: 760px) {
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: min(86vw, 340px); transform: none; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, visibility 0.2s ease; box-shadow: 12px 0 30px rgba(0, 0, 0, 0.28); }
    body.sidebar-open .sidebar { visibility: visible; opacity: 1; pointer-events: auto; }
    body.sidebar-open::after { content: ''; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.42); }
    .sidebar-toggle { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; grid-area: menu; }
    .top-bar { display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: "menu info" "controls controls"; align-items: center; gap: 12px 11px; padding: 12px 14px 13px; height: 151px; min-height: 151px; }
    .category-info { grid-area: info; min-width: 0; gap: 9px; }
    .badge { flex: 0 0 auto; padding: 6px 9px; font-size: 0.64rem; letter-spacing: 0.7px; }
    #current-category-title { min-width: 0; overflow: hidden; font-size: 1rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
    .controls { grid-area: controls; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
    .toggle-btn { min-width: 0; justify-content: center; padding: 9px 6px; font-size: 0.7rem; white-space: nowrap; }
    .toggle-btn .icon { font-size: 0.85rem; }
    .view-container { padding: 176px 14px 35px; }
    .view-container#chat-view { padding-bottom: 0; }
    .chat-body { padding-bottom: 35px; }
    .chat-bubble { max-width: 91%; }
    .chat-profile { margin-bottom: 10px; }
    .profile-actions { gap: 12px; }
    .faq-question { gap: 18px; padding-left: 18px; padding-right: 18px; }
    .faq-question .bookmark-btn { flex-basis: 42px; width: 42px; height: 42px; font-size: 1.45rem; }
    .faq-question .indicator { flex-basis: 30px; }
    .mode-strip { align-items: flex-start; flex-direction: column; }
    .profile-menu { right: -4px; width: min(240px, calc(100vw - 44px)); }
}

/* Minimalist Syntax Highlighting */
.syn-comment { color: #5f706a; font-style: italic; }
.syn-string { color: #a1e3b8; }
.syn-keyword { color: var(--accent); font-weight: 500; }
.syn-func { color: #f8fafc; font-weight: 600; }
.syn-type { color: #69a794; }
[data-theme="light"] .syn-func { color: #0f172a; }
[data-theme="light"] .syn-string { color: #059669; }