/* ========================================================
   原界 OrigMC - 純粹極簡黑白 (Monochrome Minimalist)
   - 拒絕過度裝飾與 AI 感漸變/彩色發光
   - 嚴格限定純黑底、純白文字與精準灰階層次
   - 主封面以使用者實景圖延伸至全景
   - 左側選點式直線與選單維持極簡俐落黑白
   - 100% 零表情符號（Zero Emoji）
   ======================================================== */

:root {
  /* ========== 純粹黑白灰階調色盤 ========== */
  --bg-canvas: #09090b;
  --bg-sidebar: rgba(14, 14, 16, 0.94);
  --bg-card: rgba(18, 18, 20, 0.85);
  --bg-card-hover: rgba(26, 26, 30, 0.95);
  --bg-card-solid: #121214;
  --bg-input: rgba(22, 22, 26, 0.75);
  --bg-elevated: rgba(30, 30, 36, 0.8);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.12);
  --border-card-hover: rgba(255, 255, 255, 0.35);

  --text-main: #ffffff;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  /* 純黑白焦點色系：白高亮、黑底基底、純灰邊框 */
  --accent-primary: #ffffff;
  --accent-primary-hover: #e4e4e7;
  --accent-glow: rgba(255, 255, 255, 0.12);
  --accent-secondary: #a1a1aa;

  --sidebar-width: 260px;
  --header-height-mobile: 60px;
  --radius-lg: 14px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.75);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* ========== 淺色純白黑灰模式 ========== */
  --bg-canvas: #fafafa;
  --bg-sidebar: rgba(255, 255, 255, 0.96);
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-card-solid: #ffffff;
  --bg-input: rgba(244, 244, 245, 0.85);
  --bg-elevated: #f4f4f5;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.14);
  --border-card-hover: rgba(0, 0, 0, 0.4);

  --text-main: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;

  --accent-primary: #09090b;
  --accent-primary-hover: #27272a;
  --accent-glow: rgba(0, 0, 0, 0.08);
  --accent-secondary: #71717a;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* ========================================================
   基礎重設與全域排版
   ======================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 捲軸黑白簡潔美化 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.35);
}

::selection {
  background: #ffffff;
  color: #000000;
}
[data-theme="light"] ::selection {
  background: #000000;
  color: #ffffff;
}

/* ========================================================
   主頁面全景背景層 (100% 完整原圖顯示，無任何黑影遮罩)
   ======================================================== */
.site-cover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cover-image-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('img/hero_bg.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 1; /* 100% 完全明亮原圖顯示 */
  filter: none; /* 原圖色彩與亮度，無任何暗化濾鏡 */
}

/* 徹底移除黑影遮罩，保證整張底圖由上至下完整原貌呈現 */
.cover-gradient-vignette {
  display: none;
}

/* ========================================================
   主版面架構 (App Layout)
   ======================================================== */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ========================================================
   左側側邊導覽欄 (Sidebar - 預設隱藏，滑鼠懸停滑出)
   ======================================================== */
/* 螢幕左側感應熱區 */
.sidebar-hover-zone {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 24px;
  z-index: 99;
  background: transparent;
  cursor: pointer;
}

/* 左側邊緣垂直置中的小巧細直線指示條 (白灰極簡) */
.sidebar-hover-zone::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 3px;
  height: 52px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

[data-theme="light"] .sidebar-hover-zone::before {
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

/* 滑鼠接近左側熱區時微動加長 */
.sidebar-hover-zone:hover::before {
  width: 5px;
  height: 70px;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .sidebar-hover-zone:hover::before {
  background: #000000;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

/* 側邊欄展開時平滑隱藏指示條 */
.sidebar.hovered ~ .sidebar-hover-zone::before,
.sidebar:hover ~ .sidebar-hover-zone::before,
.sidebar.open ~ .sidebar-hover-zone::before {
  opacity: 0;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transform: translateX(-100%);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease;
}

.sidebar-hover-zone:hover + .app-layout .sidebar,
.sidebar:hover,
.sidebar.hovered,
.sidebar.open {
  transform: translateX(0);
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.65);
}

[data-theme="light"] .sidebar-hover-zone:hover + .app-layout .sidebar,
[data-theme="light"] .sidebar:hover,
[data-theme="light"] .sidebar.hovered,
[data-theme="light"] .sidebar.open {
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.12);
}

.sidebar-top {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.brand-logo-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo-wrap img,
.brand-fallback {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-card);
}

.brand-fallback {
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .brand-fallback {
  background: #000000;
  color: #ffffff;
}

.brand-pulse {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  background-color: #ffffff;
  border: 2px solid var(--bg-sidebar);
  border-radius: 50%;
}

[data-theme="light"] .brand-pulse {
  background-color: #000000;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 側邊欄導覽按鈕群 (左側選點式，移除貫穿垂直直線) */
.sidebar-nav {
  position: relative;
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 12px 6px;
  position: relative;
  z-index: 2;
}

/* 選點式項目樣式 (Nav Item) */
.nav-item {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

/* 左側圓點指引指示器 (The Indicator Dot) */
.nav-indicator {
  position: relative;
  z-index: 3;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bg-sidebar);
  border: 2px solid var(--text-dim);
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.nav-icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-text {
  flex: 1;
}

.nav-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Hover 與 Active 狀態 (極簡黑白高亮) */
.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-item:hover .nav-indicator {
  border-color: #ffffff;
  transform: scale(1.25);
}

[data-theme="light"] .nav-item:hover .nav-indicator {
  border-color: #000000;
}

.nav-item:hover .nav-icon {
  color: var(--text-main);
}

.nav-item.active {
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .nav-item.active {
  color: #ffffff;
  background: #000000;
  border-color: #000000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.nav-item.active .nav-indicator {
  background-color: #000000;
  border-color: #000000;
  transform: scale(1.35);
}

[data-theme="light"] .nav-item.active .nav-indicator {
  background-color: #ffffff;
  border-color: #ffffff;
}

.nav-item.active .nav-icon {
  color: #000000;
}

[data-theme="light"] .nav-item.active .nav-icon {
  color: #ffffff;
}

.nav-item.active .nav-badge {
  background: rgba(0, 0, 0, 0.12);
  color: #000000;
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* 側邊欄底部 */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-ip-card {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-ip-card:hover {
  background: var(--bg-card-hover);
  border-color: #ffffff;
}

[data-theme="light"] .sidebar-ip-card:hover {
  border-color: #000000;
}

.sidebar-ip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.sidebar-ip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

[data-theme="light"] .sidebar-ip-dot {
  background: #000000;
}

.sidebar-copy-ic {
  margin-left: auto;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.sidebar-ip-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions {
  display: flex;
  align-items: center;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  background: var(--bg-card);
  border-color: #ffffff;
}

[data-theme="light"] .theme-toggle-btn:hover {
  border-color: #000000;
}

/* ========================================================
   右側主要內容區 (Content Wrapper - 居中無偏移)
   ======================================================== */
.content-wrapper {
  flex: 1;
  margin-left: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* 行動版專用頂部 */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height-mobile);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 90;
}

.mobile-menu-btn,
.mobile-theme-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.mobile-brand {
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}

/* 主面板容器 (完全水平置中) */
.main-panel {
  flex: 1;
  padding: 48px 32px;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

/* ========================================================
   分頁控制核心 (Tab Pane Switching - 靜態切換，字體文字絕不晃動位移)
   ======================================================== */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ========================================================
   標題橫幅 (Page Banner - 首頁與子分頁共通)
   ======================================================== */
.page-banner {
  margin-bottom: 32px;
}

.page-banner.home-banner {
  margin-bottom: 36px;
  padding: 24px 0 10px;
}

.page-banner.compact {
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 20px;
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

[data-theme="light"] .banner-badge {
  background: rgba(0, 0, 0, 0.05);
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

[data-theme="light"] .pulse-indicator {
  background: #000000;
}

.banner-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 14px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85), 0 2px 6px rgba(0, 0, 0, 0.95);
}

.banner-title span {
  color: #f4f4f5;
  font-weight: 700;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.85);
}

.banner-subtitle {
  font-size: 1.08rem;
  color: #ffffff;
  max-width: 640px;
  line-height: 1.65;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ========================================================
   首頁快捷連線列 (Hero Quick Access)
   ======================================================== */
.hero-quick-access {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.access-ip-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 320px;
}

.access-ip-box:hover {
  background: var(--bg-card-hover);
  border-color: #ffffff;
}

[data-theme="light"] .access-ip-box:hover {
  border-color: #000000;
}

.access-ip-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.access-ip-text {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.access-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

[data-theme="light"] .access-copy-btn {
  background: rgba(0, 0, 0, 0.06);
}

.access-ip-box:hover .access-copy-btn {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

[data-theme="light"] .access-ip-box:hover .access-copy-btn {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.hero-cta-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 通用按鈕系統 (黑白極簡) */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
}

.btn-action.full-width {
  width: 100%;
}

.btn-action-primary {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-action-primary {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-action-primary:hover {
  background: #e4e4e7;
  color: #000000;
}

[data-theme="light"] .btn-action-primary:hover {
  background: #27272a;
  color: #ffffff;
}

.btn-action-secondary {
  background: var(--bg-card);
  border-color: var(--border-card);
  color: var(--text-main);
  backdrop-filter: blur(12px);
}

.btn-action-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #ffffff;
  color: var(--text-main);
}

[data-theme="light"] .btn-action-secondary:hover {
  border-color: #000000;
}

.btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 0;
}

.btn-text-link:hover {
  color: var(--text-secondary);
}

/* ========================================================
   卡片與網格佈局 (Dashboard Grid)
   ======================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-fast);
}

.content-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

[data-theme="light"] .content-card:hover {
  border-color: rgba(0, 0, 0, 0.3);
}

.content-card.full-width {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

[data-theme="light"] .card-icon {
  background: rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 規格清單 */
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.spec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.spec-value small {
  font-weight: 500;
  color: var(--text-muted);
}

/* 即時概況統計方塊 */
.overview-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-box {
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
}

.stat-name {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.stat-status-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-figure {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
}

.online-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
}

[data-theme="light"] .online-indicator {
  background: #000000;
}

.discord-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* 常見問答折疊面板 */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item[open] {
  border-color: rgba(255, 255, 255, 0.3);
  background: var(--bg-card);
}

[data-theme="light"] .accordion-item[open] {
  border-color: rgba(0, 0, 0, 0.3);
}

.accordion-item summary {
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary i {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item[open] summary i {
  transform: rotate(180deg);
  color: var(--text-main);
}

.accordion-content {
  padding: 0 18px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.accordion-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="light"] .accordion-content code {
  background: rgba(0, 0, 0, 0.08);
}

/* ========================================================
   狀態頁面專屬樣式 (Status Monitor)
   ======================================================== */
.status-monitor-box {
  padding: 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dc-online-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dc-online-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.dc-online-number {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  margin-bottom: 4px;
}

.dc-total-number {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.system-refresh-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 18px;
  justify-content: flex-end;
}

/* ========================================================
   規章頁面專屬樣式 (Rules)
   ======================================================== */
.sub-tab-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.sub-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sub-tab-btn:hover {
  color: var(--text-main);
  border-color: #ffffff;
}

[data-theme="light"] .sub-tab-btn:hover {
  border-color: #000000;
}

.sub-tab-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

[data-theme="light"] .sub-tab-btn.active {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.sub-pane {
  display: none;
}

.sub-pane.active {
  display: block;
}

.rules-card-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rule-card {
  display: flex;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.rule-card:hover {
  border-color: #ffffff;
}

[data-theme="light"] .rule-card:hover {
  border-color: #000000;
}

.rule-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  opacity: 0.7;
  flex-shrink: 0;
  line-height: 1.2;
}

.rule-body {
  flex: 1;
}

.rule-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.rule-detail {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ========================================================
   公告時間軸 (Announcements Timeline)
   ======================================================== */
.announcements-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.announce-card {
  padding: 20px 22px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.announce-card:hover {
  background: var(--bg-card-hover);
  border-color: #ffffff;
}

[data-theme="light"] .announce-card:hover {
  border-color: #000000;
}

.announce-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.announce-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .announce-date {
  background: rgba(0, 0, 0, 0.06);
}

.announce-content {
  font-size: 0.93rem;
  color: var(--text-main);
  line-height: 1.75;
}

.announce-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.announce-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.announce-img:hover {
  transform: scale(1.02);
}

.announcement-more-bar {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================================================
   Discord 頁面專屬容器 (極簡純黑白)
   ======================================================== */
.discord-widget-container {
  padding: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.discord-widget-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.discord-server-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.discord-members-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
}

.discord-member-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(40%);
}

.avatar-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

[data-theme="light"] .avatar-fallback {
  background: #000000;
  color: #ffffff;
}

.member-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-join-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* ========================================================
   頁尾 (Footer)
   ======================================================== */
.app-footer {
  margin-top: auto;
  width: 100%;
  max-width: 1080px;
  padding: 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  background: transparent;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-divider {
  opacity: 0.4;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-right a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer-right a:hover {
  color: var(--text-main);
}

/* ========================================================
   提示訊息 (Toast) 與 圖片燈箱
   ======================================================== */
.toast-msg {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-normal);
}

.toast-msg i {
  color: #ffffff;
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox-overlay.show {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 2rem;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.lightbox-close:hover {
  opacity: 1;
}

/* ========================================================
   RWD 響應式佈局 (Mobile & Tablet)
   ======================================================== */
@media (max-width: 992px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 270px;
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 95;
    display: none;
  }

  .sidebar-backdrop.show {
    display: block;
  }

  .content-wrapper {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .main-panel {
    padding: 24px 20px;
  }

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

  .hero-quick-access {
    flex-direction: column;
    align-items: stretch;
  }

  .access-ip-box {
    min-width: 100%;
  }

  .hero-cta-btns {
    width: 100%;
  }

  .btn-action {
    flex: 1;
  }

  .app-footer {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 24px 20px;
  }
}

@media (max-width: 640px) {
  .overview-stats {
    grid-template-columns: 1fr;
  }

  .hero-cta-btns {
    flex-direction: column;
  }

  .btn-action {
    width: 100%;
  }

  .sub-tab-nav {
    flex-direction: column;
  }

  .rule-card {
    flex-direction: column;
    gap: 8px;
  }
}
