/* WormGPT — Production CSS
   Aesthetic: Dark Editorial / Industrial Cyber
   Fonts: Barlow Condensed (display) + DM Sans (body) + JetBrains Mono (code)
   Icons: Font Awesome 6 Free
*/
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --red:        #d42b2b;
  --red-bright: #ff3535;
  --red-dim:    #8c1c1c;
  --red-glass:  rgba(212,43,43,0.1);
  --red-border: rgba(212,43,43,0.26);
  --red-glow:   rgba(212,43,43,0.38);
  --black:  #000000;
  --bg1:    #050505;
  --bg2:    #0a0a0a;
  --bg3:    #111111;
  --bg4:    #181818;
  --bg5:    #222222;
  --line:   rgba(255,255,255,0.06);
  --line2:  rgba(255,255,255,0.10);
  --txt:    #d0d0da;
  --txt2:   #848496;
  --txt3:   #4e4e60;
  --white:  #f0f0f8;
  --font-d: 'Barlow Condensed', sans-serif;
  --font-b: 'DM Sans', sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --r:  6px;
  --r2: 10px;
  --r3: 14px;
  --nav-h: 60px;
  --sw: 260px;
  --tr: .17s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--black); color: var(--txt); font-family: var(--font-b); line-height: 1.65; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--red-bright); text-decoration: none; transition: color var(--tr); }
a:hover { color: #ff6060; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 2px; }

/* ── Typography ── */
h1,h2,h3 { font-family: var(--font-d); color: var(--white); line-height: 1.08; font-weight: 700; letter-spacing:.02em; }
h1 { font-size: clamp(3rem,7vw,6rem); font-weight: 800; }
h2 { font-size: clamp(2.2rem,4.5vw,3.8rem); }
h3 { font-size: clamp(1.5rem,2.5vw,2.1rem); }
h4 { font-size: .95rem; font-weight: 600; color: var(--white); }
p  { color: var(--txt2); line-height: 1.72; }
code,pre { font-family: var(--font-m); }

/* ── Layout ── */
.container    { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 660px;  margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 20px; height: 42px; border-radius: var(--r2);
  font-family: var(--font-b); font-size: .875rem; font-weight: 600;
  cursor: pointer; transition: all var(--tr); border: none; outline: none;
  white-space: nowrap; text-decoration: none; letter-spacing: .01em;
}
.btn i { font-size: .85em; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 2px 16px rgba(212,43,43,0.25); }
.btn-primary:hover { background: var(--red-bright); box-shadow: 0 4px 28px var(--red-glow); transform: translateY(-1px); color: #fff; }
.btn-outline { background: transparent; color: var(--txt); border: 1px solid var(--line2); }
.btn-outline:hover { background: var(--bg3); color: var(--white); border-color: var(--line2); }
.btn-ghost { background: var(--bg3); color: var(--txt); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg4); color: var(--white); }
.btn-sm { height: 34px; padding: 0 13px; font-size: .8rem; }
.btn-lg { height: 50px; padding: 0 30px; font-size: .95rem; border-radius: var(--r3); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .35; pointer-events: none; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--txt3); margin-bottom: 6px; }
.form-control { width: 100%; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r2); color: var(--white); font-family: var(--font-b); font-size: .9rem; padding: 0 13px; height: 44px; transition: border-color var(--tr), box-shadow var(--tr); outline: none; appearance: none; -webkit-appearance: none; }
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(212,43,43,0.13); }
.form-control::placeholder { color: var(--txt3); }
textarea.form-control { height: auto; padding: 11px 13px; resize: vertical; }
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M0 0l5 7 5-7z' fill='%23555'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.form-error { color: #ff7272; font-size: .78rem; margin-top: 4px; display: flex; align-items: center; gap: 5px; }
.form-hint  { color: var(--txt3); font-size: .75rem; margin-top: 4px; }

/* ── Alert ── */
.alert { display: flex; align-items: flex-start; gap: 9px; padding: 11px 14px; border-radius: var(--r2); font-size: .865rem; margin-bottom: 16px; line-height: 1.5; }
.alert i { margin-top: 2px; flex-shrink: 0; font-size: .85rem; }
.alert-danger  { background: rgba(212,43,43,.09);  border: 1px solid rgba(212,43,43,.22); color: #ff8888; }
.alert-success { background: rgba(34,197,80,.07);  border: 1px solid rgba(34,197,80,.18); color: #66ddaa; }
.alert-info    { background: rgba(59,130,246,.07); border: 1px solid rgba(59,130,246,.18); color: #88bbff; }
.alert-warning { background: rgba(234,179,8,.07);  border: 1px solid rgba(234,179,8,.18);  color: #f4cc40; }

/* ── Card ── */
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r3); padding: 22px; }

/* ── Badge ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.badge-red    { background: rgba(212,43,43,.16); color: #ff7070; }
.badge-green  { background: rgba(34,197,80,.1);  color: #55dd99; }
.badge-yellow { background: rgba(234,179,8,.1);  color: #f0c830; }
.badge-blue   { background: rgba(59,130,246,.1); color: #7ab4ff; }
.badge-gray   { background: var(--bg4); color: var(--txt2); }

/* ════════════════════════════════
   NAVBAR
════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: rgba(6,6,8,.9);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.navbar .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 30px; width: 30px; object-fit: contain; }
.nav-logo-name { font-family: var(--font-d); font-size: 1.3rem; font-weight: 800; letter-spacing: .05em; color: var(--white); }
.nav-logo-name em { color: var(--red-bright); font-style: normal; }

.nav-center { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-center a { display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--r); color: var(--txt2); font-size: .855rem; font-weight: 500; transition: all var(--tr); text-decoration: none; }
.nav-center a i { font-size: .78rem; }
.nav-center a:hover, .nav-center a.active { color: var(--white); background: var(--bg3); }

.nav-right { display: flex; align-items: center; gap: 8px; }

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: var(--bg3);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  cursor: pointer;
  padding: 10px;
  flex-shrink: 0;
}
.hamburger span {
  display: block; height: 1.5px;
  background: var(--txt); border-radius: 1px;
  transition: all .24s cubic-bezier(.4,0,.2,1);
  transform-origin: center;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--bg1);
  border-bottom: 1px solid var(--line);
  z-index: 898;
  padding: 10px 14px 18px;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  pointer-events: none;
}
.mobile-drawer.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.mobile-drawer ul a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r2); color: var(--txt); font-size: .9rem; font-weight: 500; text-decoration: none; transition: background var(--tr), color var(--tr); }
.mobile-drawer ul a i { width: 16px; color: var(--txt3); font-size: .85rem; text-align: center; }
.mobile-drawer ul a:hover { background: var(--bg3); color: var(--white); }
.mobile-drawer-divider { height: 1px; background: var(--line); margin: 8px 0; }
.mobile-drawer-actions { display: flex; flex-direction: column; gap: 8px; }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.hero {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(212,43,43,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(212,43,43,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 100%);
}
.hero-radial {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(212,43,43,.15) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 420px; gap: 48px; align-items: center; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--red-glass); border: 1px solid var(--red-border); border-radius: 99px;
  padding: 4px 14px 4px 9px;
  font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--red-bright);
  margin-bottom: 20px;
}
.hero-tag .live-dot { width: 7px; height: 7px; background: var(--red-bright); border-radius: 50%; box-shadow: 0 0 8px var(--red-bright); animation: blink 1.8s ease-in-out infinite; }

.hero h1 em { font-style: normal; color: var(--red-bright); }
.hero-desc { font-size: 1.03rem; color: var(--txt2); line-height: 1.78; max-width: 500px; margin: 18px 0 34px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.stat-num { font-family: var(--font-d); font-size: 1.9rem; font-weight: 800; color: var(--white); line-height: 1; }
.stat-num em { color: var(--red-bright); font-style: normal; }
.stat-lbl { font-size: .72rem; color: var(--txt3); margin-top: 3px; text-transform: uppercase; letter-spacing: .06em; }

.hero-visual { display: flex; align-items: center; justify-content: center; }
.hero-orb { position: relative; width: 340px; height: 340px; display: flex; align-items: center; justify-content: center; }
.hero-orb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--red-border); animation: spin 18s linear infinite; }
.hero-orb::after  { content: ''; position: absolute; inset: 28px; border-radius: 50%; border: 1px dashed rgba(212,43,43,.12); animation: spin 11s linear infinite reverse; }
.hero-orb img { width: 200px; height: 200px; object-fit: contain; filter: drop-shadow(0 0 48px rgba(212,43,43,.6)); animation: float 5s ease-in-out infinite; position: relative; z-index: 1; }

/* ════════════════════════════════
   SECTION COMMON
════════════════════════════════ */
.section { padding: 88px 0; }
.section-alt { background: var(--bg1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.s-label { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red-bright); margin-bottom: 11px; }
.s-title { margin-bottom: 12px; }
.s-body  { font-size: 1rem; color: var(--txt2); max-width: 500px; }

/* ════════════════════════════════
   FEATURES
════════════════════════════════ */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.feat { background: var(--bg1); padding: 30px 26px; transition: background var(--tr); }
.feat:hover { background: var(--bg2); }
.feat-icon { width: 42px; height: 42px; background: var(--red-glass); border: 1px solid var(--red-border); border-radius: var(--r2); display: flex; align-items: center; justify-content: center; color: var(--red-bright); font-size: .95rem; margin-bottom: 16px; }
.feat h4 { font-size: .9rem; margin-bottom: 7px; }
.feat p  { font-size: .845rem; line-height: 1.66; }

/* ════════════════════════════════
   PRICING
════════════════════════════════ */
.plans-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; max-width: 980px; margin: 0 auto; }
.plan-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r3); padding: 28px 24px; display: flex; flex-direction: column; position: relative; transition: border-color var(--tr), box-shadow var(--tr); }
.plan-card.featured { border-color: var(--red); box-shadow: 0 0 40px rgba(212,43,43,.18), 0 2px 20px rgba(0,0,0,.5); }
.plan-pill { position: absolute; top: -10px; left: 24px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 3px 11px; border-radius: 99px; }
.plan-name { font-family: var(--font-d); font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; color: var(--white); margin-bottom: 3px; }
.plan-tagline { font-size: .8rem; color: var(--txt3); margin-bottom: 18px; }
.plan-price { font-family: var(--font-d); font-size: 2.8rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 4px; }
.plan-price sup { font-size: 1.1rem; vertical-align: top; margin-top: 7px; font-weight: 600; }
.plan-price sub { font-size: .9rem; color: var(--txt2); font-family: var(--font-b); font-weight: 400; }
.plan-hr { height: 1px; background: var(--line); margin: 18px 0; }
.plan-feats { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; }
.plan-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: .845rem; color: var(--txt2); }
.plan-feats li i { color: var(--red-bright); font-size: .78rem; margin-top: 3px; flex-shrink: 0; width: 12px; }

/* ════════════════════════════════
   AUTH
════════════════════════════════ */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 80px 20px 40px; background: var(--black); position: relative; }
.auth-page::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 500px; height: 280px; background: radial-gradient(ellipse, rgba(212,43,43,.1) 0%, transparent 65%); pointer-events: none; }
.auth-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r3); padding: 38px 32px; width: 100%; max-width: 430px; position: relative; box-shadow: 0 4px 40px rgba(0,0,0,.5); }
.auth-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--red); border-radius: var(--r3) var(--r3) 0 0; }
.auth-logo-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; text-decoration: none; }
.auth-logo-row img { height: 32px; }
.auth-logo-row .name { font-family: var(--font-d); font-size: 1.4rem; font-weight: 800; letter-spacing: .06em; color: var(--white); }
.auth-logo-row .name em { color: var(--red-bright); font-style: normal; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h2 { font-family: var(--font-b); font-size: 1.1rem; font-weight: 600; }
.auth-head p  { font-size: .83rem; color: var(--txt3); margin-top: 4px; }
.or-row { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--txt3); font-size: .78rem; }
.or-row::before, .or-row::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ════════════════════════════════
   PAYMENT
════════════════════════════════ */
.payment-page { min-height: 100vh; display: grid; place-items: center; padding: 80px 20px 40px; background: var(--black); }
.payment-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--r3); padding: 32px 28px; width: 100%; max-width: 490px; box-shadow: 0 4px 40px rgba(0,0,0,.5); }

/* Coin selector */
.coin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 20px; }
.coin-opt { position: relative; }
.coin-opt input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.coin-lbl {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1.5px solid var(--line); border-radius: var(--r2);
  padding: 11px 13px; cursor: pointer; transition: all var(--tr); user-select: none;
}
.coin-lbl:hover { border-color: var(--line2); background: var(--bg4); }
.coin-opt input:checked + .coin-lbl { border-color: var(--red); background: var(--red-glass); }
.coin-lbl img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.coin-lbl-info strong { display: block; font-size: .845rem; font-weight: 600; color: var(--white); line-height: 1.2; }
.coin-lbl-info small  { font-size: .7rem; color: var(--txt3); }

.net-warn { display: flex; align-items: flex-start; gap: 8px; background: rgba(234,179,8,.07); border: 1px solid rgba(234,179,8,.2); border-radius: var(--r); padding: 10px 13px; font-size: .81rem; color: #f0c830; margin-bottom: 16px; line-height: 1.5; }
.net-warn i { margin-top: 2px; flex-shrink: 0; }

.qr-wrap { background: #fff; border-radius: var(--r2); padding: 12px; display: flex; justify-content: center; margin: 0 auto 18px; width: fit-content; }
.qr-wrap img { width: 156px; height: 156px; display: block; }

.copy-row { display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r2); overflow: hidden; margin-bottom: 10px; }
.copy-row-text { flex: 1; padding: 10px 12px; font-family: var(--font-m); font-size: .76rem; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-row-btn { flex-shrink: 0; background: var(--bg4); border: none; border-left: 1px solid var(--line2); color: var(--txt2); padding: 0 13px; height: 42px; cursor: pointer; font-size: .78rem; font-family: var(--font-b); font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all var(--tr); white-space: nowrap; }
.copy-row-btn:hover { background: var(--bg5); color: var(--white); }
.copy-row-btn i { font-size: .75rem; }

.timer-bar { height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.timer-fill { height: 100%; background: var(--red); border-radius: 2px; transition: width 1s linear; }

.pay-status { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; background: var(--bg3); border: 1px solid var(--line); border-radius: 99px; font-size: .82rem; color: var(--txt2); }
.pay-status .pulse { width: 8px; height: 8px; background: var(--red-bright); border-radius: 50%; box-shadow: 0 0 8px var(--red-bright); animation: blink 1.6s ease-in-out infinite; }

/* ════════════════════════════════
   CHAT
════════════════════════════════ */
.chat-layout { display: grid; grid-template-columns: var(--sw) 1fr; height: 100vh; height: 100dvh; overflow: hidden; }

/* Sidebar */
.chat-sidebar { display: flex; flex-direction: column; background: var(--bg1); border-right: 1px solid var(--line); overflow: hidden; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 12px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sb-brand { font-family: var(--font-d); font-size: 1.2rem; font-weight: 800; letter-spacing: .05em; color: var(--white); }
.sb-brand em { color: var(--red-bright); font-style: normal; }
.new-btn { width: 28px; height: 28px; background: var(--bg3); border: 1px solid var(--line2); border-radius: var(--r); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--txt2); font-size: .75rem; transition: all var(--tr); }
.new-btn:hover { background: var(--red); border-color: var(--red); color: #fff; }

.conv-list { flex: 1; overflow-y: auto; padding: 6px; }
.conv-group-label { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--txt3); padding: 10px 8px 4px; }
.conv-row { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: var(--r2); cursor: pointer; transition: background var(--tr); }
.conv-row:hover { background: var(--bg3); }
.conv-row.active { background: var(--red-glass); }
.conv-row i.conv-ic { color: var(--txt3); font-size: .75rem; flex-shrink: 0; width: 13px; }
.conv-row.active i.conv-ic { color: var(--red-bright); }
.conv-row-title { flex: 1; font-size: .82rem; color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row.active .conv-row-title { color: var(--white); }
.conv-row-acts { display: flex; gap: 2px; opacity: 0; transition: opacity var(--tr); }
.conv-row:hover .conv-row-acts { opacity: 1; }
.conv-act { width: 20px; height: 20px; background: none; border: none; border-radius: 3px; cursor: pointer; color: var(--txt3); font-size: .68rem; display: flex; align-items: center; justify-content: center; transition: all var(--tr); }
.conv-act:hover { background: var(--bg5); color: var(--txt); }

.sidebar-foot { padding: 9px; border-top: 1px solid var(--line); flex-shrink: 0; }
.user-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r2); }
.user-av { width: 30px; height: 30px; background: var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-meta strong { display: block; font-size: .8rem; color: var(--white); line-height: 1.25; }
.user-meta small  { font-size: .7rem; color: var(--txt3); }
.sb-logout { margin-left: auto; width: 26px; height: 26px; background: var(--bg3); border: 1px solid var(--line); border-radius: var(--r); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--txt3); font-size: .72rem; transition: all var(--tr); text-decoration: none; flex-shrink: 0; }
.sb-logout:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Chat main */
.chat-main { display: flex; flex-direction: column; overflow: hidden; background: var(--black); }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--bg1); flex-shrink: 0; gap: 12px; }
.chat-header-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mob-sb-btn { display: none; width: 32px; height: 32px; background: var(--bg3); border: 1px solid var(--line); border-radius: var(--r); align-items: center; justify-content: center; cursor: pointer; color: var(--txt2); font-size: .8rem; flex-shrink: 0; }
.chat-title { font-size: .875rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--red-glass); border: 1px solid var(--red-border); border-radius: 99px; padding: 2px 9px; font-size: .68rem; color: var(--red-bright); font-weight: 600; white-space: nowrap; }
.model-pill i { font-size: .65rem; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 24px 18px; display: flex; flex-direction: column; gap: 20px; }
.msg { display: flex; gap: 10px; max-width: 760px; animation: msgIn .2s ease; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; flex-shrink: 0; margin-top: 2px; }
.msg.assistant .msg-av { background: #0d0d0d; color: #fff; border: 1px solid #222; }
.msg.user      .msg-av { background: var(--bg4); border: 1px solid var(--line2); color: var(--txt2); }
.msg-bub { padding: 11px 15px; border-radius: var(--r3); font-size: .88rem; line-height: 1.74; max-width: calc(100% - 42px); }
.msg.assistant .msg-bub { background: var(--bg2); border: 1px solid var(--line); border-top-left-radius: 3px; color: var(--txt); }
.msg.user      .msg-bub { background: var(--red-glass); border: 1px solid var(--red-border); border-top-right-radius: 3px; color: var(--white); }
.msg-bub pre { background: var(--bg1); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; overflow-x: auto; margin: 9px 0; font-size: .8rem; line-height: 1.6; }
.msg-bub code:not(pre code) { background: var(--bg3); padding: 1px 5px; border-radius: 3px; font-size: .84em; color: #ff9090; }
.msg-bub p { color: inherit; margin-bottom: 8px; }
.msg-bub p:last-child { margin-bottom: 0; }
.msg-bub ul, .msg-bub ol { padding-left: 18px; margin: 7px 0; }
.msg-bub li { margin-bottom: 3px; }
.msg-bub h3, .msg-bub h4 { font-family: var(--font-b); font-size: .9rem; margin: 10px 0 5px; }
.msg-bub strong { color: var(--white); }
.msg-bub blockquote { border-left: 2px solid var(--red-border); padding-left: 12px; color: var(--txt2); margin: 7px 0; }

.typing-row { display: flex; gap: 4px; padding: 12px 15px; }
.t-dot { width: 7px; height: 7px; background: var(--txt3); border-radius: 50%; animation: typeBounce 1.2s ease infinite; }
.t-dot:nth-child(2) { animation-delay: .14s; }
.t-dot:nth-child(3) { animation-delay: .28s; }

.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 24px; }
.chat-empty img { width: 68px; height: 68px; opacity: .22; filter: drop-shadow(0 0 20px rgba(212,43,43,.5)); margin-bottom: 18px; }
.chat-empty h3 { font-size: 1.3rem; margin-bottom: 8px; }
.chat-empty p  { font-size: .845rem; max-width: 300px; }

.chat-input-wrap { padding: 12px 18px 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg1); flex-shrink: 0; }
.input-box { display: flex; align-items: flex-end; gap: 7px; background: var(--bg3); border: 1.5px solid var(--line2); border-radius: var(--r3); padding: 3px 3px 3px 14px; transition: border-color var(--tr), box-shadow var(--tr); }
.input-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(212,43,43,.1); }
.chat-ta { flex: 1; background: none; border: none; color: var(--white); font-family: var(--font-b); font-size: .88rem; resize: none; outline: none; min-height: 40px; max-height: 180px; padding: 10px 0; line-height: 1.52; }
.chat-ta::placeholder { color: var(--txt3); }
.send-btn { width: 36px; height: 36px; background: var(--red); border: none; border-radius: var(--r2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; font-size: .82rem; transition: all var(--tr); flex-shrink: 0; align-self: flex-end; margin-bottom: 1px; }
.send-btn:hover { background: var(--red-bright); box-shadow: 0 2px 14px var(--red-glow); }
.send-btn:disabled { opacity: .3; pointer-events: none; }
.input-note { font-size: .68rem; color: var(--txt3); text-align: center; margin-top: 7px; }

.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 199; backdrop-filter: blur(2px); }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
footer { background: var(--bg1); border-top: 1px solid var(--line); padding: 50px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 48px; margin-bottom: 36px; }
.footer-brand-desc { font-size: .84rem; color: var(--txt3); margin-top: 11px; max-width: 250px; line-height: 1.7; }
.footer-col h5 { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--txt3); margin-bottom: 13px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: .855rem; color: var(--txt2); transition: color var(--tr); }
.footer-col a:hover { color: var(--red-bright); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: .78rem; color: var(--txt3); }

/* ════════════════════════════════
   UTILS
════════════════════════════════ */
.text-center { text-align: center; }
.text-red    { color: var(--red-bright) !important; }
.text-muted  { color: var(--txt3) !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; }

/* ════════════════════════════════
   ANIMATIONS
════════════════════════════════ */
@keyframes blink    { 0%,100%{opacity:1}50%{opacity:.25} }
@keyframes float    { 0%,100%{transform:translateY(0)}50%{transform:translateY(-13px)} }
@keyframes spin     { to{transform:rotate(360deg)} }
@keyframes typeBounce { 0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)} }
@keyframes msgIn    { from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)} }
@keyframes spinLoader { to{transform:rotate(360deg)} }
.spinning { animation: spinLoader .7s linear infinite; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .plans-row     { grid-template-columns: 1fr; max-width: 400px; }
}
@media (max-width: 900px) {
  .hero-inner    { display: flex !important; flex-direction: column !important; gap: 40px; }
  .hero-content  { order: 1 !important; width: 100%; }
  .hero-visual   { order: 2 !important; display: flex !important; justify-content: center; width: 100%; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-center, .nav-right .btn { display: none; }
  .hamburger { display: flex; }
  .hero { padding: calc(var(--nav-h) + 44px) 0 52px; text-align: center; }
  .hero h1 em::before { display: none; }
  .hero-desc { margin: 16px auto 28px; max-width: 480px; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; gap: 20px; }
  .section { padding: 60px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  /* Chat */
  .chat-layout { grid-template-columns: 1fr; height: 100vh; height: 100dvh; }
  .chat-sidebar { position: fixed; top: 0; left: -100%; width: 280px; max-width: 82vw; height: 100vh; height: 100dvh; z-index: 200; transition: left .25s ease; box-shadow: 4px 0 30px rgba(0,0,0,.6); }
  .chat-sidebar.open { left: 0; }
  .sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 199; }
  .sb-overlay.show { display: block; }
  .mob-sb-btn { display: flex; }

  .auth-card { padding: 30px 20px; }
  .payment-card { padding: 26px 18px; }
  .coin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 2.7rem; }
  .btn-lg { height: 46px; padding: 0 22px; }
}
