@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --bg3: #1a2236;
  --card: #1e293b;
  --border: #334155;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --purple: #a78bfa;
  --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --gradient2: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
.glow { text-shadow: 0 0 40px rgba(59,130,246,0.3); }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,14,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59,130,246,0.15);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  color: var(--text2); text-decoration: none; padding: 0.5rem 1rem;
  border-radius: 8px; font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg3); }
.nav-cta {
  background: var(--gradient); color: #fff; border: none;
  padding: 0.5rem 1.25rem; border-radius: 8px; font-weight: 600;
  cursor: pointer; font-size: 0.875rem; transition: all 0.3s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.4); }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 2rem 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59,130,246,0.15) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139,92,246,0.1) 0%, transparent 50%);
}
.hero-content { position: relative; max-width: 800px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 1.5rem; line-height: 1.1; }
.hero h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text2); max-width: 600px; margin: 0 auto 2.5rem; }
.hero-stats { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; margin-top: 3rem; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-stat .label { font-size: 0.875rem; color: var(--text2); margin-top: 0.25rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--gradient); color: #fff; border: none;
  padding: 0.875rem 2rem; border-radius: 12px; font-weight: 700;
  cursor: pointer; font-size: 1rem; transition: all 0.3s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(59,130,246,0.4); }
.btn-secondary {
  background: var(--bg3); color: var(--text); border: 1px solid var(--border);
  padding: 0.875rem 2rem; border-radius: 12px; font-weight: 600;
  cursor: pointer; font-size: 1rem; transition: all 0.3s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(59,130,246,0.1); }

/* SECTIONS */
.section {
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.75rem;
}
.section-header p { color: var(--text2); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }
.section-tag {
  display: inline-block; background: rgba(59,130,246,0.15); color: var(--accent2);
  padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem;
  font-weight: 600; margin-bottom: 0.75rem; letter-spacing: 0.05em;
}

/* TABS */
.tabs {
  display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tab {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  padding: 0.625rem 1.25rem; border-radius: 10px; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s; font-family: inherit;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--gradient); border-color: transparent; color: #fff; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* COMPANY CARDS */
.companies-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.25rem;
}
.company-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem; transition: all 0.3s; cursor: pointer; position: relative; overflow: hidden;
}
.company-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.company-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient); opacity: 0; transition: opacity 0.3s;
}
.company-card:hover::after { opacity: 1; }
.cc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.cc-name { font-size: 1.2rem; font-weight: 700; }
.cc-sector { font-size: 0.75rem; color: var(--text2); margin-top: 0.25rem; }
.cc-score {
  font-size: 1.5rem; font-weight: 800; min-width: 50px; text-align: center;
  padding: 0.25rem 0.5rem; border-radius: 10px;
}
.score-high { color: var(--green); background: rgba(34,197,94,0.1); }
.score-mid { color: var(--yellow); background: rgba(234,179,8,0.1); }
.score-low { color: var(--red); background: rgba(239,68,68,0.1); }
.cc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
.cc-metric { }
.cc-metric .label { font-size: 0.7rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.cc-metric .value { font-size: 1rem; font-weight: 700; margin-top: 0.15rem; }
.cc-bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; margin-top: 0.75rem; }
.cc-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.cc-divider { height: 1px; background: var(--border); margin: 1rem 0; }
.cc-row { display: flex; justify-content: space-between; align-items: center; }
.cc-row .label { font-size: 0.8rem; color: var(--text2); }
.cc-row .value { font-size: 0.9rem; font-weight: 600; }
.positive { color: var(--green); }
.negative { color: var(--red); }

/* SEARCH & FILTER */
.search-bar {
  display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; justify-content: center;
}
.search-input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 0.75rem 1.25rem; border-radius: 10px; font-size: 0.95rem;
  min-width: 300px; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.filter-select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 0.75rem 1rem; border-radius: 10px; font-size: 0.9rem;
  font-family: inherit; outline: none; cursor: pointer;
}
.sort-btn {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text2);
  padding: 0.75rem 1rem; border-radius: 10px; cursor: pointer;
  font-size: 0.85rem; font-weight: 600; font-family: inherit; transition: all 0.2s;
}
.sort-btn:hover, .sort-btn.active { border-color: var(--accent); color: var(--accent2); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 2rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  max-width: 900px; width: 100%; max-height: 90vh; overflow-y: auto;
  padding: 2.5rem; position: relative;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem; background: var(--bg3); border: none;
  color: var(--text2); width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; font-size: 1.25rem; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); background: var(--card); }
.modal h3 { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.modal .sector-tag { color: var(--text2); font-size: 0.9rem; margin-bottom: 1.5rem; }
.modal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.modal-metric {
  background: var(--bg3); border-radius: 12px; padding: 1rem;
}
.modal-metric .label { font-size: 0.75rem; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-metric .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }
.modal-metric .sub { font-size: 0.8rem; color: var(--text2); margin-top: 0.15rem; }
.score-detail { display: grid; gap: 0.5rem; margin: 1.5rem 0; }
.score-row {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg3); padding: 0.625rem 1rem; border-radius: 10px;
  font-size: 0.875rem;
}
.score-row .criteria { flex: 1; color: var(--text2); }
.score-row .pts { font-weight: 700; min-width: 40px; text-align: center; }
.chart-container { background: var(--bg3); border-radius: 12px; padding: 1.5rem; margin: 1.5rem 0; }
.chart-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; color: var(--text2); }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; justify-content: flex-end; height: 100%; }
.bar { min-width: 16px; border-radius: 4px 4px 0 0; transition: height 0.5s; position: relative; }
.bar-label { font-size: 0.6rem; color: var(--text2); margin-top: 0.25rem; white-space: nowrap; }
.bar-val { font-size: 0.55rem; color: var(--text); position: absolute; top: -16px; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* EDUCATION */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.edu-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.75rem; transition: all 0.3s; cursor: pointer;
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.edu-card .icon { font-size: 2rem; margin-bottom: 1rem; }
.edu-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.edu-card p { font-size: 0.9rem; color: var(--text2); line-height: 1.6; }
.edu-expand {
  display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border);
  font-size: 0.9rem; line-height: 1.8; color: var(--text);
}
.edu-expand.open { display: block; }
.edu-expand h5 { font-weight: 700; margin: 1rem 0 0.5rem; color: var(--accent2); }
.edu-expand ol, .edu-expand ul { padding-left: 1.5rem; color: var(--text2); }
.edu-expand li { margin-bottom: 0.5rem; }
.edu-expand .highlight { background: rgba(59,130,246,0.1); padding: 0.75rem 1rem; border-radius: 8px; border-left: 3px solid var(--accent); margin: 0.75rem 0; color: var(--text); }

/* CHECKLIST */
.checklist-container { max-width: 800px; margin: 0 auto; }
.checklist-table {
  width: 100%; border-collapse: collapse; background: var(--card); border-radius: 16px; overflow: hidden;
}
.checklist-table th {
  background: var(--bg3); padding: 1rem; text-align: left;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2);
}
.checklist-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(51,65,85,0.5); font-size: 0.9rem; }
.checklist-table tr:last-child td { border-bottom: none; }
.check-mark { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.check-mark.checked { background: var(--green); border-color: var(--green); }
.check-mark.cross { background: var(--red); border-color: var(--red); }

/* CALCULATORS */
.calc-container { max-width: 700px; margin: 0 auto; }
.calc-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 2rem; margin-bottom: 2rem;
}
.calc-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.calc-row { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.calc-label { min-width: 200px; font-size: 0.9rem; color: var(--text2); }
.calc-input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 0.625rem 1rem; border-radius: 8px; font-size: 0.95rem;
  font-family: inherit; outline: none; width: 180px; transition: border-color 0.2s;
}
.calc-input:focus { border-color: var(--accent); }
.calc-result {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(139,92,246,0.1) 100%);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 12px; padding: 1.5rem; margin-top: 1.5rem; text-align: center;
}
.calc-result .big { font-size: 2.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.calc-result .sub { font-size: 0.9rem; color: var(--text2); margin-top: 0.25rem; }
.calc-btn {
  background: var(--gradient); color: #fff; border: none;
  padding: 0.75rem 2rem; border-radius: 10px; font-weight: 700;
  cursor: pointer; font-size: 0.95rem; font-family: inherit; margin-top: 1rem;
  transition: all 0.3s;
}
.calc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.3); }

/* IDEAS */
.ideas-list { display: grid; gap: 1rem; max-width: 900px; margin: 0 auto; }
.idea-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.5rem; position: relative; overflow: hidden;
}
.idea-card::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 4px; }
.idea-card.bullish::before { background: var(--green); }
.idea-card.bearish::before { background: var(--red); }
.idea-card.neutral::before { background: var(--yellow); }
.idea-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.idea-title { font-size: 1.1rem; font-weight: 700; }
.idea-tag { padding: 0.2rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.idea-tag.buy { background: rgba(34,197,94,0.15); color: var(--green); }
.idea-tag.sell { background: rgba(239,68,68,0.15); color: var(--red); }
.idea-tag.hold { background: rgba(234,179,8,0.15); color: var(--yellow); }
.idea-text { font-size: 0.9rem; color: var(--text2); line-height: 1.7; }
.idea-meta { display: flex; gap: 1.5rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text2); }

/* PRICING */
.pricing-section { background: var(--bg2); padding: 5rem 2rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.price-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 2.5rem; text-align: center; transition: all 0.3s; position: relative;
}
.price-card.featured { border-color: var(--accent); transform: scale(1.02); }
.price-card.featured::before {
  content: 'ПОПУЛЯРНЫЙ'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff; padding: 0.25rem 1rem; border-radius: 20px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
}
.price-card h4 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.price-amount { font-size: 3rem; font-weight: 900; margin: 1rem 0; }
.price-amount span { font-size: 1rem; font-weight: 500; color: var(--text2); }
.price-features { list-style: none; text-align: left; margin: 1.5rem 0; }
.price-features li { padding: 0.5rem 0; font-size: 0.9rem; color: var(--text2); display: flex; align-items: center; gap: 0.5rem; }
.price-features li::before { content: "✓"; color: var(--green); font-weight: 700; }

/* FOOTER */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 3rem 2rem; text-align: center;
}
footer p { color: var(--text2); font-size: 0.875rem; }
footer a { color: var(--accent2); text-decoration: none; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .companies-grid { grid-template-columns: 1fr; }
  .modal { padding: 1.5rem; margin: 1rem; }
  .search-input { min-width: auto; width: 100%; }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }

/* COMPARISON TABLE */
.comp-table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
.comp-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.comp-table th, .comp-table td { padding: 0.75rem 1rem; text-align: right; font-size: 0.85rem; white-space: nowrap; }
.comp-table th { background: var(--bg3); position: sticky; top: 0; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.75rem; }
.comp-table th:first-child, .comp-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; font-weight: 600; }
.comp-table th:first-child { background: var(--bg3); z-index: 2; }
.comp-table td { border-bottom: 1px solid rgba(51,65,85,0.3); }
.comp-table tr:hover td { background: rgba(59,130,246,0.05); }
.comp-table tr:hover td:first-child { background: rgba(59,130,246,0.1); }

/* BOND SECTION */
.bond-steps { display: grid; gap: 1rem; max-width: 800px; margin: 0 auto; }
.bond-step {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; display: flex; gap: 1.25rem; align-items: flex-start;
}
.step-num {
  background: var(--gradient); color: #fff; width: 36px; height: 36px; min-width: 36px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
}
.step-content h5 { font-weight: 700; margin-bottom: 0.25rem; }
.step-content p { font-size: 0.875rem; color: var(--text2); line-height: 1.6; }

/* AI CHAT WIDGET */
.chat-toggle {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gradient); border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; font-size: 1.5rem;
}
.chat-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(59,130,246,0.5); }
.chat-toggle .badge {
  position: absolute; top: -4px; right: -4px; background: var(--green);
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bg);
}
.chat-panel {
  position: fixed; bottom: 6.5rem; right: 2rem; z-index: 998;
  width: 420px; max-width: calc(100vw - 2rem); height: 560px; max-height: calc(100vh - 8rem);
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.chat-panel.open { display: flex; }
.chat-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header-left { display: flex; align-items: center; gap: 0.75rem; }
.chat-header .dot { width: 10px; height: 10px; border-radius: 50%; }
.chat-header .dot.online { background: var(--green); box-shadow: 0 0 8px rgba(34,197,94,0.5); }
.chat-header .dot.offline { background: var(--red); }
.chat-header h5 { font-size: 0.95rem; font-weight: 700; }
.chat-header .provider { font-size: 0.7rem; color: var(--text2); }
.chat-close { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 1.25rem; padding: 0.25rem; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
}
.chat-msg {
  max-width: 85%; padding: 0.75rem 1rem; border-radius: 14px;
  font-size: 0.875rem; line-height: 1.6; word-wrap: break-word;
}
.chat-msg.user {
  align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px;
}
.chat-msg.ai {
  align-self: flex-start; background: var(--bg3); color: var(--text); border-bottom-left-radius: 4px;
}
.chat-msg.ai .provider-tag {
  font-size: 0.65rem; color: var(--text2); margin-top: 0.5rem; opacity: 0.7;
}
.chat-msg.system {
  align-self: center; background: rgba(59,130,246,0.1); color: var(--accent2);
  font-size: 0.8rem; text-align: center; border-radius: 10px;
}
.chat-msg.ai code { background: rgba(0,0,0,0.3); padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.8rem; }
.chat-msg.ai strong { color: var(--accent2); }
.chat-input-wrap {
  padding: 0.75rem; border-top: 1px solid var(--border);
  display: flex; gap: 0.5rem;
}
.chat-input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 0.625rem 1rem; border-radius: 12px; font-size: 0.875rem;
  font-family: inherit; outline: none; resize: none;
}
.chat-input:focus { border-color: var(--accent); }
.chat-send {
  background: var(--gradient); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-size: 1.1rem;
}
.chat-send:hover { transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.typing-indicator { display: flex; gap: 4px; padding: 0.5rem; }
.typing-indicator span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text2);
  animation: typing 1.4s infinite; opacity: 0.4;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

@media (max-width: 768px) {
  .chat-panel { width: calc(100vw - 1rem); right: 0.5rem; bottom: 5.5rem; height: calc(100vh - 7rem); }
  .chat-toggle { bottom: 1rem; right: 1rem; width: 52px; height: 52px; }
}

