:root {
  --bg-color: #121212;
  --section-bg: #181818;
  --primary: #007acc;
  --accent: #0098ff;
  --text-main: #e0e0e0;
  --text-sub: #a0a0a0;
  --card-bg: #1e1e1e;
  --border-color: #333;
}

* {
  box-sizing: border-box;
}

/* 鼠标点击不留焦点白边；键盘 Tab 导航仍显示焦点框 */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid rgba(139, 92, 246, .75);
  outline-offset: 2px;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

/* --- 头部 --- */
/* 不用 backdrop-filter：滚动大图/动画时会反复重采样导致头部闪动 */
header {
  background-color: rgba(10, 10, 15, 0.92);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 头部底缘渐变发丝线 */
header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 5%, rgba(139,92,246,.75) 35%,
    rgba(34,211,238,.65) 65%, transparent 95%);
  opacity: .55;
  pointer-events: none;
}

/* 滚动后加深背景与投影（由 header.html 脚本切换） */
header.scrolled {
  background-color: rgba(10, 10, 15, 0.9);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}

/* 全局鼠标跟随氛围光（元素由 ambient.js 创建，transform 合成器动画） */
.ambient-glow {
  position: fixed;
  top: 0; left: 0;
  width: 820px; height: 820px;
  margin: -410px 0 0 -410px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(139, 92, 246, .09) 0%,
    rgba(34, 211, 238, .05) 38%,
    transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* 全局鼠标 3D 拖尾画布（ambient.js 创建，canvas 自绘不重绘 DOM） */
.ambient-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 2;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
  font-size: 1.5rem;
  color: #ffffff;
  text-decoration: none;
}
.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo span {
  line-height: 1;
  /* 极光流彩底层 + 高光扫过层（双层背景同时裁切进文字） */
  background:
    linear-gradient(110deg, #c4b5fd, #8b5cf6 25%, #67e8f9 50%, #e879f9 75%, #c4b5fd),
    linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .85) 50%, transparent 58%);
  background-size: 300% 100%, 300% 100%;
  background-position: 0% 50%, 220% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: filter .4s ease;
  animation: logo-aurora 8s ease-in-out infinite;
}

/* 悬停：增亮 + 辉光 */
.logo:hover span {
  filter: brightness(1.22) drop-shadow(0 0 12px rgba(139, 92, 246, .6));
}

/* 极光缓慢往返流动；高光每周期从右向左扫一次后等待 */
@keyframes logo-aurora {
  0%   { background-position: 0% 50%, 220% 0; }
  45%  { background-position: 100% 50%, -120% 0; }
  100% { background-position: 0% 50%, -120% 0; }
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
}

nav li {
  list-style: none;
  display: inline-block;
}

nav li a {
  position: relative;
}

/* 激活项：白字 + 底部渐变下划线（替代旧胶囊边框） */
nav li.active a {
  color: #ffffff;
  border-color: transparent;
  text-shadow: 0 0 18px rgba(139, 92, 246, .8);
}

nav li.active a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8b5cf6, #22d3ee);
  box-shadow: 0 0 10px rgba(139, 92, 246, .7);
}

nav a {
  color: var(--text-sub);
  text-decoration: none;
  margin-left: 1rem;
  transition: color 0.3s, border-color 0.3s;
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid transparent;
  border-radius: 50px;
  padding: 8px 20px;
}

nav a:hover,
nav a.active {
  color: #ffffff;
  border-color: rgba(139, 92, 246, .45);
}

nav a:not(.auth-btn):hover {
  background: rgba(139, 92, 246, .10);
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 1.5rem;
}

.auth-btn {
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.auth-login {
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.auth-login:hover {
  color: #ffffff;
  border-color: rgba(139, 92, 246, .6);
}

.auth-register {
  color: #fff;
  background: linear-gradient(92deg, #7c3aed, #06b6d4);
  box-shadow: 0 4px 18px rgba(124, 58, 237, .4);
}

.auth-register:hover {
  box-shadow: 0 6px 24px rgba(124, 58, 237, .65);
}

.nav-img {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-img:hover {
  color: var(--primary);
}

.nav-img img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* --- Banner (启动器页) --- */
.banner {
  background: radial-gradient(circle at center, #252526 0%, #0d0d0d 100%);
  padding: 6rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.banner h1 {
  font-size: 3.5rem;
  margin: 0 0 1.5rem 0;
  background: linear-gradient(to right, #fff, #007acc);
  -webkit-background-clip: text;
  color: transparent;
  line-height: 1.2;
}

.banner p {
  font-size: 1.25rem;
  color: var(--text-sub);
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
}

.download-cta {
  background-color: var(--primary);
  color: white;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0, 122, 204, 0.4);
}

.download-cta:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 122, 204, 0.6);
}

.version-info {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #666;
}

/* --- 资源中心 (Index Page) 独有样式 --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.hero p {
  color: var(--text-sub);
  font-size: 1.1rem;
}

/* 筛选栏 */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* 资源网格 */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* 资源卡片 */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.card-img {
  height: 180px;
  background: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 1.2rem;
}

.card-body {
  padding: 1rem;
}

.card-tag {
  font-size: 0.8rem;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.card-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #fff;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-top: 1rem;
}

.download-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #333;
  color: #fff;
  padding: 0.5rem 0;
  text-decoration: none;
  margin-top: 1rem;
  border-radius: 4px;
  transition: background 0.3s;
}

.download-btn:hover {
  background: #444;
}

/* --- 功能特性 (启动器页) --- */
.features {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.feature-item h3 {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  color: #fff;
}

.feature-item p {
  color: var(--text-sub);
  margin: 0;
  font-size: 1rem;
}

/* --- 界面预览 (轮播图样式) --- */
.showcase {
  background: #151515;
  padding: 5rem 2rem;
  text-align: center;
  overflow: hidden;
}

.subtitle {
  color: #888;
  margin-bottom: 3rem;
  margin-top: -2rem;
}

/* 轮播图容器 - 16:9 比例自适应 */
.carousel-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  aspect-ratio: 16 / 9;
  height: auto;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  background: #252526;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* 截图占位符样式 */
.screenshot-placeholder {
  color: #555;
  font-size: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: var(--primary);
}

/* --- 底部 --- */
footer {
  background-color: transparent;
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  /* 统一增加顶部间距 */
  color: var(--text-sub);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  position: relative;
}

/* 底部顶缘渐变发丝线，与头部呼应 */
footer::before {
  content: "";
  position: absolute;
  left: 20%; right: 20%; top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.7), rgba(34,211,238,.6), transparent);
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: .8rem;
  background: linear-gradient(92deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.footer-links a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: .92rem;
  transition: color .2s;
}

.footer-links a:hover {
  color: #ffffff;
}

footer a {
  color: var(--primary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* =========================================
   响应式适配 (Media Queries)
   ========================================= */

/* 平板尺寸 (小于 768px) */
@media (max-width: 768px) {
  .banner h1 {
    font-size: 2.5rem;
  }

  header {
    flex-direction: column;
    gap: .6rem;
    padding: .8rem 1rem;
  }

  .header-auth {
    margin-left: 0;
    margin-top: 0;
  }

  /* 导航单行：放不下横向滚动（触屏滑动 / 鼠标按住拖动），不折行 */
  nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav li {
    flex: 0 0 auto;
  }

  nav a {
    display: block;
    margin: 0 5px;
    font-size: 0.95rem;
  }

  /* 激活下划线收进内侧，避免撑出纵向溢出 */
  nav li.active a::after {
    bottom: 2px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    /* 资源网格单列 */
  }
}

/* 手机尺寸 (小于 480px) */
@media (max-width: 480px) {
  .banner {
    padding: 4rem 1.5rem;
  }

  .banner h1 {
    font-size: 2rem;
  }

  .download-cta {
    width: 100%;
    padding: 1rem;
  }

  nav {
    display: flex;
    justify-content: flex-start;
    gap: 0;
  }

  nav a {
    margin: 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .filter-bar {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}

/* ===== 面包屑导航 ===== */
.breadcrumb-wrapper {
  position: relative;
  overflow: hidden;
}
.breadcrumb-wrapper .page-heading {
  position: relative;
  padding: 120px 0;
  z-index: 9;
}
.breadcrumb-wrapper .page-heading h1 {
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  margin: 0;
}
.breadcrumb-wrapper .page-heading .breadcrumb-items {
  list-style: none;
  display: flex;
  align-items: center;
  margin-top: 16px;
  gap: 10px;
  padding: 0;
}
.breadcrumb-wrapper .page-heading .breadcrumb-items li {
  color: rgba(255,255,255,.7);
  font-size: 16px;
  font-weight: 400;
}
.breadcrumb-wrapper .page-heading .breadcrumb-items li a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color .3s;
}
.breadcrumb-wrapper .page-heading .breadcrumb-items li a:hover {
  color: #8b5cf6;
}
.breadcrumb-wrapper .page-heading .breadcrumb-items li i {
  color: rgba(255,255,255,.4);
  font-size: 12px;
}
@media (max-width: 767px) {
  .breadcrumb-wrapper .page-heading {
    padding: 100px 0 60px;
  }
  .breadcrumb-wrapper .page-heading h1 {
    font-size: 32px;
  }
}
