@font-face {
  font-family: 'ROGFont';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/rog-regular.otf') format('opentype');
}

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

:root {
  --ease-out-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Windows 11 字体栈:Segoe UI Variable 优先,system-ui 兜底 */
  --font-family: 'Segoe UI Variable Text', 'Segoe UI Variable', 'Segoe UI', system-ui, 'Microsoft YaHei UI', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI Variable', 'Segoe UI', system-ui, 'Microsoft YaHei UI', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;

  /* Fluent 中性色(Mica 基色) */
  --bg-base: #202020;
  --bg-surface: #272727;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.55);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent: #ffffff;
  --accent-hover: #ffffff;
  --accent-color: #0078d4;
  --accent-soft: rgba(0, 120, 212, 0.3);
  --acrylic-bg: rgba(44, 44, 44, 0.72);
  --code-bg: rgba(0, 0, 0, 0.25);
  --code-text: #ffffff;
  --card-hover: rgba(255, 255, 255, 0.08);
  --btn-bg: rgba(255, 255, 255, 0.06);
  --btn-hover: rgba(255, 255, 255, 0.1);
  --btn-border: rgba(255, 255, 255, 0.1);
  --inset-bg: rgba(255, 255, 255, 0.04);
  --inset-border: rgba(255, 255, 255, 0.06);
  --scrollbar-thumb: rgba(255, 255, 255, 0.2);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.35);
  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.14), 0 8px 24px -12px rgba(0, 0, 0, 0.4);
  --shadow-navbar: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-pop: 0 8px 32px -8px rgba(0, 0, 0, 0.55);
  --radius-control: 4px;
  --radius-card: 8px;
  --content-max: 1120px;
}

body.light-theme {
  --bg-base: #f3f3f3;
  --bg-surface: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: rgba(0, 0, 0, 0.74);
  --text-muted: rgba(0, 0, 0, 0.52);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.06);
  --accent: #1a1a1a;
  --accent-hover: #333333;
  --accent-color: #005fb8;
  --accent-soft: rgba(0, 95, 184, 0.16);
  --acrylic-bg: rgba(249, 249, 249, 0.8);
  --code-bg: rgba(0, 0, 0, 0.04);
  --code-text: #1a1a1a;
  --card-hover: rgba(255, 255, 255, 0.9);
  --btn-bg: rgba(255, 255, 255, 0.7);
  --btn-hover: rgba(255, 255, 255, 0.95);
  --btn-border: rgba(0, 0, 0, 0.08);
  --inset-bg: rgba(0, 0, 0, 0.03);
  --inset-border: rgba(0, 0, 0, 0.06);
  --scrollbar-thumb: rgba(0, 0, 0, 0.18);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.32);
  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
  --shadow-navbar: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 8px 32px -8px rgba(0, 0, 0, 0.16);
}

body {
  font-family: var(--font-family);
  background: var(--bg-base);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Win11 毛玻璃表面的极细噪点:全局一层,低透明度增加质感 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body.light-theme::after {
  opacity: 0.05;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* 页面内容区保持透明,统一由 body 底色承托。 */
#page-content {
  background: transparent;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* ===== Logo 加载兜底:正黑体文字替代未加载的 logo 图片 ===== */
.logo-text-fallback {
  font-family: 'Microsoft JhengHei', '微軟正黑體', 'Microsoft YaHei UI', sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  display: inline-block;
  line-height: 1;
}

.logo-text-fallback.logo-text-hero {
  font-size: 56px;
}

/* ===== Theme Toggle Button (inside navbar for main site) ===== */
.theme-toggle {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  margin-left: 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform 0.35s var(--ease-out-spring),
              background 0.25s var(--ease-standard),
              box-shadow 0.3s var(--ease-out-soft),
              border-color 0.25s var(--ease-standard),
              color 0.25s var(--ease-standard);
}

.theme-toggle:hover {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  transform: translateY(-1px) scale(1.03);
}

.theme-toggle:active {
  transform: translateY(0) scale(0.97);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

body.light-theme .theme-toggle .icon-sun {
  display: block;
}

body.light-theme .theme-toggle .icon-moon {
  display: none;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  /* Acrylic 导航栏:半透明 + 背景模糊 */
  background: rgba(32, 32, 32, 0.72);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .navbar {
  background: rgba(243, 243, 243, 0.78);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.navbar-content {
  max-width: var(--content-max);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 0;
  transition: opacity 0.25s var(--ease-standard),
              transform 0.3s var(--ease-out-spring);
}

.navbar-brand:hover {
  opacity: 0.88;
  transform: translateY(-0.5px);
}

.navbar-brand span {
  color: inherit;
}

.navbar-brand img {
  height: 18px;
  width: auto;
  display: block;
}

body.light-theme .navbar-brand img {
  filter: invert(1);
}

.navbar-links {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s var(--ease-standard),
              transform 0.3s var(--ease-out-spring);
  position: relative;
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: rgba(0, 120, 212, 0.9);
  border-radius: 2px;
  transition: width 0.4s var(--ease-out-soft);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  opacity: 0.8;
  border-radius: 2px;
  transition: transform 0.4s var(--ease-out-spring),
              opacity 0.25s var(--ease-standard);
}

.navbar-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-4px, 6px);
}

.navbar-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-4px, -6px);
}

.navbar-mobile {
  display: none;
  max-width: var(--content-max);
  margin: 8px auto 0;
  padding: 16px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  flex-direction: column;
  gap: 12px;
  transform-origin: top center;
  animation: mobileIn 0.45s var(--ease-out-spring);
}

@keyframes mobileIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.navbar-mobile .nav-link {
  font-size: 15px;
  padding: 8px 0;
}

.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 0;
  overflow: hidden;
}

.orb {
  display: none;
}

.hero-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-logo {
  width: min(620px, 86vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 14px 36px rgba(2, 8, 30, 0.55));
}

body.light-theme .hero-logo {
  filter: invert(1) drop-shadow(0 12px 32px rgba(0, 0, 0, 0.12));
}

.display-font {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}

.cta {
  padding: 0 24px;
}

.cta-box {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 28px 36px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              border-color 0.25s var(--ease-standard);
}

.cta-box:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.35);
}

.cta-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 32px;
  color: var(--accent);
}

.cta-text {
  flex: 1;
}

.cta-text h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cta-text p {
  font-size: 15px;
  color: var(--text-muted);
}

.cta-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 12px 26px;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard),
              border-color 0.25s var(--ease-standard),
              color 0.25s var(--ease-standard);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 强调色按钮:仅用于关键操作 */
.btn-primary {
  background: var(--accent-color);
  border: 1px solid transparent;
  color: #ffffff;
}

body.light-theme .btn-primary {
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-color);
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn:focus-visible,
.copy-btn:focus-visible,
.download-btn:focus-visible {
  outline: 2px solid rgba(0, 120, 212, 0.85);
  outline-offset: 2px;
}

::selection {
  background: rgba(0, 120, 212, 0.4);
  color: #ffffff;
}

body.light-theme ::selection {
  background: rgba(0, 120, 212, 0.25);
  color: #1b1b1b;
}

.page {
  position: relative;
  padding: 76px 16px 60px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-header {
  max-width: 1320px;
  margin: 0 auto 32px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.mc-font {
  font-family: 'ROGFont', var(--font-family);
  font-weight: 400;
}

.page-header h1.mc-font {
  font-family: 'ROGFont', var(--font-family);
  letter-spacing: 1px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-muted);
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 36px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard),
              border-color 0.25s var(--ease-standard);
}

.glass-card:hover {
  background: var(--card-hover);
  transform: translateY(-3px);
  border-color: var(--accent-soft);
  box-shadow: 0 20px 48px -18px rgba(0, 0, 0, 0.35);
}

.server-section {
  width: 100%;
  max-width: 1840px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.server-header {
  margin-bottom: 24px;
}

.server-title h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.server-status.online {
  color: #10b981;
}

.server-status.offline {
  color: #ef4444;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

.server-status.offline .status-dot {
  background: #ef4444;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.server-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-row label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.address-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.address,
.port {
  padding: 14px 18px;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 18px;
}

.address {
  flex: 1;
}

.copy-btn {
  padding: 10px 16px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s var(--ease-standard);
}

.copy-btn:hover {
  background: var(--btn-hover);
}

.copy-btn:active {
  transform: translateY(0) scale(0.97);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-item {
  padding: 12px 16px;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
}

.detail-item label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-item span {
  font-size: 14px;
  font-weight: 500;
}

.server-card {
  width: 100%;
  max-width: 1840px;
  margin: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
}

.server-title .mc-font {
  letter-spacing: 1px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.players-display {
  text-align: right;
}

.players-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.players-value {
  font-family: 'ROGFont', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--accent);
}

.card-body {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.card-chart {
  width: 100%;
  flex: 1;
  min-height: 300px;
}

.game-modes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.mode {
  text-align: center;
  padding: 14px;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
}

.mode-count {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.mode-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===== Connect 页面：大区选择 ============================================= */
.connect-current {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}
.connect-current-label {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.connect-current-addr {
  flex: 1;
  font-family: var(--font-family);
  font-size: 20px;
  color: var(--accent);
  letter-spacing: 1px;
}

.connect-grid {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.connect-card {
  position: relative;
  padding: 20px 22px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-soft),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard);
  overflow: hidden;
}
.connect-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
}
.connect-card.selected {
  box-shadow: 0 18px 42px -16px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--text-secondary);
}

.connect-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.connect-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connect-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.connect-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}
.connect-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s var(--ease-out-soft), transform 0.2s var(--ease-out-soft);
}
.connect-card.selected .connect-card-check {
  opacity: 1;
  transform: scale(1);
}

.connect-card-provinces {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}

.connect-card-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.connect-card-city {
  font-size: 12px;
  color: var(--text-muted);
}
.connect-card-addr {
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}
.connect-card-stable .connect-card-addr {
  font-family: var(--font-family);
  color: var(--text-muted);
  font-size: 13px;
}

/* 线路延迟标签（测速结果） */
.connect-card-latency {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.connect-card-latency.good {
  color: #4ade80;
}
.connect-card-latency.bad {
  color: #f87171;
}

/* 一键测速卡片 */
.connect-card-test {
  border: 1px dashed var(--inset-border);
}
.connect-card-test:active {
  transform: scale(0.99);
}
.connect-card-dot-test {
  background: var(--text-secondary);
  box-shadow: 0 0 8px rgba(128, 128, 128, 0.5);
  animation: connectTestPulse 1.2s ease-in-out infinite;
}
@keyframes connectTestPulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* 域名切换按钮 */
.connect-domain-switch {
  display: flex;
  gap: 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 4px;
}
.domain-btn {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out-soft);
}
.domain-btn:hover {
  color: var(--text-primary);
}
.domain-btn.active {
  background: var(--btn-bg);
  color: var(--text-primary);
}

.download-list {
  max-width: 1840px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.download-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 22px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard);
}

.download-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  box-shadow: 0 18px 42px -16px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--text-secondary);
}

.download-icon {
  font-size: 36px;
}

.download-info {
  flex: 1;
}

.download-info h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.download-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.download-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.download-list .loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.wiki-list {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.wiki-list.active {
  display: grid;
}

.wiki-list .loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* 通用空状态:水平居中(启动器占位、文档维护提示等) */
.empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 34px 0;
}

.wiki-article {
  max-width: 1320px;
  margin: 0 auto;
}

.wiki-article.active {
  display: block;
}

.wiki-article:not(.active) {
  display: none;
}

/* ===== 文档页:右上角分类选择 ===== */
.wiki-content {
  max-width: 900px;
  margin: 0 auto;
}

.page-header h1.docs-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0;
}

.docs-toolbar {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto 18px;
  display: flex;
  justify-content: flex-end;
}

.docs-select-wrap {
  position: relative;
  display: inline-flex;
}

.docs-select-wrap::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.docs-select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  padding: 9px 34px 9px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  outline: none;
  transition: background 0.15s var(--ease-standard),
              border-color 0.15s var(--ease-standard),
              box-shadow 0.15s var(--ease-standard);
}

.docs-select:hover {
  background: rgba(255, 255, 255, 0.08);
}

.docs-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.22);
}

.docs-select option {
  background: #2b2b2b;
  color: #ffffff;
}

body.light-theme .docs-select {
  background: rgba(255, 255, 255, 0.7);
  color-scheme: light;
}

body.light-theme .docs-select:hover {
  background: #ffffff;
}

body.light-theme .docs-select option {
  background: #ffffff;
  color: #1a1a1a;
}

@media (max-width: 600px) {
  .page-header h1.docs-title { font-size: 24px; }
  .docs-toolbar { justify-content: stretch; }
  .docs-select-wrap { width: 100%; }
  .docs-select { width: 100%; }
}

/* ---- Wiki view transitions (crossfade + subtle slide) ---- */
.wiki-view-in {
  animation: wikiViewIn 0.32s var(--ease-out-soft) both;
}
.wiki-view-out {
  animation: wikiViewOut 0.18s var(--ease-standard) both;
}
@keyframes wikiViewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wikiViewOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

/* ---- Article enter (content inside) ---- */
.wiki-article-body.wiki-enter {
  animation: wikiBodyIn 0.36s var(--ease-out-soft) both;
}
@keyframes wikiBodyIn {
  from { opacity: 0; transform: translateY(6px); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Article header + back button ---- */
.wiki-article-header {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wiki-back {
  align-self: flex-start;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.35s var(--ease-out-spring),
              background 0.25s var(--ease-standard),
              border-color 0.25s var(--ease-standard),
              box-shadow 0.3s var(--ease-out-soft);
}
.wiki-back:hover {
  background: var(--glass-bg);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(-2px);
  box-shadow: var(--shadow-card);
}
.wiki-back:active { transform: translateX(0) scale(0.98); }

.wiki-article-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  line-height: 1.25;
  margin: 0;
}
.wiki-article-sub {
  font-size: 14px;
  color: var(--subtitle-color);
  margin: 0;
}

/* ---- Skeleton / shimmer loading ---- */
.wiki-skel-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto;
}
.wiki-card-skel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 22px;
  min-height: 66px;
  overflow: hidden;
  position: relative;
}
.wiki-skel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 0;
}
.wiki-skel-title {
  height: 28px;
  width: 48%;
  border-radius: 6px;
  background: var(--skeleton, rgba(148,163,184,0.14));
}
.wiki-skel-sub {
  height: 14px;
  width: 30%;
  border-radius: 4px;
  background: var(--skeleton, rgba(148,163,184,0.12));
  margin-bottom: 6px;
}
.wiki-skel-line {
  height: 13px;
  border-radius: 4px;
  background: var(--skeleton, rgba(148,163,184,0.12));
}

/* Shimmer overlay:纯色呼吸,不使用渐变扫光 */
.wiki-card-skel::after,
.wiki-skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.1);
  animation: wikiSkelPulse 1.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes wikiSkelPulse {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
body.light-theme {
  --skeleton: rgba(15, 23, 42, 0.08);
}

/* ---- Download card entrance ---- */
.download-card-enter {
  animation: wikiBodyIn 0.38s var(--ease-out-soft) both;
}

.wiki-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
}

.wiki-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  box-shadow: 0 18px 42px -16px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--text-secondary);
}

.wiki-card-info {
  flex: 1;
}

.wiki-card-info h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.wiki-card-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 12px;
  }

  .navbar-content {
    height: 48px;
    padding: 0 14px;
  }

  .navbar-brand {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .navbar-links {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-mobile.active {
    display: flex;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    margin-left: 8px;
    border-radius: var(--radius-control);
  }

  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  .page {
    padding: 72px 12px 40px;
  }

  .hero {
    min-height: 44vh;
    padding: 16px 12px 0;
  }

  .cta-box {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .cta-text h3 {
    font-size: 18px;
  }

  .cta-text p {
    font-size: 13px;
  }

  .cta-buttons {
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 30px;
  }

  .page-header p {
    font-size: 14px;
  }

  .glass-card {
    padding: 22px 18px;
    border-radius: 8px;
  }

  .server-section {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .server-card {
    padding: 22px 18px;
  }

  .card-header {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  .players-display {
    text-align: left;
  }

  .players-value {
    font-size: 40px;
  }

  .address-group {
    flex-direction: column;
    align-items: stretch;
  }

  .address, .port {
    font-size: 15px;
    padding: 12px 14px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .game-modes {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-card {
    padding: 24px 18px !important;
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .about-avatar {
    width: 96px;
    height: 96px;
    font-size: 44px;
    margin: 0 auto;
  }

  .about-info h2 {
    font-size: 22px;
  }

  .contact-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px;
  }

  .contact-value {
    margin-left: 0;
    word-break: break-all;
  }

  .download-card {
    flex-direction: column;
    text-align: center;
    padding: 18px;
    gap: 14px;
  }

  .download-meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .wiki-card {
    flex-direction: column;
    text-align: center;
    padding: 18px;
    gap: 14px;
  }

  .tool-card {
    flex-direction: column;
    text-align: center;
    padding: 18px;
    gap: 14px;
  }

  .wiki-text .t {
    font-size: 22px;
    margin: 24px 0 12px;
  }

  .wiki-text .tt {
    font-size: 17px;
  }

  .wiki-text .code {
    padding: 12px 14px;
    font-size: 13px;
  }

  .rgb-tool-card {
    padding: 20px 16px;
  }

  .mc-font-rgb {
    font-size: 24px;
  }

  .rgb-paste-input, .rgb-output {
    font-size: 13px;
    padding: 12px 14px;
  }

  .rgb-color-item .hexText {
    font-size: 13px;
  }

  .footer {
    padding: 24px 14px;
  }

  .footer p {
    font-size: 12px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 13px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
    margin-left: 6px;
    border-radius: 4px;
  }

  .theme-toggle svg {
    width: 17px;
    height: 17px;
  }

  .glass-card {
    padding: 18px 14px;
  }

  .server-card {
    padding: 18px 14px;
  }

  .players-value {
    font-size: 34px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .game-modes {
    grid-template-columns: 1fr;
  }

  .mode-count {
    font-size: 18px;
  }

  .cta-box {
    padding: 20px 16px;
  }
}

.wiki-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
}

.wiki-text .t {
  display: block;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.wiki-text .tt {
  display: block;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent);
}

.wiki-text .sp {
  display: block;
  height: var(--sp-size, 1em);
}

.wiki-text .s {
  font-weight: 700;
  color: var(--text-primary);
}

.wiki-text .code {
  display: block;
  font-family: var(--font-family);
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 20px;
  border-radius: 4px;
  margin: 16px 0;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--glass-border);
}

.wiki-text .ext-link {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s;
}

.wiki-text .ext-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.wiki-text .wiki-img {
  display: block;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wiki-text p {
  margin: 8px 0;
}

.download-btn {
  padding: 12px 24px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s var(--ease-standard);
  text-decoration: none;
  display: inline-block;
}

.download-btn:hover {
  background: var(--btn-hover);
}

.about-card {
  max-width: 1320px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 60px !important;
}

.about-avatar {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  font-size: 56px;
  color: var(--accent);
}

.about-info h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 6px;
}

.about-title {
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.about-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-contact {
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.about-contact h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 20px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.contact-item:hover {
  background: var(--card-hover);
}

.contact-icon {
  font-size: 18px;
}

.contact-label {
  font-size: 13px;
  color: var(--text-muted);
}

.contact-value {
  margin-left: auto;
  font-weight: 500;
  font-size: 13px;
}

.thanks-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.thanks-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 10px;
}

.thanks-card p {
  font-size: 15px;
  color: var(--text-secondary);
}

.footer {
  padding: 32px 24px;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Tools Page ===== */
.tools-list {
  max-width: 1840px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.4s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              background 0.25s var(--ease-standard);
}

.tool-card:hover {
  transform: translateY(-3px);
  background: var(--card-hover);
  box-shadow: 0 18px 42px -16px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--text-secondary);
}

.tool-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  border-radius: 8px;
  flex-shrink: 0;
}

.tool-card-info {
  flex: 1;
}

.tool-card-info h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tool-card-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.tool-card-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-card-arrow {
  transform: translateX(4px);
}

/* ===== RGB Tool Page ===== */
.rgb-tool-container {
  max-width: 1840px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.rgb-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 10px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rgb-back-btn:hover {
  background: var(--card-hover);
}

.rgb-tool-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.rgb-tool-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.rgb-tool-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 28px;
}

.rgb-preview-area {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 28px;
  text-align: center;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-font-rgb {
  font-family: 'ROGFont', var(--font-family);
  font-size: 32px;
  word-wrap: break-word;
  line-height: 1.4;
}

.rgb-section {
  margin-bottom: 20px;
}

.rgb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.rgb-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-size: 14px;
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease;
}

.rgb-input:focus {
  border-color: #1b1b1b;
}

.rgb-input-small {
  width: 80px;
}

.rgb-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-size: 14px;
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
}

.rgb-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.rgb-color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rgb-color-item .hexColor {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

.rgb-color-item .hexColor::-webkit-color-swatch-wrapper {
  padding: 0;
}

.rgb-color-item .hexColor::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.rgb-color-item .hexColor::-moz-color-swatch {
  border: none;
  border-radius: 8px;
}

.rgb-color-item .hexText {
  width: 72px;
  padding: 4px 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  text-align: center;
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.8);
  outline: none;
}

.rgb-color-item .hexText:focus {
  border-color: #1b1b1b;
}

.rgb-color-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rgb-action-btn {
  padding: 8px 16px;
  background: #f3f3f3;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  color: #1b1b1b;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.rgb-action-btn:hover {
  background: #ececec;
}

.rgb-paste-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.8);
  outline: none;
}

.rgb-paste-input:focus {
  border-color: #1b1b1b;
}

.rgb-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.rgb-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.rgb-checkbox input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.rgb-error {
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 6px;
}

.rgb-output {
  width: 100%;
  height: 95px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: #1a1a2e;
  background: rgba(255, 255, 255, 0.8);
  box-sizing: border-box;
  resize: none;
  outline: none;
}

.rgb-copy-btn {
  margin-top: 10px;
  padding: 10px 20px;
  background: #fdfdfd;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 4px;
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rgb-copy-btn:hover {
  background: #f9f9f9;
}

/* ===== Preloader ===== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  overflow: hidden;
  transition: opacity 0.45s var(--ease-out-soft),
              visibility 0.45s var(--ease-out-soft);
}

/* 预加载页与页面主体同为纯色底 */
.preloader::before {
  content: none;
}

body.light-theme .preloader::before {
  content: none;
}

.preloader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: preloaderIn 0.6s var(--ease-out-soft) both;
}

@keyframes preloaderIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.preloader-brand {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--accent);
  white-space: nowrap;
}

.preloader-brand img {
  height: 40px;
  width: auto;
  display: block;
}

body.light-theme .preloader-brand img {
  filter: invert(1);
}

/* Loading spinner (same style as docs/download nav loader) */
.preloader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  animation: preloaderSpin 0.9s linear infinite;
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader.hidden .preloader-inner {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.35s var(--ease-out-soft),
              transform 0.35s var(--ease-out-soft);
}

@media (max-width: 768px) {
  .preloader-brand {
    font-size: 32px;
    letter-spacing: 2px;
  }

  .preloader-brand img {
    height: 32px;
  }
}

@media (max-width: 480px) {
  .preloader-brand {
    font-size: 28px;
    letter-spacing: 1.5px;
  }

  .preloader-brand img {
    height: 28px;
  }
}

/* ============ SPA 页面切换过渡 ============ */
#page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: pageEnter 0.32s var(--ease-out-soft) both;
}
#page-content.page-leave {
  animation: pageLeave 0.18s var(--ease-out-soft) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageLeave {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-6px); }
}

/* Wiki 正文：图片加载前保持隐藏，避免"文字先显/图片后跳" */
.wiki-article-body {
  opacity: 0;
  transition: opacity 0.28s var(--ease-out-soft);
}
.wiki-article-body.wiki-enter,
.wiki-article-body.wiki-images-ready {
  opacity: 1;
}

/* Wiki 图片：decode 期间占位，避免布局跳动 */
.wiki-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 18px 0;
  background: var(--skeleton);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
/* ===== Home: status strip + quick grid ===== */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: -6px auto 30px;
  padding: 10px 22px;
  width: fit-content;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #98a2b8;
  position: relative;
  flex-shrink: 0;
}

.status-dot.online {
  background: #2ecc71;
}

.status-dot.online::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(46, 204, 121, 0.5);
  animation: statusPulse 2s ease-out infinite;
}

@keyframes statusPulse {
  from { transform: scale(0.6); opacity: 1; }
  to   { transform: scale(1.7); opacity: 0; }
}

.status-players {
  font-weight: 600;
  color: var(--text-primary);
}

.quick-grid {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.quick-card {
  position: relative;
  display: block;
  padding: 22px 20px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out-spring),
              box-shadow 0.3s var(--ease-out-soft),
              border-color 0.25s var(--ease-standard);
}

.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
  border-color: var(--text-secondary);
}

.quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--inset-bg);
  border: 1px solid var(--inset-border);
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.quick-icon svg {
  width: 22px;
  height: 22px;
}

.quick-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.quick-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.quick-hint {
  font-family: 'ROGFont', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.quick-card.copied .quick-hint {
  color: #2ecc71;
}

@media (max-width: 600px) {
  .status-strip { flex-wrap: wrap; text-align: center; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .quick-card { padding: 16px 14px 12px; }
}

/* ===== Nav loader (slow pages: docs / download) ===== */
.nav-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(32, 32, 32, 0.8);
  backdrop-filter: blur(40px) saturate(1.2);
  -webkit-backdrop-filter: blur(40px) saturate(1.2);
}

body.light-theme .nav-loader {
  background: rgba(243, 243, 243, 0.8);
}

.nav-loader.active {
  display: flex;
}

.nav-loader-spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent);
  animation: navSpin 0.9s linear infinite;
}

@keyframes navSpin {
  to { transform: rotate(360deg); }
}

.nav-loader-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== About: team cards + duty list ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 22px;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.team-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-info h2 {
  margin: 0 0 2px;
  font-size: 17px;
}

.team-role {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
}

.team-duties {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.team-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.team-link:hover {
  text-decoration: underline;
}

.duty-card {
  max-width: 900px;
  margin: 0 auto;
}

/* ===== 启动器页:版本下载列表(GitHub Releases 风格) ===== */
.page.page-launcher {
  overflow: visible;
}

.launcher-layout {
  width: 100%;
  max-width: 1188px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.release-sidebar {
  position: sticky;
  top: 76px;
  flex: none;
  width: 296px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .release-sidebar {
  border-right-color: rgba(0, 0, 0, 0.08);
}

.release-sidebar-title {
  padding: 4px 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.release-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.release-sidebar-link {
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-control);
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
}

.release-sidebar-link:hover {
  background: var(--card-hover);
  color: var(--text-primary);
}

.release-sidebar-link.active {
  background: var(--card-hover);
  color: var(--text-primary);
  font-weight: 600;
}

.release-list {
  flex: 1;
  min-width: 0;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.release-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  scroll-margin-top: 76px;
}

.release-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .release-head {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

.release-tag-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-muted);
}

.release-version {
  font-size: 15px;
  font-weight: 600;
  color: #6cb0ff;
}

.release-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(0, 120, 212, 0.14);
  border: 1px solid rgba(0, 120, 212, 0.4);
  color: #6cb0ff;
}

.release-badge.beta {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-secondary);
}

body.light-theme .release-version {
  color: #005fb8;
}

body.light-theme .release-badge {
  background: rgba(0, 95, 184, 0.08);
  border-color: rgba(0, 95, 184, 0.35);
  color: #005fb8;
}

body.light-theme .release-badge.beta {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.16);
  color: var(--text-secondary);
}

.release-date {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.release-assets {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 16px;
}

.release-asset-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-muted);
}

.release-file {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  word-break: break-all;
}

a.release-file:hover {
  color: #6cb0ff;
  text-decoration: underline;
}

body.light-theme a.release-file:hover {
  color: #005fb8;
}

.release-status {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
}

.release-status.warn {
  color: #ffb340;
}

.release-download {
  margin-left: auto;
  padding: 5px 14px;
  border-radius: var(--radius-control);
  background: var(--accent-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s;
}

.release-download:hover {
  filter: brightness(1.12);
}

.release-download.disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .launcher-layout { gap: 24px; }
  .release-sidebar { width: 248px; }
}

@media (max-width: 900px) {
  .launcher-layout { display: block; }
  .release-sidebar { display: none; }
  .release-list { max-width: 860px; margin: 0 auto; }
}

@media (max-width: 600px) {
  .release-head { padding: 12px 14px; }
  .release-assets { padding: 10px 14px; }
  .release-date { margin-left: 0; }
  .release-status { flex-basis: 100%; }
}

.duty-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.duty-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.duty-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.duty-list li:last-child {
  border-bottom: none;
}

.duty-list b {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

body.light-theme .duty-list li {
  border-bottom-color: rgba(15, 23, 42, 0.10);
}

/* ===== 卡片:Acrylic 半透明面板(容器圆角 8px) =====
   卡片背后是纯色底,模糊无可视效果;不加 backdrop-filter,
   避免 GPU 合成层在右/下边缘产生亮色竖带伪影 */
.cta-box, .glass-card, .connect-current, .connect-card, .download-card,
.wiki-card, .wiki-card-skel, .tool-card, .status-strip, .quick-card, .navbar-mobile {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

body.light-theme .cta-box, body.light-theme .glass-card, body.light-theme .connect-current,
body.light-theme .connect-card, body.light-theme .download-card, body.light-theme .wiki-card,
body.light-theme .tool-card, body.light-theme .status-strip, body.light-theme .quick-card,
body.light-theme .navbar-mobile {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--shadow-card);
}
