/* ============================================================
   GameCloud · 站内内容管理（右上角设置 → 点文字直接编辑）
   组件：设置按钮 / 状态面板 / 浮动格式工具条 / 提示
   ============================================================ */

/* ---------- 设置按钮（顶栏右侧） ---------- */
.gc-gear {
  position: relative;
  width: 42px; height: 42px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(120, 180, 255, 0.04);
  color: var(--txt-2);
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}
.gc-gear:hover { color: #fff; border-color: var(--line-strong); background: rgba(120, 180, 255, 0.1); }
.gc-gear svg { width: 19px; height: 19px; }
.gc-gear.is-on,
.gc-gear[aria-expanded="true"] {
  color: #fff;
  border-color: var(--line-strong);
  background: rgba(77, 240, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(77, 240, 255, 0.1), 0 0 18px -6px var(--glow-cy);
}
.gc-gear-badge {
  position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cy); box-shadow: 0 0 8px var(--glow-cy);
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gc-gear.is-on .gc-gear-badge { opacity: 1; transform: scale(1); }

/* ---------- 设置面板（右上角下拉） ---------- */
.gc-panel {
  position: fixed; z-index: 3000; width: 288px;
  background: rgba(10, 19, 33, 0.96);
  border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 10px;
  transform-origin: top right;
  animation: gcPop 0.16s ease;
}
@keyframes gcPop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gc-panel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 10px; border-bottom: 1px solid var(--line-soft);
}
.gc-panel-head svg { width: 17px; height: 17px; color: var(--cy); flex: 0 0 auto; }
.gc-panel-head b { font-family: var(--font-tech); font-size: 13px; font-weight: 600; color: var(--txt-1); letter-spacing: 0.06em; }
.gc-panel-head small { margin-left: auto; color: var(--txt-3); font-size: 11px; }

.gc-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px; margin-top: 6px;
  border-radius: 10px; text-align: left; cursor: pointer;
  transition: background 0.18s ease;
}
.gc-row:hover { background: rgba(120, 180, 255, 0.08); }
.gc-row .gc-row-ic {
  width: 32px; height: 32px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(120, 180, 255, 0.1); color: var(--txt-2);
}
.gc-row .gc-row-ic svg { width: 16px; height: 16px; }
.gc-row-txt { flex: 1 1 auto; min-width: 0; }
.gc-row-txt b { display: block; font-size: 13px; font-weight: 600; color: var(--txt-1); line-height: 1.35; }
.gc-row-txt span { display: block; font-size: 11px; color: var(--txt-3); line-height: 1.45; margin-top: 1px; }
.gc-row.danger .gc-row-ic { background: rgba(255, 92, 120, 0.12); color: #ff8095; }
.gc-row.danger .gc-row-txt b { color: #ffb3bf; }
.gc-row.danger:hover { background: rgba(255, 92, 120, 0.07); }
.gc-row.disabled { opacity: 0.42; cursor: not-allowed; pointer-events: none; }
.gc-row.disabled:hover { background: transparent; }

/* 开关 */
.gc-switch {
  position: relative; width: 38px; height: 21px; flex: 0 0 auto;
  border-radius: 999px; background: #1c2b40; transition: background 0.22s ease;
}
.gc-switch i {
  position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #7d93ad; transition: left 0.22s ease, background 0.22s ease;
}
.gc-switch.on { background: linear-gradient(100deg, #19b8dc, #3d7bff); }
.gc-switch.on i { left: 19px; background: #fff; }

.gc-panel-note {
  padding: 8px 10px 2px; font-size: 11px; line-height: 1.6; color: var(--txt-3);
}

/* ---------- 编辑态：可编辑文字的悬停提示 ---------- */
body.gc-edit { cursor: default; }
body.gc-edit .gc-editable {
  outline: 1.5px dashed rgba(77, 240, 255, 0.5);
  outline-offset: 3px;
  border-radius: 4px;
  transition: background 0.15s ease;
}
body.gc-edit .gc-editable:hover { background: rgba(77, 240, 255, 0.07); }
.gc-editing,
body.gc-edit .gc-editable.gc-editing,
.gc-editing:focus {
  outline: 2px solid var(--cy) !important;
  outline-offset: 3px !important;
  background: rgba(77, 240, 255, 0.06) !important;
  box-shadow: 0 0 0 6px rgba(77, 240, 255, 0.12);
  border-radius: 6px;
  cursor: text;
}

/* ---------- 浮动格式工具条（仿需求图） ---------- */
.gc-toolbar {
  position: fixed; z-index: 3100;
  display: flex; align-items: center; gap: 2px;
  padding: 5px 6px;
  background: #ffffff;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  box-shadow: 0 18px 48px -12px rgba(8, 16, 32, 0.32), 0 4px 14px rgba(8, 16, 32, 0.1);
  color: #22304a;
  user-select: none;
  -webkit-user-select: none;
  animation: gcTbIn 0.14s ease;
}
@keyframes gcTbIn {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gc-tb-sep { width: 1px; height: 20px; margin: 0 4px; background: #e2e7f0; flex: 0 0 auto; }

.gc-tb-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; min-width: 30px; padding: 0 7px;
  border-radius: 8px; color: #22304a; font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.gc-tb-btn:hover { background: #eef2f8; }
.gc-tb-btn.on { background: #e4efff; color: #1c6fe0; }
.gc-tb-btn svg { width: 15px; height: 15px; }
.gc-tb-btn .chev { margin-left: 3px; width: 11px; height: 11px; opacity: 0.65; }
.gc-tb-btn.bold { font-weight: 800; font-size: 15px; letter-spacing: 0.02em; font-family: Georgia, "Times New Roman", serif; }
.gc-tb-btn.danger:hover { background: #ffecef; color: #d2334d; }
.gc-tb-btn[disabled] { opacity: 0.35; pointer-events: none; }

/* 字号步进器 − 11 + */
.gc-tb-step { display: flex; align-items: center; gap: 2px; height: 30px; }
.gc-tb-step button {
  width: 24px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #22304a; font-size: 16px; line-height: 1; transition: background 0.15s ease;
}
.gc-tb-step button:hover { background: #eef2f8; }
.gc-tb-num {
  width: 44px; height: 30px; margin: 0 2px;
  text-align: center; font-size: 13px; font-weight: 600;
  color: #22304a; background: #f6f8fc; border: 1px solid #dfe5ef; border-radius: 8px;
  -moz-appearance: textfield; appearance: textfield;
}
.gc-tb-num::-webkit-outer-spin-button,
.gc-tb-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gc-tb-num:focus { outline: none; border-color: #7aa7ff; background: #fff; }

/* 工具条内下拉菜单 */
.gc-tb-menu {
  position: fixed; z-index: 3150; min-width: 168px;
  background: #ffffff; border: 1px solid #e0e6f0; border-radius: 12px;
  padding: 6px; box-shadow: 0 18px 44px -14px rgba(8, 16, 32, 0.28);
  animation: gcPop2 0.13s ease;
}
@keyframes gcPop2 {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gc-tb-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: #22304a; text-align: left; transition: background 0.14s ease;
}
.gc-tb-menu button:hover { background: #f0f4fa; }
.gc-tb-menu button.sel { color: #1c6fe0; background: #eaf2ff; }
.gc-tb-menu button svg { width: 14px; height: 14px; flex: 0 0 auto; opacity: 0.8; }
.gc-tb-menu button em { margin-left: auto; font-style: normal; font-size: 11px; color: #9aa7bd; }
.gc-tb-menu .tb-menu-title {
  padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: #9aa7bd; text-transform: uppercase;
}

/* 对齐预览图标（SVG 行） */
.gc-tb-al-opt { display: flex; align-items: center; gap: 10px; width: 100%; }
.gc-tb-al-opt svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- 轻提示 Toast ---------- */
.gc-toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 3400;
  transform: translate(-50%, 16px);
  padding: 10px 20px; border-radius: 999px;
  font-size: 13px; color: #eaf6ff;
  background: rgba(10, 20, 34, 0.94); border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.gc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
  .gc-panel { width: min(288px, calc(100vw - 24px)); }
  .gc-toolbar { max-width: calc(100vw - 16px); overflow-x: auto; }
  .gc-tb-step .gc-tb-num { width: 40px; }
}
