/*
Theme Name: MC 服务器推荐
Theme URI: https://localhost:8080
Author: 我的世界服务器.com
Description: 我的世界服务器推荐平台主题，顶级撞色风格（#5E55A2 + #91C53A）。
Version: 2.0.0
Requires at least: 6.0
License: GPL-2.0-or-later
*/

/* 顶级撞色风格：#5E55A2（紫罗兰） + #91C53A（黄绿） */
:root {
  --primary: #5E55A2;
  --primary-dark: #4a4385;
  --accent: #91C53A;
  --accent-dark: #76a029;
  --bg: #f5f6fa;
  --card: #ffffff;
  --text: #2b2b3a;
  --muted: #8a8a9a;
  --border: #e6e7ef;
  --danger: #e65c6b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* ---------- 顶部导航 ---------- */
.navbar {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(74, 67, 133, 0.35);
}
.brand {
  font-size: 21px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.brand .hl {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(145,197,58,0.9);
}
.brand .com {
  display: inline-block;
  color: var(--accent);
  font-weight: 900;
  animation: glowPulse 1.8s ease-in-out infinite;
}
.nav-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-links a {
  color: #fff; font-weight: 600; padding: 6px 12px;
  border-radius: 8px; transition: background 0.2s, transform 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.18); color: #fff; transform: translateY(-1px); }
.nav-links a.btn-accent {
  background: var(--accent); color: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(145,197,58,0.5);
}
.nav-links .user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; opacity: 1; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: 999px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22);
  transition: background 0.2s, transform 0.2s;
}
.nav-links .user-chip:hover { background: rgba(255,255,255,0.26); transform: translateY(-1px); }
.user-chip-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); background: rgba(255,255,255,0.2); }
.user-chip-avatar.default { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: var(--primary); }
.user-chip-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 70px 20px;
  background: linear-gradient(140deg, #2a2560 0%, var(--primary-dark) 45%, #3b3473 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  animation: heroZoom 24s ease-in-out infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(20,17,54,0.55) 100%);
}
.hero-content { position: relative; z-index: 2; animation: fadeUp 0.9s ease both; }
.hero-title {
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  line-height: 1.2;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35));
}
.hero-title .grad {
  background: linear-gradient(90deg, var(--accent), #d6f78a, var(--accent));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}
.hero-title .com {
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  text-shadow: 0 0 18px rgba(145,197,58,0.9);
  animation: glowPulse 1.8s ease-in-out infinite;
}
.hero-sub {
  margin-top: 14px;
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 2px;
  font-weight: 600;
}
.hero-sub::after { content: "▌"; margin-left: 4px; color: var(--accent); animation: blink 1s steps(2) infinite; }

/* 漂浮的 MC 方块 */
.cube {
  position: absolute;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  opacity: 0.28;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
  animation: floatCube 7s ease-in-out infinite;
}
.cube.purple { background: linear-gradient(135deg, #8f86cf, var(--primary)); }
.cube.small { width: 20px; height: 20px; border-radius: 5px; }
.cube.big { width: 52px; height: 52px; border-radius: 10px; }

/* ---------- 首页滚动公告 ---------- */
.notice-bar {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-bottom: 2px solid var(--accent);
}
.notice-label {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--accent);
  color: #26330f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}
.notice-viewport {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.notice-track {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  white-space: nowrap;
  animation: noticeScroll linear infinite;
  will-change: transform;
}
.notice-bar:hover .notice-track { animation-play-state: paused; }
.notice-item {
  padding: 0 18px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #eeebff;
}
.notice-item::after {
  content: "◆";
  margin-left: 18px;
  font-size: 9px;
  color: var(--accent);
  vertical-align: 1px;
}
@keyframes noticeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 容器 ---------- */
.container { max-width: 960px; margin: 26px auto; padding: 0 16px; }

/* ---------- 提示消息 ---------- */
#flash { max-width: 960px; margin: 16px auto 0; padding: 0 16px; position: relative; z-index: 40; }
#flash .msg {
  padding: 11px 14px; border-radius: 10px; margin-bottom: 8px; font-weight: 600;
  animation: slideDown 0.3s ease both;
}
#flash .msg.success { background: #eef7e2; color: #4f7a12; border: 1px solid var(--accent); }
#flash .msg.error { background: #fdecee; color: #a03040; border: 1px solid #e58a96; }
#flash .msg.info { background: #eceeff; color: var(--primary-dark); border: 1px solid var(--primary); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(94,85,162,0.08);
  animation: fadeUp 0.5s ease both;
}
.card.hoverable {
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.card.hoverable:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(94,85,162,0.22);
  border-color: var(--accent);
}

h1, h2, h3 { color: var(--primary-dark); margin-bottom: 12px; }

/* ---------- 服务器列表（带图） ---------- */
.server-card { display: flex; gap: 16px; align-items: center; }
.server-thumb {
  width: 190px; height: 122px; object-fit: contain; background: #e8eaf2; border-radius: 10px;
  flex-shrink: 0; transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.card.hoverable:hover .server-thumb {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(94,85,162,0.35);
}
.server-info { flex: 1; min-width: 0; }
.server-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.server-title { font-size: 18px; font-weight: 800; color: var(--primary-dark); }
.meta { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.tag { background: var(--accent); color: var(--primary-dark); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tag.purple { background: var(--primary); color: #fff; }
.desc { margin-top: 8px; color: #555565; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.count-badge { background: #eceeff; color: var(--primary); font-weight: 700; font-size: 13px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }

/* ---------- 星级评分（SVG 平滑星） ---------- */
.mc-stars { display: inline-flex; align-items: center; gap: 4px; }
.mc-stars i { color: #555565; font-style: normal; font-size: 13px; font-weight: 700; margin-left: 4px; }
.mc-stars-wrap { position: relative; display: inline-flex; font-size: 0; line-height: 0; vertical-align: -1px; }
.mc-stars-row { display: inline-flex; white-space: nowrap; }
.mc-star { width: 15px; height: 15px; display: block; flex: 0 0 auto; }
.mc-stars-bg .mc-star path { fill: #e2e2ea; }
.mc-stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; justify-content: flex-start; }
.mc-stars-fill .mc-star path { fill: #f5a623; }
.mc-stars-sm .mc-star { width: 12px; height: 12px; }
.mc-stars-sm i { font-size: 11px; }
.mc-rating { display: inline-flex; align-items: center; gap: 6px; color: #555565; font-size: 13px; font-weight: 700; }
.mc-rating b { font-weight: 700; }
.mc-detail-rating { display: flex; align-items: center; gap: 6px; margin-top: 12px; color: #555565; font-size: 14px; font-weight: 700; }
.mc-detail-rating b { font-weight: 700; }
.mc-rate { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.mc-rate-tip { color: #999; font-size: 13px; }
.mc-rate-tip.rated { color: #2e9e5b; font-weight: 700; }
#rating-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 评分弹窗 */
.mc-rate-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(20, 18, 40, .45); padding: 16px; }
.mc-rate-box { background: #fff; border-radius: 14px; padding: 20px; max-width: 420px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.mc-rate-box-title { font-weight: 700; font-size: 16px; color: var(--primary); margin-bottom: 12px; }
.mc-rate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-height: 180px; overflow: auto; }
.mc-rate-chip { padding: 7px 0; border: 1px solid #d7d7e0; border-radius: 8px; font-size: 13px; background: #fff; color: #333348; cursor: pointer; text-align: center; transition: all .12s; }
.mc-rate-chip:hover { border-color: var(--primary); color: var(--primary); }
.mc-rate-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.mc-rate-picked { margin: 12px 0 0; color: #555565; font-size: 14px; }
.mc-rate-picked b { color: #f5a623; font-weight: 800; }
.mc-rate-box-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------- 详情大图 ---------- */
.detail-card { padding: 24px; }
.detail-card .detail-banner {
  width: 100%; height: 240px; object-fit: contain; background: #e8eaf2;
  border-radius: 14px; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(94,85,162,0.25);
  animation: fadeUp 0.6s ease both;
}
/* 详情页内容分区（风景图 / 宣传视频），统一放进同一张卡片内 */
.detail-section { border-top: 1px dashed var(--border); margin-top: 20px; padding-top: 18px; }
.detail-section h2 { margin: 0 0 14px; font-size: 18px; color: var(--primary-dark); }
.detail-video .bili-embed { overflow: hidden; border-radius: 12px; }
/* 哔哩哔哩视频嵌入 */
.video-card { padding: 0; overflow: hidden; margin-bottom: 16px; }
.bili-embed { position: relative; width: 100%; padding-top: 56.25%; }
.bili-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block;
}

/* 详情页在线人数曲线 */
.online-chart-card { margin-top: 16px; }
.oc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.oc-head h2 { margin: 0; font-size: 18px; color: var(--primary-dark); }
.oc-tabs { display: flex; gap: 6px; }
.oc-tab {
  border: 1px solid var(--border); background: #fff; color: #666;
  border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.oc-tab.active { border-color: var(--primary); color: var(--primary); background: #f3f1fa; font-weight: 700; }
.oc-now { margin: 8px 0 2px; font-size: 13px; color: #888; }
.oc-now b { color: var(--accent-dark); }
.oc-body { margin-top: 4px; }
.oc-empty { padding: 28px 0; text-align: center; color: #999; font-size: 14px; }
.oc-chart-wrap { position: relative; }
.oc-tip {
  position: absolute; z-index: 5; display: none; pointer-events: none;
  background: #2b2540; color: #fff; font-size: 12px; line-height: 1.4;
  padding: 5px 9px; border-radius: 7px; white-space: nowrap;
  transform: translate(-50%, -100%); box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.oc-tip b { color: #c7e58d; }
.oc-chart-wrap svg { display: block; cursor: crosshair; }

/* ---------- 表单 ---------- */
.form-card { max-width: 460px; margin: 40px auto; }
.form-card.wide { max-width: 640px; }
label { display: block; margin: 14px 0 6px; font-weight: 600; color: var(--primary-dark); }
input[type="text"], input[type="password"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 9px; font-size: 15px; font-family: inherit; color: var(--text); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(94,85,162,0.15);
}
textarea { min-height: 100px; resize: vertical; }

.btn {
  display: inline-block; border: none; cursor: pointer; font-size: 15px; font-weight: 700;
  padding: 10px 22px; border-radius: 9px; transition: filter 0.15s, transform 0.15s, box-shadow 0.15s;
  font-family: inherit; margin-top: 18px;
}
.btn:hover { filter: brightness(0.95); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  box-shadow: 0 4px 14px rgba(94,85,162,0.35);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(145,197,58,0.35);
}
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- 评论 ---------- */
.comment-thread { margin-top: 4px; }
.comment-item { border-left: 3px solid var(--accent); padding: 10px 14px; margin-bottom: 12px; background: #fafbf6; border-radius: 6px; }
.comment-item.reply { border-left-color: var(--primary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: #f6f5fd; }
.comment-head { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.comment-head b { color: var(--primary); }
.comment-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.comment-actions { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.reply-link { font-size: 13px; color: var(--primary); text-decoration: none; }
.reply-link:hover { color: var(--accent-dark); text-decoration: underline; }
.reply-toggle { font-size: 13px; color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.reply-toggle:hover { color: var(--primary); text-decoration: underline; }
.tag-sm { font-size: 11px; padding: 1px 6px; margin-left: 6px; }
.reply-box { margin-top: 8px; }
.reply-input { width: 100%; min-height: 56px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--text); background: #fff; resize: vertical; }
.reply-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(94, 85, 162, 0.15); }
.reply-actions { display: flex; gap: 8px; margin-top: 8px; }
.comment-item + .comment-children { margin-top: -4px; }
.comment-children.collapsed { display: none; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }

/* ---------- 列表分类标签（官方推荐 / 用户发布） ---------- */
.list-tabs {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.list-tab {
  position: relative;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
  font-family: inherit;
  padding: 10px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.list-tab:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.list-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(94, 85, 162, 0.35);
}

/* 排序下拉 */
.sort-wrap { position: relative; margin-left: auto; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--border); background: #fff;
  color: var(--primary-dark); font-size: 14px; font-weight: 700;
  font-family: inherit; padding: 8px 14px; border-radius: 8px;
  cursor: pointer; transition: all .2s ease;
}
.sort-btn:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(94,85,162,.18); }
.sort-caret { color: var(--primary); font-size: 11px; }
.sort-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  min-width: 150px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(30,30,60,.16);
  padding: 6px; display: none; flex-direction: column;
}
.sort-menu.open { display: flex; }
.sort-option {
  border: 0; background: transparent; text-align: left;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); padding: 8px 12px; border-radius: 6px;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.sort-option:hover { background: #f2f1ff; color: var(--primary); }
.sort-option.active { background: var(--primary); color: #fff; }

/* 筛按钮：紧挨排序按钮左侧，不占右对齐 */
.filter-wrap { margin-left: 0; }
.filter-menu { min-width: 172px; }
.filter-group-title {
  padding: 8px 12px 5px; font-size: 11px; font-weight: 800;
  color: var(--primary); letter-spacing: .5px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.filter-group-title:not(:first-child) { margin-top: 6px; }

/* 悬浮提示气泡 */
.tab-tip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  background: rgba(43, 43, 58, 0.95);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 30;
  pointer-events: none;
}
.tab-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
}
/* 提示气泡统一显示在上方 */
.tab-tip.down,
.tab-tip.up { bottom: calc(100% + 10px); }
.tab-tip.down::after,
.tab-tip.up::after { bottom: -12px; border-top-color: rgba(43, 43, 58, 0.95); }
.list-tab:hover .tab-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
}

/* ---------- 管理页 ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.switch-label { font-weight: 700; color: var(--primary-dark); }
.switch-desc { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 52px; height: 28px; flex-shrink: 0; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #d5d7e2; border-radius: 28px; transition: 0.2s; cursor: pointer; }
.slider::before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(24px); }

table.list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list-table th, .list-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.list-table th { color: var(--primary-dark); font-weight: 700; }

.footer-note {
  text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0;
}
.footer-note b {
  color: var(--primary-dark);
}
.footer-note .com {
  color: var(--accent-dark); font-weight: 700;
  text-shadow: 0 0 8px rgba(145,197,58,0.6);
}
.ui-mode { font-size: 11px; color: var(--muted); opacity: 0.8; font-weight: 400; }
.footer-note .foot-stats { display: block; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.footer-note .foot-stats b { color: var(--primary-dark); }
.footer-note .foot-beian { display: block; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.footer-note .foot-beian a { color: var(--muted); text-decoration: none; }
.footer-note .foot-beian a:hover { color: var(--primary-dark); text-decoration: underline; }
.text-btn { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 13px; font-family: inherit; }
.text-btn:hover { text-decoration: underline; }

/* ---------- 点赞 / 点踩 ---------- */
.vote-group {
  display: inline-flex;
  gap: 8px;
  margin-top: 10px;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  margin-top: 0;
}
.vote-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}
.vote-btn .vote-num { font-variant-numeric: tabular-nums; }
.vote-btn.like.active {
  background: #eef7e2;
  border-color: var(--accent);
  color: var(--accent-dark);
}
.vote-btn.dislike.active {
  background: #fdecee;
  border-color: var(--danger);
  color: var(--danger);
}
.vote-group.bump { animation: bump 0.3s ease; }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ---------- 悬浮 + 多功能菜单按钮 ---------- */
.fab-wrapper {
  position: fixed;
  right: 28px;
  bottom: 30px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(94, 85, 162, 0.45);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
.fab-wrapper.show .fab,
.fab-wrapper:hover .fab {
  transform: translateY(-3px) rotate(90deg);
  box-shadow: 0 12px 30px rgba(94, 85, 162, 0.55);
}
.fab .plus {
  display: inline-block;
  transition: transform 0.3s;
}
.fab-wrapper.show .plus { transform: rotate(135deg); }

/* 悬浮菜单 放在按钮左边 不然它一占位置上面那颗星星就点不着了 */
.fab-menu {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(94, 85, 162, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  min-width: 150px;
}
.fab-wrapper.show .fab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.fab-item:hover { background: #eef2fd; color: var(--primary); }
.fab-item-icon { font-size: 16px; }
.fab-item-label { flex: 1; }

/* ---------- 收藏本站小星星 ---------- */
.fav-float {
  position: fixed;
  right: 34px;
  bottom: 102px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.fav-star {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #fff;
  color: var(--accent-dark);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 2px var(--accent), 0 6px 18px rgba(94, 85, 162, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.fav-star:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: inset 0 0 0 2px var(--accent), 0 10px 24px rgba(145, 197, 58, 0.5);
}
.fav-star.pop { animation: favPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes favPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-12deg); }
  55% { transform: scale(0.92) rotate(9deg); }
  80% { transform: scale(1.08) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}
.fav-bubble {
  position: relative;
  padding: 8px 12px;
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(94, 85, 162, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.3) translateY(12px);
  transform-origin: 100% 100%;
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.28s;
  pointer-events: none;
}
.fav-bubble::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(45deg);
}
.fav-float.show .fav-bubble {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.fav-star.done {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--accent), 0 6px 18px rgba(145, 197, 58, 0.45);
}
.fav-bubble.guide {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  white-space: normal;
}
.fav-tip-line { white-space: nowrap; }
.fav-copy {
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.fav-copy:hover { background: var(--accent); color: #26330f; transform: translateY(-1px); }
.fav-copy.ok { background: var(--accent); color: #26330f; }

/* ---------- 发布弹窗 ---------- */
.publish-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 25, 66, 0.55);
  backdrop-filter: blur(3px);
  z-index: 70;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  overflow-y: auto;
}
.publish-overlay.show { display: flex; animation: fadeUp 0.25s ease; }
.publish-modal {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease;
}
.publish-modal h2 { color: var(--primary-dark); margin: 0 0 4px; }
.publish-modal .modal-sub {
  color: var(--muted); font-size: 13px; margin-bottom: 8px;
}
.publish-modal textarea { min-height: 84px; }
.publish-modal .btn { margin-top: 16px; }

/* 发布表单：白名单勾选（覆盖通用 label 的行内样式） */
.fab-wl-label {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0 4px; font-weight: 500; color: var(--muted);
  background: #f7f7ff; border: 1.5px solid var(--border);
  padding: 9px 12px; border-radius: 9px; cursor: pointer; font-size: 13px;
}
.fab-wl-check, .remember-check {
  width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0;
}

/* 登录页：记住登录状态 */
.remember-label {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 0; font-weight: 500; color: var(--muted);
  cursor: pointer; font-size: 13px;
}
.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.fab-spacer { height: 0; }

/* ---------- 高级发布按钮（发布弹窗内） ---------- */
.fab-advanced-divider {
  position: relative;
  text-align: center;
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.fab-advanced-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}
.fab-advanced-divider span {
  position: relative;
  background: #fff;
  padding: 0 10px;
}
/* 封面上传 */
.fab-cover { display: flex; align-items: center; gap: 10px; }
.fab-cover-preview {
  width: 128px;
  height: 80px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: #f8f8fc center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}
.fab-cover-preview:hover { border-color: var(--accent); }
.fab-cover-preview img { width: 100%; height: 100%; object-fit: contain; }
.fab-cover-placeholder { padding: 0 10px; text-align: center; }
.fab-advanced { text-align: center; }
.btn-advanced {
  width: 100%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 6px 16px rgba(145, 197, 58, 0.35);
}
.btn-advanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(145, 197, 58, 0.45);
}
/* 鼠标悬浮提示（悬浮文字，替代原生 title） */
.btn-advanced::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #2b2b3a;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 5;
}
.btn-advanced::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2b2b3a;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
  z-index: 5;
}
.btn-advanced:hover::after,
.btn-advanced:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.btn-advanced .btn-advanced-icon { font-size: 16px; line-height: 1; }
.btn-advanced .btn-advanced-tip {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  margin-left: 2px;
}
.btn-advanced.disabled {
  background: linear-gradient(135deg, #b9c6d8, #9aa8bd);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.btn-advanced.disabled:hover { transform: none; }

/* ---------- 动画 ---------- */
@keyframes shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes glowPulse {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.75; filter: brightness(1.25); }
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@keyframes floatCube {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-28px) rotate(20deg); }
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.12); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= 移动端适配（<768px） ================= */
@media (max-width: 767px) {
  body { font-size: 15px; }

  /* 顶部导航 */
  .navbar { padding: 10px 14px; gap: 8px; }
  .brand { font-size: 17px; letter-spacing: 0; }
  .nav-links { gap: 6px; }
  .nav-links a { padding: 5px 9px; font-size: 13px; }

  /* Hero */
  .hero { min-height: 220px; padding: 44px 14px; }
  .hero-title { letter-spacing: 1px; }
  .hero-sub { font-size: 14px; letter-spacing: 1px; }

  /* 滚动公告 */
  .notice-label { padding: 0 12px; font-size: 12px; letter-spacing: 1px; }
  .notice-viewport { min-height: 34px; }
  .notice-item { padding: 0 12px; font-size: 12px; }
  .notice-item::after { margin-left: 12px; }

  /* 容器与卡片 */
  .container { margin: 18px auto; padding: 0 12px; }
  .card { padding: 14px; border-radius: 12px; margin-bottom: 14px; }

  /* 服务器卡片：缩略图在上方全宽（保持横图比例，避免被压成方形白底） */
  .server-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .server-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: #e8eaf2; }
  .server-title { font-size: 16px; }
  .meta { gap: 8px; font-size: 12px; min-width: 0; }
  .meta .tag { min-width: 0; max-width: 100%; overflow-wrap: break-word; }

  /* 列表标签 + 排序 */
  .list-tabs { gap: 8px; margin-bottom: 14px; }
  .list-tab { font-size: 15px; padding: 8px 14px; }
  .sort-wrap { margin-left: auto; }
  .sort-btn { padding: 7px 12px; font-size: 13px; }
  .sort-menu { right: 0; left: auto; }

  /* 详情页 */
  .detail-banner { height: 170px; }
  .video-card { margin-bottom: 12px; }

  /* 评论（内联 22px 缩进在手机上过宽，用嵌套容器缩进替代） */
  .comment-item { margin-left: 0 !important; }
  .comment-children { margin-left: 12px; }

  /* 表单 */
  .form-card { margin: 24px auto; }
  .form-card.wide { margin: 24px auto; }
  .btn { padding: 11px 18px; }

  /* 悬浮 + 发布弹窗 */
  .fab-wrapper { right: 16px; bottom: 18px; }
  .fab { width: 54px; height: 54px; font-size: 30px; }
  .fav-float { right: 20px; bottom: 84px; }
  .fav-star { width: 42px; height: 42px; font-size: 21px; }
  .fav-bubble { font-size: 12px; padding: 7px 10px; }
  .publish-overlay { padding: 5vh 12px 12px; }
  .publish-modal { padding: 16px; }

  /* 管理开关行 */
  .switch-row { gap: 10px; }

  /* 底部 */
  .footer-note { padding: 18px 12px; font-size: 12px; }
}

/* ---------- 风景图（发布弹窗 + 详情页画廊） ---------- */
.fab-gallery { display: flex; flex-direction: column; gap: 8px; }
.fab-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
}
.fab-gallery-item {
  position: relative;
  background: #f7f7ff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fab-gallery-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: #eef;
}
.fab-gallery-desc {
  border: none;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 7px 8px;
  font-size: 12px;
  color: var(--text);
  width: 100%;
}
.fab-gallery-desc:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.fab-gallery-del {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 10;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 1;
  font-size: 13px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.fab-gallery-del:hover { background: var(--danger); }
.fab-gallery-add {
  border: 1.5px dashed var(--primary);
  color: var(--primary);
  background: #f7f7ff;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}
.fab-gallery-add:hover { background: #eef0ff; }
.fab-gallery-tip { font-size: 12px; color: var(--muted); }

/* 详情页画廊 */
.gallery-card h2 { margin: 0 0 12px; font-size: 18px; color: var(--primary-dark); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.gallery-item { margin: 0; }
.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #e8eaf2;
  border-radius: 10px;
  cursor: zoom-in;
  display: block;
}
.gallery-item figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
  word-break: break-word;
}

/* 灯箱 */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.85); }
.gallery-lightbox-body {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.gallery-lightbox-body img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.gallery-lightbox-desc { color: #fff; font-size: 14px; text-align: center; }
.gallery-lightbox-close {
  position: absolute;
  top: -38px;
  right: 0;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,0.35); }

/* ---------- 评论头像 ---------- */
.comment-head { display: flex; align-items: center; gap: 8px; }
.comment-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); background: #eee; flex: none; }

/* ---------- 收藏按钮 ---------- */
.fav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; font-size: 18px; line-height: 1;
  color: #999; background: transparent; border: 1.5px solid #ddd; border-radius: 50%;
  cursor: pointer; transition: transform 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
  vertical-align: middle;
}
.fav-btn:hover { transform: scale(1.12); color: #e65c6b; border-color: #e65c6b; }
.fav-btn.starred { color: #fff; background: #e65c6b; border-color: #e65c6b; }

/* ---------- 模态框通用（个人中心） ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,8,30,0.55); padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-card {
  position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.profile-card h2 { margin: 0 0 18px; color: var(--primary-dark); }
.profile-avatar-preview { text-align: center; margin-bottom: 18px; }
.profile-avatar-preview img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid var(--primary); }
.profile-form label { display: block; margin: 14px 0 6px; font-weight: 600; color: var(--text); }
.profile-form input[type=text], .profile-form input[type=password] {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; box-sizing: border-box;
}
.profile-form input:focus { outline: none; border-color: var(--primary); }
.profile-form .btn { margin-top: 18px; width: 100%; }
.profile-fav-title { margin: 22px 0 10px; color: var(--primary-dark); font-size: 16px; }
.profile-fav-list .fav-item {
  display: flex; gap: 12px; align-items: center; padding: 10px;
  border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
  cursor: pointer; transition: background 0.15s;
}
.profile-fav-list .fav-item:hover { background: #f7f7ff; }
.fav-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; background: #eee; }
.fav-info { flex: 1; min-width: 0; }
.fav-title { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-meta { margin-top: 4px; }
.profile-fav-list .mc-rating .mc-stars { color: #f5a623; }

/* ---------- 头像框选裁切（1:1） ---------- */
.avatar-crop-overlay {
  position: fixed; inset: 0; z-index: 950; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,8,30,0.6); padding: 20px;
}
.avatar-crop-overlay.show { display: flex; }
.avatar-crop-box {
  width: 100%; max-width: 380px; background: #fff; border-radius: 14px;
  padding: 20px; text-align: center;
}
.avatar-crop-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 14px; }
.avatar-crop-stage {
  position: relative; width: 320px; height: 320px; max-width: 100%;
  aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 12px;
  background: #111; cursor: grab; touch-action: none;
}
.avatar-crop-stage img { display: block; max-width: none; max-height: none; cursor: grab; user-select: none; }
.avatar-crop-zoom { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; font-size: 13px; color: var(--muted); }
.avatar-crop-zoom input[type=range] { flex: 1; }
.avatar-crop-actions { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.avatar-crop-tip { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- 注册页头像 ---------- */
.reg-avatar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.reg-avatar-box {
  width: 96px; height: 96px; border-radius: 12px; overflow: hidden;
  background: #eef0ff; border: 1.5px dashed var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-align: center; flex: none;
}
.reg-avatar-box img { width: 100%; height: 100%; object-fit: cover; }
.reg-avatar-placeholder { font-size: 12px; color: var(--primary); padding: 8px; }
