/* =========================================================
   Theme — 曜石 / 翡翠高端暗色（唯一主题）
   ========================================================= */

:root {
  color-scheme: only dark;
  --p-bg: #070b10;
  --p-bg-elevated: #0e1520;
  --p-surface: rgba(255, 255, 255, 0.045);
  --p-surface-hover: rgba(255, 255, 255, 0.075);
  --p-border: rgba(255, 255, 255, 0.09);
  --p-border-strong: rgba(52, 211, 153, 0.35);
  --p-text: #e8eef6;
  --p-text-soft: #9aa8bc;
  --p-text-dim: #6b7a90;
  --p-accent: #34d399;
  --p-accent-2: #5eead4;
  --p-accent-dim: rgba(52, 211, 153, 0.14);
  --p-danger: #f87171;
  --p-warn: #fbbf24;
  --p-info: #38bdf8;
  --p-radius: 16px;
  --p-radius-sm: 10px;
  --p-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --p-font: "Sora", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  color-scheme: only dark;
}

body {
  font-family: var(--p-font);
  color: var(--p-text);
  background-color: var(--p-bg);
  -webkit-font-smoothing: antialiased;
}

/* 独立固定层渲染背景，避免 background-attachment: fixed 在某些浏览器下发糊 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--p-bg);
  background-image: url("/assets/images/bg-minecraft-night.webp");
  background-image: image-set(
    url("/assets/images/bg-minecraft-night.webp") type("image/webp"),
    url("/assets/images/bg-minecraft-night.png") type("image/png")
  );
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 16, 0.62) 0%,
    rgba(7, 11, 16, 0.42) 45%,
    rgba(7, 11, 16, 0.68) 100%
  );
  pointer-events: none;
}

.app {
  min-height: 100vh;
}

/* ----- 顶栏：单行简约 ----- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px clamp(16px, 3vw, 36px);
  gap: 0;
  color: var(--p-text);
  background: rgba(7, 11, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--p-border);
  box-shadow: none;
  text-shadow: none;
}

.topbar-inner {
  gap: 12px 18px;
  flex-wrap: nowrap;
}

.topbar-left {
  gap: 12px 16px;
}

.topbar-tools {
  gap: 10px;
  margin-left: 0;
  flex-shrink: 0;
}

.nav-drawer-toggle {
  color: var(--p-text);
  background: var(--p-surface);
  border-radius: 10px;
}

.nav-drawer-toggle:hover {
  background: var(--p-surface-hover);
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: none;
  background: linear-gradient(120deg, #f8fafc 10%, #6ee7b7 55%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav {
  gap: 2px;
  justify-content: flex-start;
}

.nav-link {
  color: var(--p-text-soft);
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-shadow: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-ico {
  width: 18px;
  height: 18px;
}

.nav-link:hover {
  color: var(--p-text);
  background: var(--p-surface);
  transform: none;
  border: 0;
}

.nav-link.active {
  color: #04140e;
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.95), rgba(52, 211, 153, 0.92));
}

.nav-link.admin-link,
.dropdown-link.admin-link {
  color: #fecaca;
  background: transparent;
  border: 0;
}

.dropdown-divider {
  background: var(--p-border);
}

.home-stat-icon,
.server-motd {
  display: none;
}

/* ----- 登录 / 用户菜单 ----- */
.btn-auth-entry {
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399 55%, #2dd4bf);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(52, 211, 153, 0.22);
  text-shadow: none;
  font-weight: 700;
  padding: 8px 12px;
}

.btn-auth-entry:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  border-bottom: 0;
  box-shadow: 0 10px 26px rgba(52, 211, 153, 0.36);
}

.btn-auth-entry:active {
  transform: translateY(0);
}

.user-info {
  color: var(--p-accent-2);
  background: var(--p-accent-dim);
  border: 1px solid var(--p-border-strong);
  border-radius: 999px;
  text-shadow: none;
  padding: 7px 14px;
}

.user-dropdown {
  top: calc(100% + 8px);
  background: rgba(14, 21, 32, 0.98);
  border: 1px solid var(--p-border);
  border-radius: 12px;
  box-shadow: var(--p-shadow);
  backdrop-filter: blur(16px);
  padding: 6px;
  z-index: 1300;
}

.user-dropdown .dropdown-link {
  color: var(--p-text-soft);
  text-shadow: none;
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.3;
  margin: 0;
}

.dropdown-link:hover {
  background: var(--p-surface-hover);
  color: var(--p-text);
}

.dropdown-link.danger:hover {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
}

/* ----- 页脚 ----- */
.site-footer {
  margin-top: 28px;
  padding: 28px 16px 36px;
  color: var(--p-text-dim);
  background: transparent;
  border-top: 1px solid var(--p-border);
  text-shadow: none;
  font-size: 13px;
}

.site-footer-nav-link,
.site-footer-icp-link {
  color: var(--p-accent-2);
  text-decoration: none;
  font-weight: 600;
}

.site-footer-nav-link:hover,
.site-footer-icp-link:hover {
  color: #fff;
}

.site-footer-nav-sep,
.site-footer-meta {
  color: var(--p-text-dim);
  text-shadow: none;
}

/* ----- 卡片 / 面板 ----- */
.card,
.modal-card,
.flash-dialog,
.auth-shell .card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
  color: var(--p-text);
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.22);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.5);
}

.card h2,
.card h3,
.modal-header h3,
.flash-title {
  color: var(--p-text);
  text-shadow: none;
  letter-spacing: 0.01em;
}

.divider {
  height: 1px;
  background: var(--p-border);
  border: 0;
  margin: 18px 0;
}

.muted,
.meta {
  color: var(--p-text-dim) !important;
  text-shadow: none;
}

.link-title {
  color: #a7f3d0;
  font-weight: 600;
}

.link-title:hover {
  color: #ecfdf5;
  text-decoration: none;
}

/* ----- 英雄区 ----- */
.container {
  width: min(1080px, calc(100% - clamp(24px, 6vw, 64px)));
  margin: clamp(22px, 4vw, 36px) auto;
  gap: clamp(18px, 3vw, 28px);
}

/* 仅首页收窄，轮播与下方卡片同宽；其它页面仍用宽容器 */
.home-section {
  width: min(100%, 720px);
  margin-inline: auto;
  gap: 18px;
}

.home-bottom-grid {
  gap: 16px;
  align-items: stretch;
}

.card {
  padding: 24px 26px;
}

.hero-carousel {
  width: 100%;
  margin-inline: 0;
}

.hero-card {
  --hero-ratio: 1024 / 374;
  position: relative;
  overflow: hidden;
  display: block;
  text-align: left;
  width: 100%;
  height: auto !important;
  aspect-ratio: var(--hero-ratio);
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background:
    radial-gradient(700px 280px at 85% 20%, rgba(52, 211, 153, 0.22), transparent 60%),
    radial-gradient(500px 260px at 10% 80%, rgba(56, 189, 248, 0.12), transparent 55%),
    linear-gradient(145deg, #101820 0%, #0b121a 48%, #0a1412 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  text-shadow: none;
  color: var(--p-text);
}

.hero-card.is-welcome {
  /* 首图本身已带圆角与描边，避免再套一层导致裁切 */
  border: none;
  background: #050d0f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
  pointer-events: none;
}

.hero-card.is-welcome::before,
.hero-card.is-welcome::after {
  display: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, var(--p-accent), transparent);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-slide-wrap {
  position: absolute;
  inset: 0;
  flex: none;
  min-height: 0;
  height: auto;
  display: block;
  overflow: hidden;
}

.hero-slide {
  width: 100%;
  height: 100%;
  display: block;
  align-items: stretch;
  min-height: 0;
}

.hero-welcome {
  position: relative;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.hero-welcome-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  user-select: none;
  pointer-events: none;
}

.hero-welcome-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-welcome-hotspot {
  position: absolute;
  display: block;
  pointer-events: auto;
  border-radius: 6px;
  outline: none;
}

/* 欢迎图 1024x374 实测按钮区域 */
.hero-welcome-hotspot-servers {
  left: 4.7%;
  top: 63.5%;
  width: 20%;
  height: 13.2%;
}

.hero-welcome-hotspot-news {
  left: 24%;
  top: 63.5%;
  width: 11%;
  height: 13.2%;
}

.hero-welcome-hotspot:focus-visible {
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.85);
}

.hero-ip-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-ip-label {
  font-size: 12px;
  color: var(--p-text-dim);
  font-weight: 500;
}

.hero-ip-value {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.92rem;
  color: var(--p-accent-2);
  background: transparent;
}

.home-join-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 4px;
  padding: 18px clamp(14px, 2.5vw, 22px);
  border-radius: var(--p-radius);
  border: 1px solid var(--p-border);
  background:
    linear-gradient(120deg, rgba(52, 211, 153, 0.08), transparent 42%),
    var(--p-surface);
}

.home-join-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  flex: 1 1 280px;
}

.home-join-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 160px;
}

.home-join-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #06281c;
  background: var(--p-accent);
}

.home-join-step strong {
  display: block;
  font-size: 0.95rem;
  color: var(--p-text);
  margin-bottom: 2px;
}

.home-join-step p {
  margin: 0;
  font-size: 12px;
  color: var(--p-text-dim);
  line-height: 1.4;
}

.home-join-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.home-join-actions > .btn {
  flex: 0 0 auto;
  align-self: center;
  height: auto;
  min-height: 0;
  line-height: 1.25;
  white-space: nowrap;
}

.home-join-actions > .hero-ip-chip {
  flex: 0 1 auto;
  align-self: center;
  padding: 6px 10px;
}

.notify-permission-card {
  margin-bottom: 16px;
}

.notify-permission-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.notify-permission-body strong {
  display: block;
  margin-bottom: 4px;
}

.home-stats-bar {
  margin-top: 0;
  padding: 14px 10px;
  border-radius: var(--p-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 70%),
    var(--p-surface);
  border: 1px solid var(--p-border);
  box-shadow: none;
}

.hero-announcement {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #070d12;
}

.hero-announcement-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-announcement-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  filter: saturate(0.92) brightness(0.62) contrast(1.06);
  transform: scale(1.02);
  transform-origin: 70% center;
}

.hero-announcement-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      rgba(5, 10, 14, 0.96) 0%,
      rgba(5, 10, 14, 0.9) 34%,
      rgba(5, 12, 16, 0.55) 58%,
      rgba(5, 12, 16, 0.22) 78%,
      rgba(5, 12, 16, 0.08) 100%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 35%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-announcement-glow {
  position: absolute;
  right: -8%;
  top: -30%;
  width: 52%;
  height: 140%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(52, 211, 153, 0.18), transparent 62%),
    radial-gradient(ellipse at 70% 40%, rgba(56, 189, 248, 0.1), transparent 55%);
}

.hero-announcement-content {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(58%, 520px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* 底部预留指示点空间，避免第二页按钮被挡住 */
  padding: clamp(14px, 3.6%, 22px) clamp(18px, 4%, 28px) clamp(44px, 10%, 56px);
  overflow: hidden;
}

.hero-announcement .hero-kicker,
.hero-announcement h1,
.hero-announcement .hero-desc,
.hero-announcement .hero-meta {
  flex-shrink: 0;
}

.hero-announcement .hero-kicker {
  margin-bottom: 8px;
  padding: 4px 10px 4px 8px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(8, 18, 16, 0.55);
  backdrop-filter: blur(6px);
  letter-spacing: 0.14em;
}

.hero-announcement .hero-kicker.is-pin {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(28, 22, 8, 0.55);
}

.hero-announcement .hero-kicker.is-news {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(8, 18, 28, 0.55);
}

.hero-announcement h1 {
  max-width: 14em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero-announcement .hero-desc {
  max-width: 32em;
  color: rgba(226, 232, 240, 0.82);
}

.hero-announcement .hero-meta {
  margin-top: 2px;
  opacity: 0.9;
}

.hero-announcement .card-actions {
  margin-top: 12px;
  flex-shrink: 0;
  gap: 10px;
}

.hero-announcement-btn {
  border-radius: 10px;
  border-bottom-width: 1px;
  box-shadow: none;
}

.hero-announcement-btn.btn-primary {
  color: #04140e;
  background: #34d399;
  border: 1px solid rgba(167, 243, 208, 0.55);
  box-shadow:
    0 0 0 1px rgba(6, 78, 59, 0.35),
    0 8px 20px rgba(52, 211, 153, 0.22);
}

.hero-announcement-btn.btn-secondary {
  color: #ecfdf5;
  background: rgba(6, 16, 18, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.55);
  backdrop-filter: blur(4px);
}

.hero-announcement-btn.btn-secondary:hover {
  background: rgba(16, 36, 32, 0.72);
  border-color: rgba(110, 231, 183, 0.8);
}

.hero-carousel-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3.5%;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  color: #86efac;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: none;
  opacity: 1;
  text-shadow: none;
}

.hero-kicker::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #34d399, rgba(52, 211, 153, 0));
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.hero-kicker.is-pin {
  color: #fde68a;
}

.hero-kicker.is-pin::before {
  background: linear-gradient(90deg, #fbbf24, rgba(251, 191, 36, 0));
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.hero-kicker.is-news {
  color: #7dd3fc;
}

.hero-kicker.is-news::before {
  background: linear-gradient(90deg, #38bdf8, rgba(56, 189, 248, 0));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.28);
}

.hero-card h1 {
  margin: 0 0 6px;
  font-size: clamp(1.28rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
  text-shadow: none;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hero-desc {
  max-width: 38em;
  margin: 0 0 8px;
  color: var(--p-text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 1;
  text-shadow: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hero-meta {
  margin: 0 0 8px;
  color: var(--p-text-dim);
  font-size: 12px;
  text-shadow: none;
  opacity: 1;
}

.hero-dot {
  background: rgba(255, 255, 255, 0.22);
}

.hero-dot.active {
  background: linear-gradient(135deg, #6ee7b7, #34d399);
}

.card-actions {
  gap: 10px;
  justify-content: flex-start;
  margin-top: auto;
}

.home-stats-bar {
  margin-top: 0;
  padding: 14px 10px;
  border-radius: var(--p-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 70%),
    var(--p-surface);
  border: 1px solid var(--p-border);
  box-shadow: none;
}

.home-stat-item + .home-stat-item::before {
  background: linear-gradient(to bottom, transparent, rgba(148, 163, 184, 0.28), transparent);
}

.home-stat-value {
  color: var(--p-accent-2);
  text-shadow: none;
  font-family: var(--p-font);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.home-stat-label {
  color: var(--p-text-dim);
  text-shadow: none;
  font-size: 12px;
  font-weight: 500;
}

/* ----- 列表项 ----- */
.list-item,
.server-item,
.post-item,
.notification-item,
.chat-message {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  box-shadow: none;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--p-border);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.list-item:last-child,
.server-item:last-child,
.post-item:last-child {
  margin-bottom: 0;
}

.server-item:hover,
.list-item:hover,
.post-item:hover {
  background: var(--p-surface-hover);
  border-color: rgba(52, 211, 153, 0.28);
  transform: translateY(-1px);
}

.server-name,
.post-title {
  color: var(--p-text);
  text-shadow: none;
}

/* ----- 表单 ----- */
.input,
.textarea,
select.input {
  background: rgba(0, 0, 0, 0.35);
  color: var(--p-text);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius-sm);
  box-shadow: none;
  text-shadow: none;
  caret-color: var(--p-accent);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  -webkit-text-fill-color: var(--p-text);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--p-text-dim);
  -webkit-text-fill-color: var(--p-text-dim);
  opacity: 1;
}

.input:hover,
.textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.42);
  color: var(--p-text);
  -webkit-text-fill-color: var(--p-text);
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(0, 0, 0, 0.5);
  color: var(--p-text);
  -webkit-text-fill-color: var(--p-text);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.15);
}

/* 覆盖 styles.css 浅色聚焦底 + 浏览器自动填充白底浅字 */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.textarea:-webkit-autofill,
.textarea:-webkit-autofill:hover,
.textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--p-text);
  caret-color: var(--p-accent);
  box-shadow: 0 0 0 1000px #0d141c inset;
  transition: background-color 99999s ease-out;
}

.field > span,
label.field > span {
  color: var(--p-text-soft);
  font-weight: 600;
  text-shadow: none;
}

/* ----- 按钮 ----- */
.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  border-bottom-width: 1px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: none;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-bottom-width: 1px;
}

.btn:active {
  transform: translateY(0);
  border-bottom-width: 1px;
}

.btn-primary {
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399 60%, #2dd4bf);
  box-shadow: 0 10px 24px rgba(52, 211, 153, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.06);
  background: linear-gradient(135deg, #7af0c2, #3ddeaa 60%, #3fdfc8);
}

.btn-secondary {
  color: var(--p-text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--p-border);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-warning {
  color: #1c1400;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
  filter: brightness(1.05);
}

.btn-sm {
  border-radius: 999px;
}

.btn:disabled {
  filter: grayscale(0.4) brightness(0.85);
  opacity: 0.55;
}

/* ----- 徽章 ----- */
.badge,
.badge-online,
.badge-offline,
.badge-maintenance,
.badge-pending,
.badge-approved,
.badge-banned {
  border-radius: 999px;
  border: 1px solid transparent;
  box-shadow: none;
  text-shadow: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
}

.badge-online,
.badge-approved {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.3);
}

.badge-offline,
.badge-banned {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}

.badge-maintenance,
.badge-pending {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}

/* ----- 弹层 ----- */
.modal-mask,
.flash-modal {
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(6px);
}

.flash-dialog.error {
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(248, 113, 113, 0.2);
}

/* ----- Tabs / chips ----- */
.admin-tabs a,
.tab-link,
.filter-chip {
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text-soft);
  border: 1px solid var(--p-border);
  border-radius: 999px;
  text-shadow: none;
}

.admin-tabs a.active,
.tab-link.active,
.filter-chip.active {
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  border-color: transparent;
}

/* ----- 表格 / 音乐 / 聊天 ----- */
.music-widget {
  background: rgba(14, 21, 32, 0.94);
  border: 1px solid var(--p-border);
  box-shadow: var(--p-shadow);
  backdrop-filter: blur(12px);
  z-index: 70;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 76px);
}

.music-widget.minimized {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  max-width: 48px;
  max-height: 48px;
}

.music-fab {
  background: linear-gradient(135deg, #6ee7b7, #34d399 60%, #2dd4bf);
  color: #04140e;
  box-shadow: 0 8px 20px rgba(52, 211, 153, 0.28);
}

.music-title,
.music-track,
.music-status {
  color: var(--p-text);
  text-shadow: none;
}

.music-track {
  color: var(--p-accent-2);
}

.login-verify-modal .login-verify-name {
  color: var(--p-accent-2);
}

.table,
table {
  background: transparent;
  border-color: var(--p-border);
  color: var(--p-text);
}

/* 必须用 .table th/td，盖过 styles.css 里旧浅色主题的深棕字色 */
.table th,
.table td,
th,
td {
  border-color: var(--p-border);
  color: var(--p-text);
  text-shadow: none;
}

.table th,
th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text-soft);
}

.table td,
td {
  background: transparent;
  color: var(--p-text);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-panel,
.chat-box {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: none;
  color: var(--p-text);
}

.chat-message {
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text);
}

/* 覆盖经典主题里偏深色字的统计/正文 */
.home-stat-item,
p,
li,
.content-section {
  color: var(--p-text-soft);
}

.content-section .card p,
.content-section .card li {
  color: var(--p-text-soft);
}

/* ----- 内页通用 ----- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--p-text);
  text-shadow: none;
}

.section-subtitle {
  color: var(--p-text-dim);
  opacity: 1;
}

.back-link {
  color: var(--p-accent-2);
  opacity: 1;
  margin-bottom: 14px;
}

.back-link:hover {
  color: #fff;
}

.empty-state {
  color: var(--p-text-dim);
  opacity: 1;
  border: 1px dashed var(--p-border);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  padding: 28px 18px;
}

.empty-state > p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.empty-state .btn,
.empty-state-soft .btn {
  margin-top: 4px;
}

.empty-state-soft {
  border: 0;
  background: transparent;
  text-align: center;
  padding: 18px 12px;
}

.empty-state-soft > p {
  margin: 0 0 8px;
  line-height: 1.5;
}

.list-card {
  padding: 8px;
}

.list-card > .list-row,
.announcement-item,
.post-item,
.notification-page-item,
.login-request-item,
.reply-item {
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.list-card > .list-row + .list-row,
.list-card > .announcement-item + .announcement-item,
.list-card > .post-item + .post-item {
  border-top: 0;
  margin-top: 4px;
}

.list-card > .list-row:hover,
.announcement-item:hover,
.post-item:hover {
  background: var(--p-surface-hover);
  border-color: rgba(52, 211, 153, 0.22);
  transform: none;
}

.announcement-title,
.post-title {
  color: var(--p-text);
  font-weight: 600;
}

.views,
.post-stats {
  color: var(--p-text-dim);
  white-space: nowrap;
}

.server-grid {
  gap: 16px;
}

.server-card {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.server-card:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.28);
}

.server-card h3 {
  margin: 0;
  color: var(--p-text);
}

.server-desc {
  color: var(--p-text-soft);
  min-height: 0;
}

.server-info {
  color: var(--p-text-soft);
  gap: 6px;
}

.card-foot-action {
  color: var(--p-accent-2);
  opacity: 1;
}

.info-label {
  color: var(--p-text-dim);
}

.detail-content,
.reply-content,
.notification-page-content {
  color: var(--p-text-soft);
  line-height: 1.75;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 8px;
}

.tab-btn {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--p-text-soft);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.tab-btn:hover {
  color: var(--p-text);
  background: var(--p-surface);
}

.tab-btn.active {
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  border-color: transparent;
}

.category-badge,
.pin-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-right: 8px;
}

.pin-badge {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
}

.chat-card {
  padding: 16px;
}

.chat-toolbar {
  margin-bottom: 12px;
}

.chat-messages {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--p-border);
  border-radius: 14px;
  min-height: 320px;
  max-height: min(56vh, 520px);
}

.chat-input {
  margin-top: 12px;
  gap: 10px;
}

.chat-line.chat-self .chat-bubble {
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.chat-line.chat-other .chat-bubble,
.chat-line.chat-other.chat-source-web .chat-bubble,
.chat-line.chat-other.chat-source-minecraft .chat-bubble,
.chat-line.chat-other.chat-source-server .chat-bubble {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--p-border);
}

.chat-sender {
  color: var(--p-text);
  opacity: 0.95;
}

.chat-content {
  color: var(--p-text);
}

.chat-time {
  color: var(--p-text-dim);
  opacity: 1;
}

.chat-source-tag {
  color: #04140e;
  border-color: rgba(255, 255, 255, 0.12);
}

.chat-line.chat-source-web .chat-source-tag {
  background: rgba(110, 231, 183, 0.85);
  color: #04140e;
}

.chat-line.chat-source-minecraft .chat-source-tag,
.chat-line.chat-source-server .chat-source-tag {
  background: rgba(251, 191, 36, 0.85);
  color: #1c1400;
}

.form-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow);
}

.form-card::before,
.form-card h2::after,
.form-card .btn-primary::before {
  display: none;
}

.form-card h2 {
  color: var(--p-text);
  text-shadow: none;
}

.admin-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.admin-sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--p-border);
  border-radius: 16px;
  box-shadow: none;
  background-image: none;
  padding: 12px;
  position: sticky;
  top: 88px;
}

.admin-nav-group-title {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text);
  border-radius: 12px;
  text-shadow: none;
  font-weight: 650;
}

.admin-nav-group-title:hover {
  background: rgba(255, 255, 255, 0.07);
}

.admin-nav-group.open .admin-nav-group-title {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.admin-nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--p-text-soft);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-shadow: none;
  background-image: none;
}

.admin-nav-btn:hover {
  color: var(--p-text);
  background: var(--p-surface);
  transform: none;
}

.admin-nav-btn.active {
  color: #04140e;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  border-color: transparent;
}

.admin-toolbar {
  border-radius: 16px;
}

.admin-action-dropdown {
  background: #121a17;
  border: 1px solid var(--p-border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  padding: 6px;
}

.admin-action-sheet-mask {
  background: rgba(2, 8, 6, 0.55);
}

.admin-action-dropdown.admin-action-sheet {
  border-radius: 16px;
  padding: 8px;
}

.admin-action-dropdown button {
  color: var(--p-text);
  border-radius: 8px;
}

.admin-action-dropdown button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-action-dropdown button.danger {
  color: #fca5a5;
}

.admin-action-dropdown button.danger:hover {
  background: rgba(239, 68, 68, 0.16);
}

.admin-action-dropdown button.sheet-cancel {
  color: var(--p-muted, #9ca3af);
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-sidebar {
    position: static;
    padding: 10px;
  }

  .admin-nav-group-items {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
  }

  .admin-nav-btn {
    width: auto;
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }

  .admin-main .card {
    overflow-x: visible;
    padding: 16px 14px;
  }

  .admin-main .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .admin-main .table-wrap > .table {
    min-width: 720px;
    width: max(100%, 720px);
  }

  .admin-main .table-wrap .table th,
  .admin-main .table-wrap .table td {
    white-space: nowrap;
  }

  .container {
    width: min(1080px, calc(100% - 16px));
  }

  .home-section {
    width: 100%;
  }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.text-link {
  color: var(--p-accent-2);
}

.login-request-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.reply-form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

@media (max-width: 720px) {
  .topbar {
    padding: 10px 12px;
  }

  /* 手机端也跟图片同比例，保证首图完整且切换不跳高度 */
  .hero-card,
  .hero-card.is-welcome,
  .hero-card:not(.is-welcome) {
    height: auto !important;
    min-height: 0;
    max-height: none;
    padding: 0;
    text-align: left;
    aspect-ratio: var(--hero-ratio);
  }

  .hero-card:not(.is-welcome) .hero-slide-wrap {
    position: absolute;
    inset: 0;
    height: auto;
  }

  .hero-card:not(.is-welcome) .hero-slide {
    width: 100%;
    height: 100%;
  }

  .hero-welcome-img {
    object-fit: fill;
    object-position: center;
  }

  .hero-announcement {
    height: 100%;
    min-height: 0;
  }

  .hero-announcement-bg img {
    object-position: 62% center;
    filter: saturate(0.88) brightness(0.52) contrast(1.08);
  }

  .hero-announcement-shade {
    background:
      linear-gradient(
        105deg,
        rgba(5, 10, 14, 0.94) 0%,
        rgba(5, 10, 14, 0.82) 42%,
        rgba(5, 12, 16, 0.45) 72%,
        rgba(5, 12, 16, 0.18) 100%
      ),
      linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 40%, rgba(0, 0, 0, 0.4) 100%);
  }

  .hero-announcement-content {
    width: min(72%, 420px);
    padding: 12px 12px 28px;
    gap: 2px;
  }

  .hero-announcement .hero-kicker {
    margin: 0 0 4px;
    padding: 3px 8px 3px 6px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .hero-announcement h1 {
    font-size: 1.05rem;
    margin: 0;
    -webkit-line-clamp: 2;
    line-height: 1.25;
  }

  .hero-announcement .hero-desc {
    font-size: 11px;
    margin: 0;
    -webkit-line-clamp: 1;
    line-height: 1.35;
  }

  .hero-announcement .hero-meta {
    display: none;
  }

  .hero-announcement .card-actions {
    margin-top: 6px;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .hero-announcement .btn {
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  .hero-carousel-bar {
    bottom: 6px;
  }

  .hero-card h1 {
    font-size: 1.05rem;
  }

  .hero-slide-wrap {
    min-height: 0;
  }

  .home-stat-value {
    font-size: 1.25rem;
  }

  .card {
    padding: 18px 16px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .nav.nav-drawer {
    background: rgba(10, 14, 22, 0.98);
    border-right: 1px solid var(--p-border);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .topbar {
    /* 避免 backdrop-filter 成为 fixed 抽屉的包含块 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(7, 11, 16, 0.96);
  }

  .nav.nav-drawer .nav-link {
    color: var(--p-text-soft);
    background: transparent;
    border: 0;
    text-shadow: none;
  }

  .nav.nav-drawer .nav-link:hover {
    color: var(--p-text);
    background: var(--p-surface);
    transform: none;
  }

  .nav.nav-drawer .nav-link.active {
    color: #04140e;
    background: linear-gradient(135deg, rgba(110, 231, 183, 0.95), rgba(52, 211, 153, 0.92));
  }

  .nav.nav-drawer .nav-link.admin-link {
    color: #fecaca;
    background: transparent;
  }

  .nav.nav-drawer .nav-link.admin-link.active {
    color: #04140e;
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.9), rgba(239, 68, 68, 0.85));
  }

  .nav-drawer-mask {
    background: rgba(0, 0, 0, 0.55);
    z-index: 105;
  }
}

/* 服务器详情（premium） */
.server-hero-icon {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(15, 23, 32, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.server-tag {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
  color: var(--p-accent-2);
}

.server-occupancy-bar {
  background: rgba(255, 255, 255, 0.08);
}

.server-occupancy-bar > span {
  background: linear-gradient(90deg, #0d9488, #34d399);
}

.server-hero-grid {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.server-subnav-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--p-text-soft);
}

.server-subnav-item:hover {
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--p-text);
}

.server-subnav-item.active {
  background: rgba(13, 148, 136, 0.9);
  border-color: rgba(52, 211, 153, 0.55);
  color: #ecfdf5;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.18);
}

.server-quick-list li {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.server-link-item,
.player-chip {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--p-text);
}

.server-link-item:hover,
.player-chip:hover {
  border-color: rgba(52, 211, 153, 0.35);
}

.media-thumb-btn img {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.media-thumb-btn:hover img {
  transform: scale(1.02);
  opacity: 0.92;
}

.server-star {
  color: rgba(255, 255, 255, 0.18);
}

.server-star.on,
.server-star-pick.on,
.server-star-pick.active {
  color: #fbbf24;
}

.server-star-pick {
  color: rgba(255, 255, 255, 0.18);
}

.server-review-bar {
  background: rgba(255, 255, 255, 0.08);
}

.server-review-bar > span {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.server-review-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.server-review-avg {
  color: var(--p-text);
}

.server-review-mine-tag {
  background: rgba(52, 211, 153, 0.14);
  color: var(--p-accent-2);
}

.server-review-item.mine {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.05);
}

/* ===== ������ǿ��premium�� ===== */
.community-toolbar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--p-border);
  border-radius: 14px;
}

.sort-chip {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--p-text-dim);
  border-radius: 999px;
  padding: 6px 12px;
}

.sort-chip.active {
  background: rgba(52, 211, 153, 0.16);
  color: var(--p-accent-2);
  border-color: rgba(52, 211, 153, 0.35);
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.28);
  margin-right: 8px;
}

.post-excerpt {
  color: var(--p-text-dim);
}

.compose-cat {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--p-text-dim);
  border-radius: 10px;
}

.compose-cat.active {
  background: rgba(52, 211, 153, 0.16);
  color: var(--p-accent-2);
  border-color: rgba(52, 211, 153, 0.35);
}

.compose-preview {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  color: var(--p-text);
}

.post-compose-tips ul {
  color: var(--p-text-dim);
}

.level-chip {
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.1);
  color: var(--p-accent-2);
}

.post-detail-actions .btn.active,
.compose-toolbar .btn.active {
  background: rgba(52, 211, 153, 0.18);
  color: var(--p-accent-2);
  border-color: rgba(52, 211, 153, 0.35);
}

.text-action {
  color: var(--p-accent-2);
  text-decoration: none;
}

.text-action:hover {
  text-decoration: underline;
}

.text-action.danger {
  color: #fca5a5;
}

.content-quote {
  border-left: 3px solid var(--p-accent-2);
  background: rgba(52, 211, 153, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--p-text-dim);
}

.char-count {
  color: var(--p-text-dim);
}

.reply-floor {
  color: var(--p-text-dim);
}

.auth-alt {
  margin: 18px 0 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.auth-alt-label {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--p-text-dim);
}

.auth-alt-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 18px;
}

.auth-alt-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--p-text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-alt-link:hover {
  color: var(--p-accent);
}

.auth-alt-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-alt-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--p-text-dim);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 16px;
}

@media (max-width: 800px) {
  .guide-layout { grid-template-columns: 1fr; }
}

.guide-nav-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--p-text-soft);
  text-decoration: none;
  margin-bottom: 4px;
}

.guide-nav-link.active,
.guide-nav-link:hover {
  background: var(--p-accent-dim);
  color: var(--p-text);
}

.player-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.player-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  image-rendering: pixelated;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--p-border);
  background: var(--p-accent-dim);
  font-size: 13px;
}

.poll-options {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.poll-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--p-border);
  background: rgba(255,255,255,0.03);
  color: inherit;
  cursor: pointer;
}

.poll-option.active,
.poll-option.winner {
  border-color: var(--p-border-strong);
  background: var(--p-accent-dim);
}

.timeline-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--p-border);
}

.plain-list {
  padding-left: 18px;
  margin: 8px 0 16px;
}

/* =========================================================
   Interaction polish — 轻量交互反馈
   ========================================================= */
:root {
  --p-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --p-ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
  --p-motion-fast: 140ms;
  --p-motion: 220ms;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes hm-view-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes hm-pop-in {
    from {
      opacity: 0;
      transform: translateY(8px) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes hm-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes hm-soft-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
    50% { box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12); }
  }

  .home-section,
  .content-section,
  .auth-shell,
  .admin-section,
  .lazy-view-host {
    animation: hm-view-in var(--p-motion) var(--p-ease-out) both;
  }

  .lazy-view-loading {
    animation: hm-fade-in 0.2s ease both;
  }

  .modal-mask {
    animation: hm-fade-in 0.18s ease both;
  }

  .modal-card,
  .flash-dialog {
    animation: hm-pop-in 0.24s var(--p-ease-out) both;
  }

  .nav-link.active {
    animation: hm-soft-pulse 1.8s ease 1;
  }
}

/* 按钮：更明确的悬停 / 按下 */
.btn {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--p-motion-fast) var(--p-ease-press),
    filter var(--p-motion-fast) ease,
    box-shadow var(--p-motion) ease,
    background var(--p-motion) ease,
    border-color var(--p-motion-fast) ease;
  will-change: transform;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 42%);
  opacity: 0;
  transition: opacity var(--p-motion-fast) ease;
  pointer-events: none;
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.98);
}

.btn:focus-visible {
  outline: 2px solid rgba(110, 231, 183, 0.7);
  outline-offset: 2px;
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(52, 211, 153, 0.34);
}

.btn-secondary:hover {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-danger:active,
.btn-primary:active,
.btn-secondary:active,
.btn-warning:active {
  transform: translateY(1px) scale(0.98);
}

/* 导航 */
.nav-link {
  transition:
    color var(--p-motion-fast) ease,
    background var(--p-motion) ease,
    transform var(--p-motion-fast) var(--p-ease-press),
    box-shadow var(--p-motion) ease;
}

.nav-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
}

.nav-link:active {
  transform: scale(0.96);
}

.nav-link.active {
  box-shadow: 0 8px 18px rgba(52, 211, 153, 0.28);
}

.nav-link:focus-visible,
.btn-auth-entry:focus-visible,
.brand:focus-visible {
  outline: 2px solid rgba(110, 231, 183, 0.65);
  outline-offset: 3px;
}

.btn-auth-entry {
  transition:
    transform var(--p-motion-fast) var(--p-ease-press),
    filter var(--p-motion-fast) ease,
    box-shadow var(--p-motion) ease;
}

.btn-auth-entry:hover {
  transform: translateY(-2px);
}

.btn-auth-entry:active {
  transform: translateY(1px) scale(0.97);
}

.brand {
  transition: filter var(--p-motion) ease, transform var(--p-motion-fast) ease;
}

.brand:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.brand:active {
  transform: scale(0.98);
}

/* 卡片 / 列表 */
.card {
  transition:
    transform var(--p-motion) var(--p-ease-out),
    border-color var(--p-motion) ease,
    box-shadow var(--p-motion) ease,
    background var(--p-motion) ease;
}

.card:active {
  transform: translateY(0) scale(0.997);
}

.list-item,
.server-item,
.post-item,
.list-row,
.announcement-item,
.notification-page-item,
.poll-option,
.dropdown-link {
  transition:
    transform var(--p-motion-fast) var(--p-ease-press),
    border-color var(--p-motion) ease,
    background var(--p-motion) ease,
    color var(--p-motion-fast) ease,
    box-shadow var(--p-motion) ease;
}

.list-row,
.announcement-item,
.notification-page-item {
  border-radius: var(--p-radius-sm);
}

a.list-row:hover,
a.announcement-item:hover,
a.post-item:hover,
a.server-item:hover,
a.list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

a.list-row:active,
a.announcement-item:active,
a.post-item:active,
a.server-item:active,
a.list-item:active,
.poll-option:active,
.dropdown-link:active {
  transform: scale(0.985);
}

.server-item:hover,
.list-item:hover,
.post-item:hover,
.poll-option:hover {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.08);
}

.dropdown-link:hover {
  transform: translateX(2px);
}

.link-title {
  transition: color var(--p-motion-fast) ease, text-shadow var(--p-motion) ease;
}

.link-title:hover {
  text-shadow: 0 0 18px rgba(167, 243, 208, 0.25);
}

/* 表单聚焦感 */
.input,
.textarea,
select.input {
  transition:
    border-color var(--p-motion) ease,
    box-shadow var(--p-motion) ease,
    background var(--p-motion) ease,
    transform var(--p-motion-fast) ease;
}

.input:focus,
.textarea:focus,
select.input:focus {
  transform: translateY(-1px);
}

/* 页脚 / 杂项 */
.site-footer-nav-link,
.site-footer-icp-link {
  transition: color var(--p-motion-fast) ease, opacity var(--p-motion-fast) ease;
}

.site-footer-nav-link:hover,
.site-footer-icp-link:hover {
  color: #ecfdf5;
}

.music-fab {
  transition: transform var(--p-motion-fast) var(--p-ease-press), filter var(--p-motion-fast) ease;
}

.music-fab:hover {
  filter: brightness(1.06);
}

.music-fab:active {
  transform: scale(0.94);
}

.nav-drawer-toggle {
  transition: background var(--p-motion) ease, transform var(--p-motion-fast) ease;
}

.nav-drawer-toggle:active {
  transform: scale(0.94);
}

.hero-dot {
  transition: transform var(--p-motion-fast) ease, background var(--p-motion) ease, width var(--p-motion) ease;
}

.hero-dot:hover {
  transform: scale(1.15);
}

.lazy-view-loading {
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.03);
}

/* 触控设备：减弱悬停位移，保留按下反馈 */
@media (hover: none) {
  .btn:hover,
  .btn-auth-entry:hover,
  .nav-link:hover,
  .card:hover,
  a.list-row:hover,
  a.post-item:hover,
  a.server-item:hover {
    transform: none;
  }

  .btn:active,
  .btn-auth-entry:active,
  .nav-link:active,
  a.list-row:active,
  a.post-item:active,
  a.server-item:active {
    transform: scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .nav-link,
  .card,
  .list-item,
  .server-item,
  .post-item,
  .input,
  .textarea,
  .brand,
  .btn-auth-entry,
  .music-fab {
    transition: none !important;
  }

  .btn:hover,
  .btn:active,
  .nav-link:hover,
  .card:hover,
  .brand:hover {
    transform: none !important;
  }
}

/* ===== 公告图文并排 ===== */
.announce-detail-card .detail-header {
  margin-bottom: 18px;
}

.announce-detail {
  margin-bottom: 0;
}

.announce-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(280px, 1.08fr);
  gap: 22px 28px;
  align-items: start;
}

.announce-media {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 88px;
}

.announce-shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--p-border);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

.announce-shot-link {
  display: block;
  line-height: 0;
}

.announce-shot img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.announce-shot-link:hover img {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.announce-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.announce-body-solo {
  max-width: 720px;
}

.announce-lead {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--p-text);
  line-height: 1.55;
}

.announce-h {
  margin: 10px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--p-accent-2);
}

.announce-kv {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.announce-kv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.03);
}

.announce-kv-k {
  color: var(--p-text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  min-width: 4.5em;
}

.announce-kv-v {
  color: var(--p-text);
  font-weight: 700;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.95rem;
}

.announce-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.announce-chips li {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.1);
  color: var(--p-text);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
}

.announce-line {
  margin: 0;
  color: var(--p-text-soft);
  line-height: 1.75;
  font-size: 0.95rem;
}

.announce-line.announce-emph {
  color: var(--p-text);
  font-weight: 600;
}

.announce-detail .content-quote {
  display: block;
  margin: 0;
}

@media (max-width: 860px) {
  .announce-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .announce-media {
    position: static;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .announce-shot img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 520px) {
  .announce-media {
    grid-template-columns: 1fr;
  }

  .announce-lead {
    font-size: 1.05rem;
  }
}

/* ===== 首页：单服务器状态精选卡 ===== */
.home-bottom-grid.is-single-server {
  grid-template-columns: 1fr 1fr;
}

.home-side-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.home-side-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-discuss-card {
  flex: 1;
}

.home-announce-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--p-border);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.home-announce-link:hover {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.home-announce-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 700;
  color: var(--p-text);
  line-height: 1.35;
  margin-bottom: 8px;
}

.home-announce-desc {
  margin: 0 0 8px;
  color: var(--p-text-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.home-discuss-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-discuss-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.home-discuss-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--p-border);
}

.home-discuss-title {
  color: var(--p-accent-2);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
}

.server-status-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.server-status-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.server-status-head h3 {
  margin: 0;
}

.server-status-more {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.server-status-card.is-single {
  justify-content: flex-start;
}

.server-featured {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  background:
    radial-gradient(420px 140px at 100% 0%, rgba(52, 211, 153, 0.12), transparent 60%),
    rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.server-featured:hover {
  border-color: rgba(52, 211, 153, 0.45);
  background:
    radial-gradient(420px 140px at 100% 0%, rgba(52, 211, 153, 0.16), transparent 60%),
    rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.server-featured:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.55);
  outline-offset: 2px;
}

.server-featured-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.server-featured-identity {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.server-featured-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--p-border);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.server-featured-icon-fallback {
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--p-accent-2);
}

.server-featured-text {
  min-width: 0;
}

.server-featured-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--p-text);
  line-height: 1.3;
}

.server-featured-desc {
  margin: 4px 0 0;
  color: var(--p-text-soft);
  font-size: 0.8rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.server-featured-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.server-featured-stat {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--p-border);
  background: rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.server-featured-stat .stat-label {
  color: var(--p-text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.server-featured-stat .stat-value {
  color: var(--p-text);
  font-size: 0.88rem;
  font-weight: 700;
  word-break: break-word;
}

.server-featured-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--p-border);
}

.server-featured-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #5eead4);
  min-width: 0;
  transition: width 0.35s ease;
}

.server-featured-ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.06);
}

.server-featured-ip code {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--p-accent-2);
  word-break: break-all;
}

.server-featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1024px) {
  .home-bottom-grid.is-single-server {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .server-featured-stats {
    grid-template-columns: 1fr 1fr;
  }

  .server-featured-stats .server-featured-stat:last-child:nth-child(3) {
    grid-column: 1 / -1;
  }

  .server-featured-ip {
    flex-wrap: wrap;
  }
}
