/* ============================================================
   DNF复古 · 全站客服框架（fugu-kefu.css）
   ------------------------------------------------------------
   「旧票根」语言：朱红 tab + 米黄纸面板 + 双线票框。
   独立组件，不依赖 dnf86-base.css。音乐播放器在左下角，
   本组件固定在右侧，互不遮挡。
   ============================================================ */

.fgk { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; color: #1f1a15; }

/* ---------- 右侧垂直客服栏 ---------- */
.fgk-side {
  position: fixed; right: 20px; top: 50%;
  transform: translateY(-50%);
  z-index: 86; display: flex; align-items: center; gap: 12px;
  transition: transform .38s cubic-bezier(.2,.7,.3,1);
}
.fgk-side.collapsed { transform: translateY(-50%) translateX(calc(100% - 52px)); }

.fgk-panel {
  width: 268px; max-width: calc(100vw - 88px);
  background: #fbf7ee; border: 1px solid rgba(31,26,21,.3);
  outline: 1px solid rgba(31,26,21,.14); outline-offset: -5px;
  border-radius: 8px; padding: 16px 16px 14px;
  box-shadow: 0 24px 54px -24px rgba(52,38,22,.85);
  opacity: 0; transform: translateX(10px); visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.fgk-side:not(.collapsed) .fgk-panel { opacity: 1; transform: none; visibility: visible; }

.fgk-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px 10px;
  border-bottom: 2px solid #1f1a15;
}
.fgk-panel-title { font-size: 15px; font-weight: 900; letter-spacing: .02em; }
.fgk-panel-close {
  width: 24px; height: 24px; border: 1px solid rgba(31,26,21,.24);
  background: transparent; color: #3b332a; border-radius: 3px; cursor: pointer;
  font-size: 12px; line-height: 1;
}
.fgk-panel-close:hover { background: #b5372a; border-color: #b5372a; color: #fff6e6; }

.fgk-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px; margin-bottom: 8px;
  background: rgba(181,55,42,.05); border: 1px solid rgba(181,55,42,.16);
  border-radius: 6px;
}
.fgk-row-icon { font-size: 20px; flex: none; }
.fgk-row-info { flex: 1; min-width: 0; }
.fgk-row-label { font-size: 11px; color: #6d6357; margin-bottom: 2px; }
.fgk-row-value { font-size: 14px; font-weight: 700; color: #1f1a15; word-break: break-all; }
.fgk-row-copy {
  width: 28px; height: 28px; flex: none; border-radius: 5px;
  background: rgba(181,55,42,.12); border: 1px solid rgba(181,55,42,.3);
  color: #8d281e; cursor: pointer; display: grid; place-items: center;
  font-size: 11px;
}
.fgk-row-copy:hover { background: #b5372a; border-color: #b5372a; color: #fff6e6; }
.fgk-row-copy svg { width: 14px; height: 14px; }
.fgk-empty { font-size: 12.5px; color: #6d6357; text-align: center; padding: 10px 0; line-height: 1.7; }

/* 垂直 tab */
.fgk-tab {
  position: relative; width: 44px; height: 148px; border: 0; cursor: pointer;
  background: linear-gradient(160deg, #c9422f, #8d281e);
  color: #fff6e6; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 0; box-shadow: 0 12px 26px -12px rgba(141,40,30,.9);
  transition: transform .2s ease;
}
.fgk-tab:hover { transform: translateX(-3px); }
.fgk-tab-ico { width: 20px; height: 20px; }
.fgk-tab-ico svg { width: 20px; height: 20px; }
.fgk-tab-text { font-size: 12px; letter-spacing: 4px; writing-mode: vertical-rl; font-weight: 700; }
.fgk-dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: #4a6b34; box-shadow: 0 0 8px #4a6b34; animation: fgkPulse 1.6s ease-in-out infinite;
}
@keyframes fgkPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

/* ---------- 回到顶部 ---------- */
.fgk-top {
  position: fixed; right: 26px; bottom: 96px; z-index: 84;
  width: 42px; height: 42px; border-radius: 50%;
  background: #fbf7ee; border: 1px solid rgba(31,26,21,.22); color: #3b332a;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 24px -12px rgba(52,38,22,.7);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.fgk-top.show { opacity: 1; transform: none; pointer-events: auto; }
.fgk-top:hover { background: #b5372a; border-color: #b5372a; color: #fff6e6; }
.fgk-top svg { width: 18px; height: 18px; }

/* ---------- 右下角客服 FAB ---------- */
.fgk-fabwrap { position: fixed; right: 24px; bottom: 24px; z-index: 85; }
.fgk-fab {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 13px 22px 13px 16px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #c9422f, #a52c20);
  color: #fff6e6; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .03em;
  box-shadow: 0 12px 30px -10px rgba(141,40,30,.95), 0 4px 0 #7c2319;
  transition: transform .2s ease, box-shadow .2s ease;
}
.fgk-fab:hover { transform: translateY(-3px); }
.fgk-fab-dot {
  position: absolute; top: 2px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: #fff6e6; box-shadow: 0 0 8px #fff6e6; animation: fgkPulse 1.6s ease-in-out infinite;
}
.fgk-fab-ico { width: 20px; height: 20px; display: grid; place-items: center; }
.fgk-fab-ico svg { width: 20px; height: 20px; }
.fgk-fab-close { display: none; }
.fgk-fab.on .fgk-fab-ico { display: none; }
.fgk-fab.on .fgk-fab-close { display: grid; }

/* 气泡 */
.fgk-bubble {
  position: absolute; right: 0; bottom: 68px;
  max-width: 220px; padding: 9px 14px;
  background: #fbf7ee; border: 1px solid rgba(31,26,21,.24); border-radius: 8px;
  font-size: 13px; color: #1f1a15; box-shadow: 0 10px 26px -12px rgba(52,38,22,.7);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .28s ease, transform .28s ease;
}
.fgk-bubble::after {
  content: ""; position: absolute; right: 22px; bottom: -6px;
  width: 10px; height: 10px; background: #fbf7ee;
  border-right: 1px solid rgba(31,26,21,.24); border-bottom: 1px solid rgba(31,26,21,.24);
  transform: rotate(45deg);
}
.fgk-fabwrap:hover .fgk-bubble { opacity: 1; transform: none; }

@media (max-width: 640px) {
  .fgk-side { right: 12px; }
  .fgk-side.collapsed { transform: translateY(-50%) translateX(calc(100% - 46px)); }
  .fgk-tab { width: 40px; height: 128px; }
  .fgk-fabwrap { right: 14px; bottom: 14px; }
  .fgk-top { right: 16px; bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .fgk-dot, .fgk-fab-dot { animation: none; }
}
