/* gaokun.net 聊天气泡部件 */
#gk-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(88,166,255,.35);
  transition: all .25s;
}
#gk-chat-btn:hover { transform: scale(1.1); filter: brightness(1.1); }

#gk-chat-panel {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9998;
  width: 360px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
}

#gk-chat-panel.open { display: flex; }

#gk-chat-header {
  padding: 14px 16px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#gk-chat-header span { font-weight: 600; font-size: 14px; color: var(--text); }
#gk-chat-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
}

#gk-chat-msgs {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  min-height: 200px;
  max-height: 340px;
}

.gk-msg {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 85%;
  word-break: break-word;
}
.gk-msg.user {
  background: rgba(88,166,255,.13);
  border: 1px solid rgba(88,166,255,.27);
  margin-left: auto;
}
.gk-msg.bot {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  margin-right: auto;
}
.gk-msg .name { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }

#gk-chat-input-area {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg);
}
#gk-chat-input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--input-text);
  font-size: 13px;
  outline: none;
  resize: none;
  min-height: 36px;
  max-height: 80px;
}
#gk-chat-input:focus { border-color: var(--accent); }
#gk-send {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  transition: filter .2s;
}
#gk-send:hover { filter: brightness(1.15); }
#gk-send:disabled { background: var(--border); cursor: not-allowed; }

.gk-loading { color: var(--text-dim); font-style: italic; font-size: 12px; padding: 8px 0; }

@media (max-width: 480px) {
  #gk-chat-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
    max-height: 70vh;
  }
}
