/**
 * PC 站公共壳层：与 pc-landing 首页同套变量、字体、顶栏/侧栏、背景与粒子层。
 * 子页在 page 内 <style> 中只写本页差异（卡片、布局等）。
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-tertiary: #1a1a1a;
  --bg-card: #161616;
  --bg-nav: #0d0d0d;
  --bg-hover: #1e1e1e;
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #ff3333;
  --accent-hover: #ff4444;
  --accent-glow: rgba(255, 51, 51, 0.4);
  --accent-dark: #cc0000;
  --military: #4a5a3a;
  --military-light: #5a6a4a;
  --rust: #8b4513;
  --steel: #708090;
  --gold: #c9a227;
  --border: #2a2a2a;
  --border-light: #3a3a3a;
  --shadow: rgba(0, 0, 0, 0.5);
  --gradient-header: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(10, 10, 10, 0.95) 100%);
  --gradient-card: linear-gradient(145deg, #1a1a1a 0%, #121212 100%);
  --gradient-btn: linear-gradient(135deg, #ff3333 0%, #cc0000 100%);
  --gradient-military: linear-gradient(135deg, #4a5a3a 0%, #3a4a2a 100%);
  --nav-width: 240px;
  --header-height: 60px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

[data-theme="dark"],
html:not([data-theme]) {
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #fafafa;
  --bg-card: #ffffff;
  --bg-nav: #ffffff;
  --bg-hover: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #333333;
  --text-muted: #888888;
  --accent: #ff2442;
  --accent-hover: #ff3352;
  --accent-glow: rgba(255, 36, 66, 0.3);
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --shadow: rgba(0, 0, 0, 0.08);
  --gradient-header: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
}

html {
  background-color: var(--bg-primary);
}

body {
  font-family: "Rajdhani", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.3s ease;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(ellipse at top left, rgba(255, 51, 51, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(74, 90, 58, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background-image:
    radial-gradient(ellipse at top left, rgba(255, 36, 66, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(74, 90, 58, 0.06) 0%, transparent 50%);
}

/* 顶栏 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--gradient-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
  box-shadow: 0 2px 20px var(--shadow);
  /* 角上头像外扩头框不裁切 */
  overflow: visible;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Orbitron", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-btn);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 30px var(--accent-glow), 0 0 40px rgba(255, 51, 51, 0.3);
  }
}

.logo span {
  background: linear-gradient(90deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  position: relative;
  width: 300px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: "Rajdhani", sans-serif;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.theme-toggle {
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: rotate(180deg);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  border-color: rgba(255, 51, 51, 0.55);
  color: var(--text-primary);
  box-shadow: 0 0 15px var(--accent-glow);
}

.header-right {
  overflow: visible;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gradient-military);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  position: relative;
  overflow: visible;
}

.user-avatar.tcy-logged-in {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}

.user-avatar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.user-avatar [data-tcy-auth-avatar-ico] {
  font-size: 18px;
  line-height: 1;
  opacity: 0.92;
}

/* 侧栏 */
.sidebar {
  position: fixed;
  left: 0;
  top: var(--header-height);
  width: var(--nav-width);
  height: calc(100vh - var(--header-height));
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  z-index: 900;
  overflow-y: auto;
  padding: 20px 0;
}

.nav-section {
  padding: 0 12px;
  margin-bottom: 24px;
}

.nav-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0 16px;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.nav-item i {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.nav-item.active .badge {
  background: rgba(255, 255, 255, 0.3);
}

/* 子页在各自 HTML 的 <style> 里用 1100px 断点收起侧栏，避免与首页 992/768 布局冲突。 */

@media (max-width: 768px) {
  .header {
    padding: 0 16px;
  }
  .search-box {
    display: none;
  }
  .logo {
    font-size: 18px;
  }
  .mobile-menu-btn {
    display: flex !important;
  }
}
