/* =====================================================================
   کۆرسی فێربوونی C# — سیستەمی دیزاین
   Palette: #0d1117 (bg) · #161b22 (surface) · #1c2333 (surface-2)
            #512bd4 (C# purple / primary) · #9580ff (accent) · #3fb950 (success)
   Type: 'Dubai' بۆ سەردێڕ و دەق، 'JetBrains Mono / monospace' بۆ کۆد
   ===================================================================== */

@font-face {
  font-family: 'Dubai';
  src: url('../fonts/dubai.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root,
:root[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #131a23;
  --surface-2: #1b2330;
  --border: #262e3d;
  --primary: #512bd4;
  --primary-light: #7a4fe0;
  --accent: #9580ff;
  --text: #e6edf3;
  --text-soft: #d5dce5;
  --muted: #8b95a5;
  --success: #3fb950;
  --danger: #f85149;
  --code-bg: #0a0e14;
  --code-bar: #11161f;
  --shadow-strong: rgba(0,0,0,.5);
  --radius: 14px;
  --sidebar-w: 320px;
  --header-h: 64px;
  color-scheme: dark;
  font-size: 16px;
}

:root[data-theme="light"] {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --border: #dfe3ec;
  --primary: #512bd4;
  --primary-light: #6d3fe0;
  --accent: #6a3fe0;
  --text: #1c2130;
  --text-soft: #333c4d;
  --muted: #6b7385;
  --success: #1a8a3d;
  --danger: #cc352c;
  --code-bg: #1e2330;
  --code-bar: #262c3c;
  --shadow-strong: rgba(30,35,55,.14);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Dubai', 'Segoe UI', sans-serif;
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
}

html { transition: background-color .25s ease; }
body, .site-header, .sidebar, .content-card, .terminal, .modal-box, .code-editor,
.progress-card, .lesson-item, .icon-btn, .nav-btn, .playground-card {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

body { min-height: 100vh; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--primary); color: #fff; }

/* ---------- سکرۆڵبار ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- سەربەند / هێدەر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: var(--surface);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.brand-link:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 10px rgba(81,43,212,.45); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; overflow: hidden; }
.brand-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.brand-text span { font-size: 11px; color: var(--muted); letter-spacing: .5px; }

.header-nav { display: flex; align-items: center; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 8px 14px; border-radius: 10px;
}
.nav-link:hover { background: var(--surface-2); color: var(--accent); border-color: var(--border); }
.nav-link-icon { font-family: 'Fira Code', ui-monospace, monospace; font-size: 12px; direction: ltr; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; font-size: 18px;
  transition: .2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--accent); }

#install-btn {
  display: none;
  align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none; border-radius: 10px;
  padding: 0 14px; height: 40px; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 16px rgba(81,43,212,.4);
}

@media (max-width: 720px) {
  .header-nav .nav-link span:not(.nav-link-icon) { display: none; }
  #install-btn span { display: none; }
  #install-btn { padding: 0 12px; }
}
@media (max-width: 560px) {
  .header-nav { display: none; }
}

.net-badge {
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  background: rgba(63,185,80,.12); color: var(--success); border: 1px solid rgba(63,185,80,.3);
  white-space: nowrap;
}
.net-badge.offline { background: rgba(248,81,73,.12); color: #f85149; border-color: rgba(248,81,73,.35); }

/* ---------- شێوازی گشتی ---------- */
.app-shell { display: flex; align-items: flex-start; }

/* ---------- لای لیستی وانەکان ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
}

.progress-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
}
.progress-card .p-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.progress-track { height: 8px; border-radius: 20px; background: var(--bg); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s ease; width: 0%; }

.playground-sidebar-link {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(81,43,212,.14), rgba(149,128,255,.08));
  border: 1px solid rgba(81,43,212,.35); border-radius: var(--radius);
  padding: 12px; margin-bottom: 14px; cursor: pointer; text-align: right;
  font-family: inherit;
}
.playground-sidebar-link:hover { border-color: var(--primary); }
.playground-sidebar-link .pg-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Fira Code', ui-monospace, monospace; font-size: 13px; direction: ltr;
}
.playground-sidebar-link .pg-text { display: flex; flex-direction: column; }
.playground-sidebar-link .pg-text .t { font-size: 13.5px; font-weight: 700; color: var(--text); }
.playground-sidebar-link .pg-text .s { font-size: 10.5px; color: var(--muted); direction: ltr; text-align: right; }

.search-box { position: relative; margin-bottom: 14px; }
.search-box input {
  width: 100%; padding: 10px 38px 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: 13px;
}
.search-box input:focus { outline: none; border-color: var(--primary); }
.search-box .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }

.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.lesson-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
  transition: .15s;
}
.lesson-item:hover { background: var(--surface-2); }
.lesson-item.active { background: rgba(81,43,212,.16); border-color: var(--primary); }

.lesson-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); font-weight: 700;
}
.lesson-item.active .lesson-num { background: var(--primary); color: #fff; border-color: var(--primary); }
.lesson-item.done .lesson-num { background: var(--success); color: #06240c; border-color: var(--success); }

.lesson-meta { min-width: 0; flex: 1; }
.lesson-meta .t { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-meta .s { font-size: 11px; color: var(--muted); direction: ltr; text-align: right; }

.lesson-count { font-size: 10px; color: var(--muted); flex-shrink: 0; background: var(--bg); border: 1px solid var(--border); padding: 2px 6px; border-radius: 20px; }

/* ---------- ناوەڕۆکی سەرەکی ---------- */
.main {
  flex: 1;
  min-width: 0;
  padding: 28px clamp(16px, 4vw, 56px) 80px;
}

/* --- هیرۆ / پێشەکی --- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 34px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--accent); background: rgba(149,128,255,.1);
  border: 1px solid rgba(149,128,255,.3); padding: 5px 12px; border-radius: 20px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; margin: 0 0 14px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 16px; line-height: 1.9; margin: 0 0 26px; max-width: 52ch; }

.hero-stats { display: flex; gap: 22px; margin-bottom: 28px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 24px; color: var(--text); }
.hero-stats .stat span { font-size: 12px; color: var(--muted); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border: none; padding: 13px 26px; border-radius: 12px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(81,43,212,.4);
  transition: transform .15s;
}
.btn-primary:hover { transform: translateY(-2px); text-decoration: none; }

/* --- تێرمینالی کۆد (ئیمزای دیزاین) --- */
.terminal {
  background: #0a0e14;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(81,43,212,.08);
  direction: ltr;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #11161f; border-bottom: 1px solid var(--border); }
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal-bar span:nth-child(1) { background: #ff5f56; }
.terminal-bar span:nth-child(2) { background: #ffbd2e; }
.terminal-bar span:nth-child(3) { background: #27c93f; }
.terminal-bar em { font-style: normal; margin-right: auto; color: var(--muted); font-size: 11px; font-family: monospace; }
.terminal pre {
  margin: 0; padding: 20px; font-family: 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
  font-size: 13.5px; line-height: 1.8; color: #dcdcdc; min-height: 210px; white-space: pre-wrap;
}
.terminal .kw { color: #c586c0; }
.terminal .ty { color: #4ec9b0; }
.terminal .st { color: #ce9178; }
.terminal .fn { color: #dcdcaa; }
.terminal .cm { color: #6a9955; }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--accent); margin-right: 2px; animation: blink 1s step-end infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: 0; } }

/* --- ناوەڕۆکی وانە --- */
.lesson-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.lesson-header h2 { margin: 0; font-size: 24px; }
.lesson-header .en { color: var(--muted); font-size: 13px; direction: ltr; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

.page-dots { display: flex; gap: 6px; margin: 4px 0 22px; }
.page-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.page-dots span.active { background: var(--primary); border-color: var(--primary); }

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 34px);
}

#lesson-content h3 { font-size: 20px; }
#lesson-content p { line-height: 1.95; color: var(--text-soft); }
#lesson-content mark { background: rgba(149,128,255,.25); color: var(--accent); padding: 1px 5px; border-radius: 5px; }
#lesson-content pre code.hljs { direction: ltr; }
#lesson-content ol, #lesson-content ul { color: var(--text-soft); line-height: 1.9; }
#lesson-content a { word-break: break-word; }
#lesson-content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
#lesson-content th, #lesson-content td { border: 1px solid var(--border); padding: 8px 10px; font-size: 13.5px; }

.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.nav-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 10px; font-family: inherit; font-size: 13.5px; font-weight: 700;
}
.nav-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--accent); }
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }
.nav-btn.finish { background: linear-gradient(135deg, var(--success), #2ea043); border: none; color: #06240c; }

/* --- تاقیگەی کۆد --- */
.en-tag { font-size: 12px; color: var(--muted); direction: ltr; font-family: 'Fira Code', ui-monospace, monospace; margin-inline-start: 8px; }
.playground-lead { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 18px; max-width: 70ch; }
.playground-card { padding: 0; overflow: hidden; }
.playground-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.nav-btn.small { padding: 7px 14px; font-size: 12.5px; }
.pg-copied-msg { font-size: 12px; color: var(--success); opacity: 0; transition: opacity .2s; }
.pg-copied-msg.show { opacity: 1; }

.code-editor {
  position: relative;
  height: 400px;
  background: var(--code-bg);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  direction: ltr;
  overflow: hidden;
}
.code-editor-pre,
.code-editor-textarea {
  position: absolute !important;
  inset: 0 !important;
  margin: 0 !important;
  padding: 20px !important;
  border: none !important;
  outline: none !important;
  width: 100% !important;
  height: 100% !important;
  font-family: 'Fira Code', 'Cascadia Code', monospace, Courier New !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  letter-spacing: normal !important;
  tab-size: 4 !important;
  box-sizing: border-box !important;
  white-space: pre !important;
  word-wrap: normal !important;
}
.code-editor-pre {
  background: transparent !important;
  color: #dcdcdc !important;
  pointer-events: none !important;
  z-index: 1 !important;
  overflow: hidden !important;
}
.code-editor-pre code {
  background: none !important;
  padding: 0 !important;
}
.code-editor-textarea {
  background: transparent !important;
  color: transparent !important;
  caret-color: var(--accent) !important;
  z-index: 2 !important;
  overflow: auto !important;
  resize: none !important;
}
.code-editor-textarea::selection {
  background: rgba(149,128,255,.35) !important;
  color: transparent !important;
}

.loading-spinner { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; justify-content: center; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- سکرۆڵ بۆ سەرەوە (تایبەت بە my-script.js) --- */
.scrollup { position: fixed; z-index: 30; visibility: hidden; opacity: 0; cursor: pointer; border: none; }
.scrollup svg { width: 20px; height: 20px; }

/* --- شاشەی دووچوونی --- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  max-width: 640px; width: 100%; max-height: 80vh; overflow-y: auto; padding: 26px;
}
.modal-box .close-x { float: left; cursor: pointer; color: var(--muted); background: none; border: none; font-size: 20px; }

/* --- تیبانی مۆبایل --- */
.hamburger { display: none; }

footer.site-footer {
  border-top: 1px solid var(--border); padding: 26px clamp(16px,4vw,56px);
  color: var(--muted); font-size: 12.5px; display: flex; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap;
}
footer.site-footer button { background: none; border: none; color: var(--muted); font-family: inherit; cursor: pointer; font-size: 12.5px; text-decoration: underline; padding: 0; }
.footer-dev-credit { color: var(--muted); }
.footer-dev-credit a { color: var(--accent); font-weight: 700; }

/* --- تۆست (پەیامی کورت) --- */
.app-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 13px; max-width: min(90vw, 420px);
  box-shadow: 0 10px 30px var(--shadow-strong); z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; text-align: center;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .app-shell { display: flex; flex-direction: column; }
  .sidebar {
    position: fixed;
    right: -280px;
    top: 0;
    z-index: 1000;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 16px;
    box-shadow: -10px 0 30px rgba(0,0,0,.5);
    transition: right .25s ease, visibility .25s ease;
    visibility: hidden;
  }
  .sidebar.open {
    right: 0;
    visibility: visible;
  }
  .main {
    width: 100%;
    padding: 28px 16px 80px;
  }
  .hamburger { display: flex; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
  .sidebar-overlay.open { display: block; }
  #lesson-content table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Enhanced Sidebar Design */
.lesson-item {
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.lesson-item:hover {
    background: var(--surface-2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.lesson-item.active {
    background: linear-gradient(135deg, rgba(81,43,212,0.12), rgba(81,43,212,0.2));
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(81,43,212,0.1);
}
.lesson-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.lesson-item.active .lesson-num {
    background: linear-gradient(135deg, var(--primary), #7544ff);
    box-shadow: 0 4px 10px rgba(81,43,212,0.3);
}
.lesson-item.done .lesson-num {
    background: linear-gradient(135deg, var(--success), #2ea043);
    color: #fff;
    box-shadow: 0 4px 10px rgba(63,185,80,0.3);
}
.lesson-meta .t {
    font-size: 14.5px;
    color: var(--text);
}
.lesson-meta .s {
    font-size: 11.5px;
    opacity: 0.8;
}
.lesson-count {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--surface-2);
}

/* Fixes for Mobile & Desktop */
img, video { max-width: 100%; height: auto; }
.terminal {
    max-width: 100%;
    overflow-x: auto;
}
.terminal pre {
    white-space: pre-wrap;
    word-break: break-word;
}
.hero {
    overflow-x: hidden;
}

/* ==========================================
   بەشی یارمەتیدەری زیرەک (AI Assistant Chat Design)
   ========================================== */
.chat-card {
  display: flex;
  flex-direction: column;
  height: 65vh;
  min-height: 480px;
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  direction: rtl;
  background: var(--surface);
}

.chat-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 16px;
  line-height: 1.8;
  font-size: 15px;
  font-weight: 400;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.chat-bubble.ai {
  background: var(--surface-2);
  color: var(--text);
  align-self: flex-start; /* Right side in RTL */
  border-bottom-right-radius: 4px;
  border: 1px solid var(--border);
}

.chat-bubble.user {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  align-self: flex-end; /* Left side in RTL */
  border-bottom-left-radius: 4px;
  border: none;
  box-shadow: 0 4px 12px rgba(81, 43, 212, 0.15);
}

.chat-bubble.typing {
  background: transparent;
  color: var(--muted);
  align-self: flex-start;
  font-style: italic;
  border: none;
  box-shadow: none;
  padding: 8px 16px;
}

.chat-bubble pre {
  background: var(--code-bg);
  color: #dcdcdc;
  padding: 14px;
  border-radius: 10px;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  margin: 10px 0;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13.5px;
  border: 1px solid var(--border);
}

.chat-bubble code {
  background: var(--code-bg);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 6px;
  direction: ltr;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  font-size: 13px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  background: var(--surface-2);
  align-items: center;
}

.chat-text-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(81, 43, 212, 0.15);
}

.chat-send-btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 12px rgba(81, 43, 212, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(81, 43, 212, 0.4);
}

.chat-send-btn:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .chat-input-area {
    padding: 10px 12px;
    gap: 8px;
  }
  .chat-text-input {
    padding: 10px 14px;
    font-size: 14px;
  }
  .chat-send-btn {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 10px;
  }
  .chat-send-btn span {
    display: none;
  }
}

