/* VeloMind — style.css v4 | HeavenCloud-inspired dark design */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  overflow: hidden;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; border: none; background: none; }
a { color: #00c853; text-decoration: none; }
a:hover { opacity: 0.8; }

/* ── Pages ── */
.page { display: none; width: 100%; height: 100vh; position: fixed; inset: 0; overflow-y: auto; }
.page.active { display: block; }
#app-page.active { display: flex; overflow: hidden; }

/* ═══════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════ */
#landing-page { background: #0a0a0a; overflow-y: auto; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 60px; border-bottom: 1px solid #1a1a1a;
  position: sticky; top: 0; background: #0a0a0a; z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: #00c853; color: #000;
  font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark.small { width: 24px; height: 24px; font-size: 0.75rem; border-radius: 6px; }
.logo-text { font-weight: 700; font-size: 1.1rem; color: #fff; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: #888; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.btn-nav {
  padding: 8px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  background: #111; border: 1px solid #1a1a1a; color: #fff; transition: all 0.2s;
}
.btn-nav:hover { border-color: #00c853; color: #00c853; }

.hero {
  max-width: 760px; margin: 0 auto;
  padding: 100px 24px 80px; text-align: center;
}
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 99px;
  background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.2);
  color: #00c853; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.5px; margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -1.5px; margin-bottom: 20px;
  color: #fff;
}
.green { color: #00c853; }
.hero-sub { color: #888; font-size: 1.05rem; max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-bottom: 48px; flex-wrap: wrap; }
.btn-primary {
  padding: 13px 28px; border-radius: 10px; font-size: 0.95rem; font-weight: 700;
  background: #00c853; color: #000; transition: all 0.2s;
}
.btn-primary:hover { background: #00e65c; transform: translateY(-1px); }
.btn-ghost {
  padding: 13px 24px; border-radius: 10px; font-size: 0.95rem; font-weight: 600;
  background: transparent; border: 1px solid #1a1a1a; color: #888; transition: all 0.2s;
}
.btn-ghost:hover { border-color: #333; color: #fff; }

.hero-models { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.model-pill {
  padding: 6px 14px; border-radius: 99px; font-size: 0.78rem; font-weight: 500;
  background: #111; border: 1px solid #1a1a1a; color: #888;
}
.model-pill.accent { border-color: rgba(0,200,83,0.3); color: #00c853; background: rgba(0,200,83,0.05); }

/* Features */
.features { max-width: 1000px; margin: 0 auto; padding: 80px 24px; }
.section-label { color: #00c853; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.5px; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: #1a1a1a; border: 1px solid #1a1a1a; border-radius: 14px; overflow: hidden; }
.feature-card { background: #111; padding: 28px 24px; transition: background 0.2s; }
.feature-card:hover { background: #141414; }
.feature-icon { font-size: 1.5rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: #888; font-size: 0.85rem; line-height: 1.6; }

/* Pricing */
.pricing { max-width: 1000px; margin: 0 auto; padding: 80px 24px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pricing-card {
  background: #111; border: 1px solid #1a1a1a; border-radius: 14px;
  padding: 28px 24px; position: relative; transition: border-color 0.2s;
}
.pricing-card:hover { border-color: #333; }
.pricing-card.featured { border-color: #00c853; background: rgba(0,200,83,0.03); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #00c853; color: #000; font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 99px; white-space: nowrap;
}
.plan-name { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 2rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 8px; }
.plan-price span { font-size: 0.85rem; font-weight: 400; color: #888; }
.plan-desc { color: #888; font-size: 0.82rem; margin-bottom: 20px; line-height: 1.5; }
.plan-features { list-style: none; margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { font-size: 0.85rem; color: #ccc; }
.btn-plan {
  width: 100%; padding: 11px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  background: #1a1a1a; border: 1px solid #222; color: #fff; transition: all 0.2s;
}
.btn-plan:hover { border-color: #00c853; color: #00c853; }
.btn-plan-green {
  width: 100%; padding: 11px; border-radius: 8px; font-size: 0.88rem; font-weight: 700;
  background: #00c853; color: #000; transition: all 0.2s;
}
.btn-plan-green:hover { background: #00e65c; }

/* Footer */
.footer {
  border-top: 1px solid #1a1a1a; padding: 40px 60px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #888; font-size: 0.9rem; }
.footer-copy { color: #888; font-size: 0.82rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #888; font-size: 0.82rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

/* ═══════════════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════════════ */
.auth-layout {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #0a0a0a; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #111; border: 1px solid #1a1a1a; border-radius: 16px;
  padding: 40px 36px;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.auth-sub { color: #888; font-size: 0.88rem; margin-bottom: 28px; }
.auth-error {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5; border-radius: 8px; padding: 10px 14px;
  font-size: 0.85rem; margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: #888; margin-bottom: 6px; }
.form-group input, .pw-wrap input {
  width: 100%; padding: 10px 12px;
  background: #0a0a0a; border: 1px solid #1a1a1a; border-radius: 8px;
  color: #fff; font-size: 0.9rem; transition: border-color 0.2s;
}
.form-group input:focus, .pw-wrap input:focus { border-color: #00c853; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #888; display: flex; }
.pw-toggle:hover { color: #fff; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #888; cursor: pointer; margin-bottom: 20px; }
.checkbox-row input { display: none; }
.checkmark {
  width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0;
  border: 1px solid #333; background: #0a0a0a; position: relative; transition: all 0.2s;
}
.checkbox-row input:checked + .checkmark { background: #00c853; border-color: #00c853; }
.checkbox-row input:checked + .checkmark::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 8px; border: 2px solid #000;
  border-top: none; border-left: none; transform: rotate(45deg);
}
.btn-auth {
  width: 100%; padding: 12px; border-radius: 8px; font-size: 0.95rem; font-weight: 700;
  background: #00c853; color: #000; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth:hover { background: #00e65c; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(0,0,0,0.3); border-top-color: #000; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-footer { text-align: center; color: #888; font-size: 0.78rem; margin-top: 20px; }
.back-link { display: block; text-align: center; color: #888; font-size: 0.82rem; margin-top: 12px; transition: color 0.2s; }
.back-link:hover { color: #fff; }

/* ═══════════════════════════════════════════════
   APP PAGE
═══════════════════════════════════════════════ */
.app-layout { display: flex; width: 100%; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar {
  width: 240px; flex-shrink: 0; height: 100%;
  background: #0d0d0d; border-right: 1px solid #1a1a1a;
  display: flex; flex-direction: column;
  transition: transform 0.3s ease;
}
.sidebar-top { padding: 16px 12px 12px; border-bottom: 1px solid #1a1a1a; }
.sidebar-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 4px; }
.new-chat-btn {
  width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 0.83rem; font-weight: 600;
  background: #1a1a1a; border: 1px solid #222; color: #fff;
  display: flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.new-chat-btn:hover { background: #222; border-color: #00c853; color: #00c853; }
.chat-list-label { padding: 12px 16px 4px; font-size: 0.7rem; font-weight: 700; color: #888; letter-spacing: 0.8px; text-transform: uppercase; }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 8px; }
.chat-list::-webkit-scrollbar { width: 3px; }
.chat-list::-webkit-scrollbar-thumb { background: #222; }
.chat-list-empty { text-align: center; padding: 24px 12px; color: #888; font-size: 0.8rem; }
.chat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s; position: relative;
}
.chat-item:hover { background: #1a1a1a; }
.chat-item.active { background: #1a1a1a; }
.chat-item-text { flex: 1; min-width: 0; }
.chat-item-title { font-size: 0.82rem; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-date { font-size: 0.7rem; color: #888; margin-top: 1px; }
.chat-del-btn { opacity: 0; color: #888; padding: 2px 5px; border-radius: 4px; font-size: 0.75rem; transition: opacity 0.15s; }
.chat-item:hover .chat-del-btn { opacity: 1; }
.chat-del-btn:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.sidebar-bottom { padding: 12px; border-top: 1px solid #1a1a1a; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.user-card:hover { background: #1a1a1a; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #000; flex-shrink: 0; background-size: cover; background-position: center; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.83rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 0.7rem; color: #00c853; font-weight: 600; text-transform: capitalize; }

/* Main chat area */
.chat-main { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #0a0a0a; }

/* Topbar */
.chat-topbar {
  height: 56px; display: flex; align-items: center; gap: 12px;
  padding: 0 16px; border-bottom: 1px solid #1a1a1a;
  background: #0d0d0d; flex-shrink: 0;
}
.menu-btn { color: #888; padding: 6px; border-radius: 6px; display: none; }
.menu-btn:hover { color: #fff; background: #1a1a1a; }
.model-selector-wrap { flex: 1; }
.model-selector {
  padding: 7px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  background: #111; border: 1px solid #1a1a1a; color: #fff; cursor: pointer;
  transition: border-color 0.2s; max-width: 320px;
}
.model-selector:focus { border-color: #00c853; }
.model-selector option { background: #111; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.plan-badge {
  padding: 4px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700;
  background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.2);
  color: #00c853; text-transform: capitalize;
}
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; color: #000; background-size: cover; background-position: center; transition: opacity 0.2s; }
.topbar-avatar:hover { opacity: 0.85; }

/* Messages */
.messages { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; }
.messages::-webkit-scrollbar { width: 4px; }
.messages::-webkit-scrollbar-thumb { background: #1a1a1a; }

/* Empty state */
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.empty-logo { width: 56px; height: 56px; background: #00c853; color: #000; border-radius: 14px; font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.empty-state h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: #888; font-size: 0.88rem; margin-bottom: 28px; }
.suggestion-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 480px; }
.suggestion {
  padding: 12px 16px; border-radius: 10px; font-size: 0.82rem; font-weight: 500; text-align: left;
  background: #111; border: 1px solid #1a1a1a; color: #888; transition: all 0.2s; cursor: pointer;
}
.suggestion:hover { background: #1a1a1a; border-color: #00c853; color: #fff; }

/* Message rows */
.msg-row { display: flex; gap: 12px; animation: msgIn 0.25s ease both; }
.msg-row.user { flex-direction: row-reverse; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg-av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; margin-top: 2px; background-size: cover; background-position: center; }
.msg-content { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }
.msg-row.user .msg-content { align-items: flex-end; }
.msg-bubble { padding: 11px 15px; border-radius: 14px; font-size: 0.88rem; line-height: 1.65; word-break: break-word; }
.msg-row.user .msg-bubble { background: #00c853; color: #000; border-bottom-right-radius: 4px; font-weight: 500; }
.msg-row.ai .msg-bubble { background: #111; border: 1px solid #1a1a1a; color: #e5e5e5; border-bottom-left-radius: 4px; }
.msg-row.ai .msg-bubble.error { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.msg-meta { display: flex; align-items: center; gap: 6px; padding: 0 2px; }
.msg-time { font-size: 0.68rem; color: #888; }
.msg-model { font-size: 0.68rem; font-weight: 700; color: #888; padding: 1px 6px; background: #111; border: 1px solid #1a1a1a; border-radius: 4px; }

/* Typing */
.typing-dots { display: flex; gap: 4px; padding: 12px 15px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #888; animation: bounce 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* Code blocks */
.code-block { border-radius: 8px; overflow: hidden; border: 1px solid #1a1a1a; margin: 8px 0; }
.code-header { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; background: #0d0d0d; }
.code-lang { font-size: 0.72rem; font-weight: 700; color: #888; text-transform: uppercase; }
.code-copy { font-size: 0.72rem; padding: 3px 8px; border-radius: 4px; background: #1a1a1a; color: #888; border: 1px solid #222; transition: all 0.15s; }
.code-copy:hover { color: #fff; }
.code-block pre { margin: 0; overflow-x: auto; }
.code-block pre code { font-size: 0.82rem; line-height: 1.6; }

/* Markdown */
.msg-bubble h1,.msg-bubble h2,.msg-bubble h3 { font-weight: 700; margin: 12px 0 6px; }
.msg-bubble h1 { font-size: 1.1rem; } .msg-bubble h2 { font-size: 1rem; } .msg-bubble h3 { font-size: 0.95rem; }
.msg-bubble p { margin: 6px 0; }
.msg-bubble ul,.msg-bubble ol { margin: 6px 0; padding-left: 18px; }
.msg-bubble li { margin: 3px 0; }
.msg-bubble strong { font-weight: 700; }
.msg-bubble em { font-style: italic; }
.msg-bubble code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; font-size: 0.85em; }
.msg-row.user .msg-bubble code { background: rgba(0,0,0,0.2); }
.msg-bubble blockquote { border-left: 3px solid #00c853; padding-left: 12px; color: #888; margin: 8px 0; }
.msg-bubble table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 0.83em; }
.msg-bubble th { background: #0d0d0d; padding: 7px 10px; border: 1px solid #1a1a1a; font-weight: 700; }
.msg-bubble td { padding: 7px 10px; border: 1px solid #1a1a1a; }

/* Input area */
.input-area { flex-shrink: 0; padding: 12px 16px 16px; background: #0d0d0d; border-top: 1px solid #1a1a1a; }
.input-box {
  display: flex; align-items: flex-end; gap: 8px;
  background: #111; border: 1px solid #1a1a1a; border-radius: 12px; padding: 8px;
  transition: border-color 0.2s;
}
.input-box:focus-within { border-color: #00c853; }
#msg-input { flex: 1; resize: none; color: #fff; font-size: 0.9rem; line-height: 1.5; max-height: 150px; overflow-y: auto; padding: 4px 6px; }
#msg-input::placeholder { color: #888; }
#msg-input::-webkit-scrollbar { width: 3px; }
.send-btn {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: #00c853; color: #000; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.send-btn:hover { background: #00e65c; transform: scale(1.05); }
.send-btn:active { transform: scale(0.97); }
.input-hint { font-size: 0.72rem; color: #888; margin-top: 6px; padding: 0 4px; }

/* Profile panel */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: none; }
.overlay.open { display: block; }
.profile-panel {
  position: fixed; top: 0; right: -380px; width: 340px; height: 100%;
  background: #0d0d0d; border-left: 1px solid #1a1a1a; z-index: 201;
  display: flex; flex-direction: column;
  transition: right 0.3s ease;
}
.profile-panel.open { right: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #1a1a1a; flex-shrink: 0; }
.panel-header h3 { font-size: 1rem; font-weight: 700; }
.panel-close { color: #888; font-size: 1rem; padding: 4px 8px; border-radius: 6px; transition: all 0.15s; }
.panel-close:hover { color: #fff; background: #1a1a1a; }
.panel-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.panel-body::-webkit-scrollbar { width: 3px; }
.panel-body::-webkit-scrollbar-thumb { background: #1a1a1a; }

.profile-top { display: flex; align-items: center; gap: 14px; padding: 16px; background: #111; border-radius: 12px; border: 1px solid #1a1a1a; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-lg { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; color: #000; border: 2px solid #1a1a1a; background-size: cover; background-position: center; }
.avatar-edit-btn { position: absolute; bottom: 0; right: 0; width: 20px; height: 20px; border-radius: 50%; background: #00c853; color: #000; display: flex; align-items: center; justify-content: center; border: 2px solid #0d0d0d; transition: transform 0.2s; }
.avatar-edit-btn:hover { transform: scale(1.1); }
.profile-name { font-size: 1rem; font-weight: 700; }
.profile-username { font-size: 0.78rem; color: #888; margin-top: 2px; }
.profile-role-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 99px; font-size: 0.7rem; font-weight: 700; text-transform: capitalize; background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.2); color: #00c853; }
.profile-role-badge.owner { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); color: #f59e0b; }

.panel-section { display: flex; flex-direction: column; gap: 10px; }
.panel-label { font-size: 0.72rem; font-weight: 700; color: #888; letter-spacing: 0.8px; text-transform: uppercase; }
.plan-info-card { background: #111; border: 1px solid #1a1a1a; border-radius: 10px; padding: 14px; }
.plan-info-name { font-size: 0.95rem; font-weight: 700; text-transform: capitalize; margin-bottom: 4px; }
.plan-info-usage { font-size: 0.8rem; color: #888; }
.btn-upgrade { margin-top: 10px; padding: 8px 14px; border-radius: 7px; font-size: 0.82rem; font-weight: 700; background: #00c853; color: #000; transition: all 0.2s; }
.btn-upgrade:hover { background: #00e65c; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; transition: all 0.15s; }
.swatch.active { border-color: #fff; transform: scale(1.15); }
.swatch:hover { transform: scale(1.1); }
.inline-form { display: flex; gap: 8px; }
.inline-form input, .pw-form input {
  flex: 1; padding: 9px 12px; background: #0a0a0a;
  border: 1px solid #1a1a1a; border-radius: 8px; color: #fff; font-size: 0.85rem;
  transition: border-color 0.2s;
}
.inline-form input:focus, .pw-form input:focus { border-color: #00c853; }
.btn-save { padding: 9px 14px; border-radius: 8px; background: #00c853; color: #000; font-size: 0.83rem; font-weight: 700; white-space: nowrap; transition: all 0.2s; }
.btn-save:hover { background: #00e65c; }
.btn-save.full { width: 100%; text-align: center; }
.stats-row { display: flex; gap: 8px; }
.stat-box { flex: 1; background: #111; border: 1px solid #1a1a1a; border-radius: 8px; padding: 12px; text-align: center; }
.stat-num { font-size: 1.2rem; font-weight: 800; color: #00c853; }
.stat-lbl { font-size: 0.7rem; color: #888; margin-top: 2px; }
.pw-form { display: flex; flex-direction: column; gap: 8px; }
.btn-logout { width: 100%; padding: 11px; border-radius: 8px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); color: #fca5a5; font-size: 0.88rem; font-weight: 600; transition: all 0.2s; }
.btn-logout:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal { background: #111; border: 1px solid #1a1a1a; border-radius: 14px; padding: 28px 24px; max-width: 320px; width: 90%; text-align: center; }
.modal h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.modal p { color: #888; font-size: 0.85rem; margin-bottom: 20px; }
.modal-btns { display: flex; gap: 8px; }
.btn-cancel { flex: 1; padding: 10px; border-radius: 8px; background: #1a1a1a; border: 1px solid #222; color: #888; font-weight: 600; font-size: 0.85rem; transition: all 0.2s; }
.btn-cancel:hover { color: #fff; }
.btn-confirm-delete { flex: 1; padding: 10px; border-radius: 8px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #ef4444; font-weight: 700; font-size: 0.85rem; transition: all 0.2s; }
.btn-confirm-delete:hover { background: #ef4444; color: #fff; }

/* Toasts */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; background: #111; border: 1px solid #1a1a1a; color: #fff; animation: toastIn 0.3s both; max-width: 300px; }
.toast.success { background: rgba(0,200,83,0.1); border-color: rgba(0,200,83,0.2); color: #00c853; }
.toast.error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.toast.removing { animation: toastOut 0.3s both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(16px); } }

/* Mobile overlay */
.mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; display: none; }
.mobile-overlay.open { display: block; }

/* Responsive */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .footer { padding: 28px 20px; flex-direction: column; text-align: center; }
  .sidebar { position: fixed; transform: translateX(-100%); z-index: 100; }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.5); }
  .menu-btn { display: flex; }
  .msg-content { max-width: 88%; }
  .suggestion-grid { grid-template-columns: 1fr; }
  .profile-panel { width: 100%; right: -100%; }
}

/* ── Signup page rain background ── */
.signup-rain-bg {
  position: fixed; inset: 0; z-index: 0;
  background: #0a0a0a;
}
.signup-rain-bg::before {
  content: "";
  position: absolute;
  inset: -145%;
  rotate: -45deg;
  background: #000;
  background-image:
    radial-gradient(4px 100px at 0px 235px, #0f0, #0000),
    radial-gradient(4px 100px at 300px 235px, #0f0, #0000),
    radial-gradient(1.5px 1.5px at 150px 117.5px, #0f0 100%, #0000 150%),
    radial-gradient(4px 100px at 0px 252px, #0f0, #0000),
    radial-gradient(4px 100px at 300px 252px, #0f0, #0000),
    radial-gradient(1.5px 1.5px at 150px 126px, #0f0 100%, #0000 150%),
    radial-gradient(4px 100px at 0px 150px, #0f0, #0000),
    radial-gradient(4px 100px at 300px 150px, #0f0, #0000),
    radial-gradient(1.5px 1.5px at 150px 75px, #0f0 100%, #0000 150%),
    radial-gradient(4px 100px at 0px 179px, #0f0, #0000),
    radial-gradient(4px 100px at 300px 179px, #0f0, #0000),
    radial-gradient(1.5px 1.5px at 150px 89.5px, #0f0 100%, #0000 150%),
    radial-gradient(4px 100px at 0px 299px, #0f0, #0000),
    radial-gradient(4px 100px at 300px 299px, #0f0, #0000),
    radial-gradient(1.5px 1.5px at 150px 149.5px, #0f0 100%, #0000 150%);
  background-size: 300px 235px,300px 235px,300px 235px,300px 252px,300px 252px,300px 252px,300px 150px,300px 150px,300px 150px,300px 179px,300px 179px,300px 179px,300px 299px,300px 299px,300px 299px;
  animation: hi 150s linear infinite;
  opacity: 0.5;
}
@keyframes hi {
  0% { background-position: 0px 220px,3px 220px,151.5px 337.5px,25px 24px,28px 24px,176.5px 150px,50px 16px,53px 16px,201.5px 91px,150px 31px,153px 31px,301.5px 120.5px,175px 235px,178px 235px,326.5px 384.5px; }
  to  { background-position: 0px 6800px,3px 6800px,151.5px 6917.5px,25px 13632px,28px 13632px,176.5px 13758px,50px 5416px,53px 5416px,201.5px 5491px,150px 9876px,153px 9876px,301.5px 9965.5px,175px 13391px,178px 13391px,326.5px 13540.5px; }
}
.signup-rain-bg::after {
  --dark-purple: rgb(0,40,0);
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(-62.5deg,lime,green,green,green,green,lime,green,green,green,green,lime);
  mix-blend-mode: multiply;
  background-size: 400%;
  background-position: 10%;
  animation: move-light 5s infinite;
  opacity: 0.3;
}
@keyframes move-light {
  0%   { background-position: 10%; }
  50%  { background-position: 90%; }
  100% { background-position: 90%; }
}

/* ── Landing page layout ── */
.landing-content { position: relative; z-index: 1; }
#landing-page { overflow-y: auto; }

/* ── Nav button green ── */
.btn-nav-green {
  padding: 8px 18px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  background: #00c853; color: #000; transition: all 0.2s;
}
.btn-nav-green:hover { background: #00e65c; }

/* ── Auth success ── */
.auth-success {
  background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.2);
  color: #00c853; border-radius: 8px; padding: 10px 14px;
  font-size: 0.85rem; margin-bottom: 16px;
}
.auth-switch { text-align: center; color: #888; font-size: 0.82rem; margin-top: 14px; }
.auth-switch a { color: #00c853; }

/* ── Sidebar model list ── */
.sidebar-section { padding: 8px 8px 0; }
.sidebar-section-label {
  font-size: 0.68rem; font-weight: 700; color: #888;
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 6px 8px 4px;
}
.sidebar-section-label.mt8 { margin-top: 8px; }
.model-list-sidebar { display: flex; flex-direction: column; gap: 2px; }
.model-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s; position: relative;
}
.model-item:hover { background: #1a1a1a; }
.model-item.active { background: rgba(0,200,83,0.1); border: 1px solid rgba(0,200,83,0.2); }
.model-item.locked { opacity: 0.5; cursor: not-allowed; }
.model-item-icon { font-size: 0.9rem; flex-shrink: 0; width: 20px; text-align: center; }
.model-item-info { flex: 1; min-width: 0; }
.model-item-name { font-size: 0.8rem; font-weight: 600; color: #ccc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-item-sub { font-size: 0.68rem; color: #888; margin-top: 1px; }
.model-lock { font-size: 0.72rem; color: #888; flex-shrink: 0; }
.model-item.active .model-item-name { color: #00c853; }

/* ── Current model display in topbar ── */
.current-model-display {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 600; color: #ccc;
}
.model-dot { width: 8px; height: 8px; border-radius: 50%; background: #00c853; flex-shrink: 0; box-shadow: 0 0 6px #00c853; }

/* ── Chat rain background ── */
.chat-rain-bg-wrap {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0;
}
.chat-main { position: relative; }
.messages, .chat-topbar, .input-area { position: relative; z-index: 1; }
/* ── Fix stars z-index so they don't cover auth forms ── */
.stars-wrap {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
  pointer-events: none;
}
.stars-wrap #stars,
.stars-wrap .s1 { position: fixed; width:1px; height:1px; background:transparent; z-index:0; pointer-events:none;
  box-shadow: 501px 811px #fff,1450px 1324px #fff,1093px 1780px #fff,1469px 678px #fff,904px 741px #fff,1160px 781px #fff,1841px 1962px #fff,1630px 1667px #fff,1788px 676px #fff,367px 1734px #fff,1343px 156px #fff,1283px 1142px #fff,1062px 378px #fff,1395px 467px #fff,1017px 1891px #fff,137px 1114px #fff,1767px 1403px #fff,1543px 11px #fff,1078px 181px #fff,1189px 1574px #fff,1697px 1551px #fff,439px 472px #fff,1491px 677px #fff,1364px 599px #fff,34px 382px #fff,1221px 1584px #fff,1266px 1499px #fff,169px 1907px #fff,1219px 1125px #fff,659px 18px #fff;
  animation: animStar 50s linear infinite;
}
.stars-wrap #stars2,
.stars-wrap .s2 { position: fixed; width:2px; height:2px; background:transparent; z-index:0; pointer-events:none;
  box-shadow: 1925px 1320px #fff,693px 1778px #fff,1016px 711px #fff,1171px 563px #fff,661px 1919px #fff,1610px 44px #fff,1275px 140px #fff,1208px 1802px #fff,1473px 1587px #fff,11px 1117px #fff,853px 1757px #fff,1149px 937px #fff,1353px 428px #fff,270px 279px #fff,258px 1404px #fff,417px 1188px #fff,286px 561px #fff,393px 1765px #fff,147px 881px #fff,666px 1097px #fff;
  animation: animStar 100s linear infinite;
}
.stars-wrap #stars3,
.stars-wrap .s3 { position: fixed; width:3px; height:3px; background:transparent; z-index:0; pointer-events:none;
  box-shadow: 200px 981px #fff,1731px 521px #fff,132px 1039px #fff,1888px 1547px #fff,899px 1226px #fff,1887px 580px #fff,1548px 1092px #fff,1626px 689px #fff,254px 1072px #fff,1684px 1211px #fff,672px 1267px #fff,939px 668px #fff;
  animation: animStar 150s linear infinite;
}

/* ── Auth layout must be above stars ── */
.auth-layout { position: relative; z-index: 10; }
.auth-card { position: relative; z-index: 10; }

/* ── Pricing card "Most Popular" badge fix ── */
.pricing-card { margin-top: 16px; }
.pricing-card.featured { margin-top: 0; border-color: #00c853; }
.plan-badge {
  display: inline-block;
  background: #00c853; color: #000;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 14px; border-radius: 99px;
  margin-bottom: 12px; white-space: nowrap;
}

/* ── Model selector back in topbar ── */
.model-selector-wrap { flex: 1; max-width: 340px; }
.model-selector {
  width: 100%; padding: 7px 12px; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600;
  background: #111; border: 1px solid #1a1a1a; color: #fff;
  cursor: pointer; transition: border-color 0.2s;
}
.model-selector:focus { border-color: #00c853; outline: none; }
.model-selector option { background: #111; color: #fff; }
.model-selector option:disabled { color: #888; }

/* ── Landing page content above stars ── */
.landing-content { position: relative; z-index: 1; }
#landing-page { overflow-y: auto; height: 100vh; }
