/* Galaxy Star — AI 聊天对话框样式 (配色对齐官网 cyan/red/violet) */
:root{
  --gs-cyan:#25f4ee; --gs-red:#fe2c55; --gs-violet:#8b7bd8;
  --gs-panel:#0e0f1a; --gs-panel-2:#161829; --gs-line:rgba(255,255,255,.1);
  --gs-text:#eef0f6; --gs-muted:#9aa0b4;
}

/* 悬浮启动按钮(复用 .chat-fab,确保是按钮态) */
button.chat-fab{ border:0; cursor:pointer; font:inherit; }

/* 面板 */
.gs-chat{
  position:fixed; right:20px; bottom:20px; z-index:1000;
  width:min(380px, calc(100vw - 32px)); height:min(560px, calc(100vh - 110px));
  display:flex; flex-direction:column; overflow:hidden;
  background:var(--gs-panel); color:var(--gs-text);
  border:1px solid var(--gs-line); border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  transform:translateY(16px) scale(.98); opacity:0; pointer-events:none;
  transition:transform .18s ease, opacity .18s ease;
}
.gs-chat.open{ transform:translateY(0) scale(1); opacity:1; pointer-events:auto; }

.gs-chat__head{
  display:flex; align-items:center; gap:10px; padding:14px 16px;
  background:linear-gradient(135deg, rgba(37,244,238,.14), rgba(254,44,85,.14));
  border-bottom:1px solid var(--gs-line);
}
.gs-chat__dot{ width:9px; height:9px; border-radius:50%; background:var(--gs-cyan);
  box-shadow:0 0 10px var(--gs-cyan); }
.gs-chat__title{ font-weight:700; font-size:15px; }
.gs-chat__sub{ font-size:11px; color:var(--gs-muted); }
.gs-chat__close{ margin-left:auto; background:transparent; border:0; color:var(--gs-muted);
  cursor:pointer; font-size:20px; line-height:1; padding:4px; }
.gs-chat__close:hover{ color:var(--gs-text); }

.gs-chat__body{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.gs-msg{ max-width:85%; padding:10px 13px; border-radius:14px; font-size:14px; line-height:1.5;
  white-space:pre-wrap; word-wrap:break-word; }
.gs-msg.bot{ align-self:flex-start; background:var(--gs-panel-2); border:1px solid var(--gs-line);
  border-bottom-left-radius:4px; }
.gs-msg.user{ align-self:flex-end;
  background:linear-gradient(135deg, var(--gs-cyan), var(--gs-violet)); color:#0b0c14;
  font-weight:500; border-bottom-right-radius:4px; }
.gs-msg.err{ align-self:flex-start; background:rgba(254,44,85,.12);
  border:1px solid rgba(254,44,85,.35); color:#ffd3dd; }

.gs-typing{ align-self:flex-start; display:flex; gap:4px; padding:12px 14px; }
.gs-typing span{ width:7px; height:7px; border-radius:50%; background:var(--gs-muted);
  animation:gsb 1s infinite; }
.gs-typing span:nth-child(2){ animation-delay:.15s; } .gs-typing span:nth-child(3){ animation-delay:.3s; }
@keyframes gsb{ 0%,60%,100%{ opacity:.3; transform:translateY(0);} 30%{ opacity:1; transform:translateY(-3px);} }

.gs-chat__foot{ border-top:1px solid var(--gs-line); padding:10px 12px; background:var(--gs-panel); }
.gs-turnstile{ display:flex; justify-content:center; margin-bottom:8px; min-height:0; }
.gs-chat__row{ display:flex; gap:8px; align-items:flex-end; }
.gs-chat__input{ flex:1; resize:none; max-height:90px; min-height:40px;
  background:var(--gs-panel-2); color:var(--gs-text); border:1px solid var(--gs-line);
  border-radius:12px; padding:10px 12px; font:inherit; font-size:14px; outline:none; }
.gs-chat__input:focus{ border-color:var(--gs-cyan); }
.gs-chat__send{ flex:0 0 auto; width:40px; height:40px; border-radius:12px; border:0; cursor:pointer;
  background:linear-gradient(135deg, var(--gs-cyan), var(--gs-red)); color:#0b0c14;
  display:grid; place-items:center; }
.gs-chat__send:disabled{ opacity:.45; cursor:not-allowed; }
.gs-chat__hint{ font-size:10px; color:var(--gs-muted); text-align:center; margin-top:6px; }
.gs-chat__hint a{ color:var(--gs-cyan); text-decoration:none; }

@media (max-width:480px){
  .gs-chat{ right:8px; left:8px; width:auto; bottom:8px; height:min(70vh, 560px); }
}

/* ---- 快捷问题按钮 ---- */
.gs-sugs{ display:flex; flex-wrap:wrap; gap:.45rem; margin:.25rem 0 .4rem; }
.gs-sug{
  border:1px solid rgba(37,244,238,.45); background:rgba(37,244,238,.07); color:#d9fffd;
  font:inherit; font-size:.78rem; font-weight:600; line-height:1.2;
  padding:.48rem .85rem; border-radius:999px; cursor:pointer;
  transition:background .2s ease, border-color .2s ease, transform .2s ease;
}
.gs-sug:hover{ background:rgba(37,244,238,.16); border-color:#25f4ee; transform:translateY(-1px); }
.gs-sug:active{ transform:none; }

/* 气泡内链接 */
.gs-msg a{ color:#25f4ee; text-decoration:underline; text-underline-offset:2px; font-weight:600; }
.gs-msg a:hover{ color:#7ff9f5; }
