/* 三号动漫 - 主样式文件 */

/* ========== CSS变量定义 ========== */
:root {
  /* 主色调 */
  --primary-color: #7B2CBF;
  --primary-dark: #5A189A;
  --primary-light: #9D4EDD;
  
  /* 辅助色 */
  --accent-color: #00F5D4;
  --accent-dark: #00C4B4;
  
  /* 中性色 */
  --bg-gradient-start: #F8F5FF;
  --bg-gradient-end: #FFFFFF;
  /* 主文本改为纯黑，辅助文本与主文本保持一致 */
  --text-primary: #000000;
  --text-secondary: var(--text-primary);
  --text-light: #FFFFFF;
  
  /* 夜间模式 */
  --dark-bg: #1A1A2E;
  --dark-text: #E0CFFF;
  --dark-primary: #5A189A;
  --dark-accent: #00C4B4;
  
  /* 字体 */
  --font-title: 'Microsoft YaHei', 'SimHei', sans-serif;
  --font-body: 'Microsoft YaHei', 'SimSun', sans-serif;
  
  /* 过渡动画 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Remove underlines globally (user requested) */
a, a:visited, a:active {
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: none;
  outline: none;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition-normal), color var(--transition-normal);
}

body.dark-mode {
  background: var(--dark-bg);
  color: var(--dark-text);
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(123, 44, 191, 0.1);
  z-index: 1000;
  transition: all var(--transition-normal);
  padding: 1rem 0;
}

body.dark-mode .navbar {
  background: rgba(26, 26, 46, 0.95);
  box-shadow: 0 2px 20px rgba(90, 24, 154, 0.3);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px rgba(123, 44, 191, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  /* increase horizontal gutters on desktop for more breathing room */
  padding: 0 3rem;
  display: flex;
  /* Desktop: align items to the left in logical order: logo -> search -> links */
  justify-content: flex-start;
  align-items: center;
  gap: 2.5rem; /* more generous spacing between logo, search and links */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.5rem;
  transition: transform var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem; /* increase gap between link items */
  align-items: center;
  margin-left: 0; /* ensure menu doesn't auto push to the far right on desktop */
  padding-left: 0.25rem; /* tiny inner offset so links don't touch search box */
}

.nav-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

body.dark-mode .nav-menu a {
  color: var(--dark-text);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

body.dark-mode .nav-menu a:hover,
body.dark-mode .nav-menu a.active {
  color: var(--accent-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-normal);
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem; /* increase distance between icon and input */
  background: rgba(123, 44, 191, 0.1);
  padding: 0.6rem 1.2rem; /* slightly larger padding for breathing room */
  border-radius: 25px;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
}

body.dark-mode .search-box {
  background: rgba(0, 245, 212, 0.1);
}

.search-box:focus-within {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.95);
}

body.dark-mode .search-box:focus-within {
  border-color: var(--accent-color);
  background: rgba(26, 26, 46, 0.95);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  /* make input flexible so icon and text stay on one line */
  flex: 1 1 auto;
  min-width: 120px;
  width: auto;
}

body.dark-mode .search-box input {
  color: var(--dark-text);
}

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

/* Ensure icon and input are vertically aligned and icon doesn't wrap */
.search-box svg,
.official-search svg {
  flex: none;
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Strong desktop-wide overrides to keep icon and input on one line */
.search-box,
.official-search {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}
.search-box input {
  flex: 1 1 auto !important;
  min-width: 0 !important; /* allow shrinking inside flex container */
  width: auto !important;
  display: inline-block !important;
}
.search-box svg,
.official-search svg {
  flex: 0 0 auto !important;
  display: inline-block !important;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: transform var(--transition-fast);
  padding: 0.5rem;
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.1);
}

body.dark-mode .theme-toggle {
  color: var(--accent-color);
}

/* ========== 主要内容区域 ========== */
.main-content {
  margin-top: 80px;
  min-height: calc(100vh - 80px);
}

/* Mobile: increase main content top margin for taller navbar */
@media (max-width: 768px) {
  .main-content {
    margin-top: 64px; /* match mobile navbar height more closely */
    min-height: calc(100vh - 64px);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ========== 按钮样式 ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(123, 44, 191, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 44, 191, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: var(--text-light);
}

body.dark-mode .btn-outline {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

body.dark-mode .btn-outline:hover {
  background: var(--accent-color);
  color: var(--dark-bg);
}

/* ========== 卡片样式 ========== */
.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(123, 44, 191, 0.1);
  transition: all var(--transition-normal);
  overflow: hidden;
  position: relative;
}

body.dark-mode .card {
  background: rgba(26, 26, 46, 0.9);
  box-shadow: 0 4px 20px rgba(90, 24, 154, 0.3);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(123, 44, 191, 0.2);
}

body.dark-mode .card:hover {
  box-shadow: 0 8px 30px rgba(0, 245, 212, 0.3);
}

/* ========== 轮播图 ========== */
.carousel {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 3rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--text-light);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  padding: 1rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
  left: 1rem;
}

.carousel-nav.next {
  right: 1rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.carousel-dot.active {
  background: var(--accent-color);
  transform: scale(1.2);
}

/* ========== 分类网格 ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

body.dark-mode .category-item {
  background: rgba(26, 26, 46, 0.9);
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(123, 44, 191, 0.1), transparent);
  transition: left 0.5s;
}

.category-item:hover::before {
  left: 100%;
}

.category-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(123, 44, 191, 0.2);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.category-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

body.dark-mode .category-name {
  color: var(--dark-text);
}

/* ========== 榜单卡片 ========== */
.ranking-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}

body.dark-mode .section-title {
  color: var(--accent-color);
}

.ranking-list {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.ranking-list::-webkit-scrollbar {
  height: 8px;
}

.ranking-list::-webkit-scrollbar-track {
  background: rgba(123, 44, 191, 0.1);
  border-radius: 10px;
}

.ranking-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.ranking-card {
  min-width: 200px;
  scroll-snap-align: start;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

body.dark-mode .ranking-card {
  background: rgba(26, 26, 46, 0.9);
}

.ranking-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(123, 44, 191, 0.3);
}

.ranking-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.ranking-info {
  padding: 1rem;
}

.ranking-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

body.dark-mode .ranking-title {
  color: var(--dark-text);
}

.ranking-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ranking-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  color: var(--text-primary);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ========== 瀑布流布局 ========== */
.waterfall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.anime-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

body.dark-mode .anime-card {
  background: rgba(26, 26, 46, 0.9);
}

.anime-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(123, 44, 191, 0.3);
}

.anime-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.anime-card:hover img {
  transform: scale(1.1);
}

.anime-card-info {
  padding: 1rem;
}

.anime-card-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark-mode .anime-card-title {
  color: var(--dark-text);
}

.anime-card-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ========== 筛选器 ========== */
.filter-bar {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

body.dark-mode .filter-bar {
  background: rgba(26, 26, 46, 0.9);
}

.filter-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 0.5rem;
}

body.dark-mode .filter-label {
  color: var(--dark-text);
}

.filter-tag {
  padding: 0.5rem 1rem;
  background: rgba(123, 44, 191, 0.1);
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

body.dark-mode .filter-tag {
  background: rgba(0, 245, 212, 0.1);
}

.filter-tag:hover {
  background: rgba(123, 44, 191, 0.2);
  border-color: var(--primary-color);
}

body.dark-mode .filter-tag:hover {
  background: rgba(0, 245, 212, 0.2);
  border-color: var(--accent-color);
}

.filter-tag.active {
  background: var(--primary-color);
  color: var(--text-light);
  border-color: var(--primary-color);
}

body.dark-mode .filter-tag.active {
  background: var(--accent-color);
  color: var(--dark-bg);
  border-color: var(--accent-color);
}

/* ========== 详情页 ========== */
.detail-header {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.detail-poster {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(123, 44, 191, 0.3);
}

.detail-poster img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-info h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

body.dark-mode .detail-info h1 {
  color: var(--accent-color);
}

.detail-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.detail-tag {
  padding: 0.5rem 1rem;
  background: rgba(123, 44, 191, 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
}

body.dark-mode .detail-tag {
  background: rgba(0, 245, 212, 0.1);
}

.detail-description {
  margin: 1.5rem 0;
  line-height: 1.8;
  color: var(--text-primary);
}

body.dark-mode .detail-description {
  color: var(--dark-text);
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* ========== 章节列表 ========== */
.episode-list {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 3rem;
}

body.dark-mode .episode-list {
  background: rgba(26, 26, 46, 0.9);
}

.episode-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(123, 44, 191, 0.1);
}

body.dark-mode .episode-tabs {
  border-bottom-color: rgba(0, 245, 212, 0.1);
}

.episode-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.episode-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

body.dark-mode .episode-tab.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

.episode-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid rgba(123, 44, 191, 0.1);
  transition: background var(--transition-fast);
}

body.dark-mode .episode-item {
  border-bottom-color: rgba(0, 245, 212, 0.1);
}

.episode-item:hover {
  background: rgba(123, 44, 191, 0.05);
}

body.dark-mode .episode-item:hover {
  background: rgba(0, 245, 212, 0.05);
}

.episode-item:last-child {
  border-bottom: none;
}

.episode-new {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--accent-color);
  color: var(--text-primary);
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ========== 日历 ========== */
.calendar-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
}

body.dark-mode .calendar-container {
  background: rgba(26, 26, 46, 0.9);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.calendar-nav-btn {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-nav-btn:hover {
  background: var(--primary-light);
  transform: scale(1.05);
}

/* Disabled state for calendar nav buttons */
.calendar-nav-btn:disabled,
.calendar-nav-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  background: linear-gradient(135deg, rgba(123,44,191,0.35), rgba(157,78,221,0.25));
  box-shadow: none;
  pointer-events: none;
}

.calendar-nav-btn:disabled:hover,
.calendar-nav-btn[disabled]:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(123,44,191,0.35), rgba(157,78,221,0.25));
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem; /* slightly reduced to make overall calendar more compact */
}

.calendar-day {
  aspect-ratio: 1;
  background: rgba(123, 44, 191, 0.05);
  border-radius: 10px;
  padding: 0.4rem; /* reduce inner padding to lower visual height */
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.calendar-day .day-number { font-size: 0.95rem; } /* slightly smaller numbers */

/* Calendar page - mobile fixes: prevent horizontal overflow and make cells fit */
@media (max-width: 768px) {
  body.calendar-page {
    overflow-x: hidden; /* prevent page horizontal scroll on calendar */
  }
  body.calendar-page .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  body.calendar-page .calendar-container {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    box-sizing: border-box;
  }
  body.calendar-page .calendar-grid {
    gap: 0.25rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  body.calendar-page .calendar-day {
    padding: 0.35rem;
    border-radius: 8px;
    min-width: 0; /* avoid intrinsic min-width from content */
  }
  body.calendar-page .calendar-day .day-number {
    font-size: 0.95rem;
  }
  body.calendar-page .calendar-day .day-event {
    font-size: 0.75rem;
  }
}

/* Further reduce outer calendar card height on mobile by shrinking padding/header */
@media (max-width: 768px) {
  .calendar-page .calendar-container {
    padding: 0.6rem !important; /* reduce outer padding to shrink card height */
    border-radius: 10px !important;
  }
  .calendar-page .calendar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
  }
  .calendar-page .calendar-nav-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    border-radius: 8px;
  }
  .calendar-page .calendar-month {
    font-size: 1.05rem;
    padding: 0.15rem 0;
  }
}

/* Download page mobile fixes: ensure inner cards don't exceed outer card width */
@media (max-width: 768px) {
  body.download-page {
    overflow-x: hidden;
  }
  body.download-page .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
  }
  /* Make hero grid stack and ensure columns don't overflow */
  body.download-page .download-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  body.download-page .download-hero-grid .hero-left,
  body.download-page .download-hero-grid .hero-right {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }
  /* Ensure cards inside hero don't exceed their container */
  body.download-page .card,
  body.download-page .help-outer,
  body.download-page .version-card,
  body.download-page .help-shell,
  body.download-page .help-cards,
  body.download-page .help-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  /* Tame large logo in aside */
  body.download-page .logo-box img {
    width: 120px !important;
    height: 120px !important;
  }
  /* Reduce FAQ card padding slightly */
  body.download-page .faq-grid .faq-item,
  body.download-page .help-outer .version-card {
    padding: 0.8rem !important;
  }
  /* Ensure the outer gradient shell on download page is as wide as other cards */
  body.download-page .help-outer,
  body.download-page .help-shell {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
  }
  body.download-page .version-card,
  body.download-page .help-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure download page outer shell matches other cards site-wide (desktop + mobile) */
.download-page .help-outer,
.download-page .help-shell {
  width: 100% !important;
  max-width: 1200px !important; /* align with .container max-width */
  margin: 0 auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  box-sizing: border-box !important;
}
.download-page .help-outer .version-card,
.download-page .help-shell .version-card {
  width: 100% !important;
  max-width: none !important;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

/* Ensure mobile overrides after desktop rules so padding doesn't force overflow */
@media (max-width: 768px) {
  .download-page .help-outer,
  .download-page .help-shell {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .download-page .help-outer .version-card,
  .download-page .help-shell .version-card {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
}

/* Mobile: hide inline event text in calendar cells and show consolidated list below */
@media (max-width: 768px) {
  .calendar-page .calendar-day .day-event {
    display: none !important;
  }
  .calendar-page #mobile-calendar-events {
    display: block;
    margin-top: 1rem;
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 6px 20px rgba(123,44,191,0.04);
  }
  .calendar-page #mobile-calendar-events ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .calendar-page #mobile-calendar-events li {
    padding: 0.5rem;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(0,245,212,0.06), rgba(123,44,191,0.03));
    font-size: 0.95rem;
    color: var(--text-primary);
  }
}

.calendar-day .day-number {
  font-weight: 600;
}

.calendar-day .day-event {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: rgba(0,0,0,0.85);
  text-align: center;
  line-height: 1.2;
  padding: 0 0.25rem;
}

body.dark-mode .calendar-day {
  background: rgba(0, 245, 212, 0.05);
}

/* Unified width fix for download page cards - ensure consistent width and proper spacing */
.download-page .help-outer,
.download-page .help-shell {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 2rem !important;
  padding-right: 2rem !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
.download-page .help-outer .version-card,
.download-page .help-shell .version-card,
.download-page .help-outer .faq-item {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  box-sizing: border-box !important;
}

/* Mobile-specific tighter spacing */
@media (max-width: 768px) {
  .download-page .help-outer,
  .download-page .help-shell {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .download-page .help-outer .version-card,
  .download-page .help-shell .version-card,
  .download-page .help-outer .faq-item {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}


.calendar-day:hover {
  background: rgba(123, 44, 191, 0.15);
  transform: scale(1.05);
}

body.dark-mode .calendar-day:hover {
  background: rgba(0, 245, 212, 0.15);
}

.calendar-day.has-updates {
  background: var(--accent-color);
  color: var(--text-primary);
  font-weight: 600;
}

.calendar-day-header {
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  color: var(--primary-color);
}

body.dark-mode .calendar-day-header {
  color: var(--accent-color);
}

/* Ensure cards that follow the calendar have comfortable side spacing on wide viewports */
.calendar-container ~ .card {
  /* keep the card centered but force larger side gutters so content doesn't touch edges */
  max-width: 1000px;
  margin: 3rem auto 0;
  padding-left: 3rem;
  padding-right: 3rem;
  box-sizing: border-box;
}

@media (min-width: 1400px) {
  .calendar-container ~ .card {
    max-width: 1200px;
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

@media (max-width: 1024px) {
  .calendar-container ~ .card {
    padding-left: 2rem;
    padding-right: 2rem;
    margin-left: 2rem;
    margin-right: 2rem;
  }
}

@media (max-width: 768px) {
  .calendar-container ~ .card {
    margin-left: 1rem;
    margin-right: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ========== 下载页 ========== */
.download-section {
  text-align: center;
  padding: 4rem 2rem;
}

.download-icon {
  font-size: 8rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

body.dark-mode .download-icon {
  color: var(--accent-color);
}

.download-btn-large {
  display: inline-block;
  padding: 1.5rem 4rem;
  font-size: 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-light);
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(123, 44, 191, 0.4);
  transition: all var(--transition-normal);
}

.download-btn-large:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 40px rgba(123, 44, 191, 0.5);
}

.download-qr {
  margin: 3rem 0;
}

.download-qr img {
  width: 200px;
  height: 200px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(123, 44, 191, 0.3);
}

.version-info {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 2rem;
  margin-top: 3rem;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

body.dark-mode .version-info {
  background: rgba(26, 26, 46, 0.9);
}

.version-info h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

body.dark-mode .version-info h3 {
  color: var(--accent-color);
}

.version-list {
  list-style: none;
  padding-left: 0;
}

.version-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
}

.version-list li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* ========== 页脚 ========== */
.footer {
  background: rgba(123, 44, 191, 0.1);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
}

body.dark-mode .footer {
  background: rgba(90, 24, 154, 0.2);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

body.dark-mode .footer-links a {
  color: var(--dark-text);
}

.footer-links a:hover {
  color: var(--primary-color);
}

body.dark-mode .footer-links a:hover {
  color: var(--accent-color);
}

.footer-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-info a {
  color: var(--primary-color);
  text-decoration: none;
}

body.dark-mode .footer-info a {
  color: var(--accent-color);
}

.footer-info a:hover {
  text-decoration: underline;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
    font-size: 0.9rem;
  }
  
  .search-box {
    display: none;
  }
  
  .carousel {
    height: 300px;
  }
  
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .detail-header {
    grid-template-columns: 1fr;
  }
  
  .calendar-grid {
    gap: 0.25rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Mobile: add extra inset for inner cards inside gradient shells and download center */
@media (max-width: 768px) {
  .help-outer {
    padding: 1.5rem; /* increase outer padding so inner white cards have breathing room */
  }
  .help-outer .version-card,
  .help-outer .faq-item,
  .help-card {
    padding: 1rem; /* keep inner padding proportional */
  }
  /* Download center content inset on mobile */
  .download-center-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .platform-item, .qr-code-official {
    padding: 1rem;
  }
}

/* Fix download page version update card spacing */
.download-page .help-shell {
  margin-top: 2rem !important;
  margin-bottom: 1.5rem !important;
}

/* ========== 加载动画 ========== */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(123, 44, 191, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ========== 懒加载 ========== */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-load.loaded {
  opacity: 1;
}

/* ========== 页面切换动画 ========== */
.page-transition {
  animation: pageFadeIn 0.3s ease-in-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== 官网风格样式 ========== */

/* 官网导航栏 */
.official-navbar {
  padding: 1rem 0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.official-navbar .scrolled {
  padding: 1rem 0 !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem; /* more space between search and any right-side controls */
}

.official-search {
  width: 280px;
  background: rgba(123, 44, 191, 0.05);
  border: 1px solid rgba(123, 44, 191, 0.1);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.official-search:focus-within {
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.95);
}

.official-search input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
}

.user-center-btn {
  padding: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.user-center-btn:hover {
  color: var(--primary-color);
}

/* 品牌Banner */
.brand-banner {
  position: relative;
  min-height: 520px; /* increased hero height */
  display: flex;
  align-items: center;
  margin-top: 80px;
  background-color: var(--bg-gradient-start);
  background-image: url('bg.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .brand-banner {
    min-height: 480px;
  }
}

@media (max-width: 768px) {
  .brand-banner {
    min-height: 380px;
    align-items: flex-start;
    padding-top: 2rem;
    /* 已将主内容顶部间距调整用于避免与固定导航重叠；
       这里清除 brand-banner 的额外 margin-top，避免导航和 hero 之间产生双倍间距 */
    margin-top: 0;
  }
  /* Reduce hero inner padding so it sits closer to the navbar on small screens */
  .brand-banner-content {
    padding: 2rem 0;
    text-align: center;
  }
}

.brand-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* overlay disabled because hero now uses an image background */
  opacity: 0;
  background-image: none;
}

.brand-banner-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  justify-items: center;
  padding: 4rem 0;
  text-align: center;
}

.brand-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.brand-english {
  font-size: 1rem;
  color: rgba(0,0,0,0.7);
  margin-bottom: 1rem;
}

.brand-desc {
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Hero logo shown above the download button */
.brand-hero-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  margin: 0 auto 1rem;
  box-shadow: 0 6px 20px rgba(123,44,191,0.06);
}

body.dark-mode .brand-hero-logo {
  box-shadow: 0 6px 20px rgba(90,24,154,0.08);
}

@media (max-width: 768px) {
  .brand-hero-logo {
    width: 100px;
    height: 100px;
  }
}

/* badge under hero logo */
.brand-hero-badge {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.25rem 0.75rem;
  background: rgba(123,44,191,0.12); /* translucent */
  color: var(--primary-color);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(123,44,191,0.04);
  border: 1px solid rgba(123,44,191,0.15);
}

@media (max-width: 768px) {
  .brand-hero-badge {
    font-size: 0.85rem;
    padding: 0.2rem 0.6rem;
  }
}

/* ensure hero left column text is black */
.brand-slogan, .brand-slogan p, .brand-slogan .brand-subtitle, .brand-slogan .brand-desc {
  color: var(--text-primary);
}

/* badges row under hero CTA */
.hero-cta .badge-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.hero-cta .brand-hero-badge {
  background: rgba(123,44,191,0.10);
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
  box-shadow: none;
  border: 1px solid rgba(123,44,191,0.12);
}

@media (max-width: 480px) {
  .hero-cta .brand-hero-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
  }
}

/* badges inline next to original badge under brand-slogan */
.brand-slogan .badge-inline {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.brand-slogan .brand-hero-badge {
  background: rgba(123,44,191,0.12);
  color: var(--primary-color);
  padding: 0.25rem 0.65rem;
  font-size: 0.9rem;
  box-shadow: 0 6px 18px rgba(123,44,191,0.04);
  border: 1px solid rgba(123,44,191,0.15);
}

@media (max-width: 480px) {
  .brand-slogan .brand-hero-badge {
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
  }
}

/* spacing between badges and the download CTA */
.hero-cta {
  margin-top: 1.5rem;
}

@media (max-width: 480px) {
  .hero-cta {
    margin-top: 1rem;
  }
}

.brand-download {
  text-align: center;
}

.official-download-btn {
  font-size: 1.2rem;
  padding: 1rem 2.5rem;
  display: inline-flex;
  align-items: center;
}

.download-tip {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 核心功能导航 */
.features-nav-section {
  padding: 4rem 0;
}

.section-title-official {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
}

.features-grid-official {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-item-official {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(123, 44, 191, 0.1);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

body.dark-mode .feature-item-official {
  background: rgba(26, 26, 46, 0.8);
  border-color: rgba(0, 245, 212, 0.1);
}

.feature-item-official:hover {
  border-color: var(--primary-color);
  transform: none;
}

body.dark-mode .feature-item-official:hover {
  border-color: var(--accent-color);
}

.feature-icon-official {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

body.dark-mode .feature-icon-official {
  color: var(--accent-color);
}

.feature-title-official {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

body.dark-mode .feature-title-official {
  color: var(--dark-text);
}

.feature-desc-official {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 核心信息展示 */
.info-showcase-section {
  padding: 4rem 0;
  background: transparent; /* removed pale purple background per request */
}

body.dark-mode .info-showcase-section {
  background: transparent;
}

/* 软件介绍区样式 */
.software-intro-section {
  padding: 2.5rem 0;
}

.software-intro-section .software-intro-card {
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 8px 30px rgba(123,44,191,0.06);
}

body.dark-mode .software-intro-section .software-intro-card {
  background: rgba(26,26,46,0.9);
  box-shadow: 0 8px 30px rgba(90,24,154,0.08);
}

/* 强制软件简介内文字使用主文本色（避免内联灰色被遗留） */
.software-intro-section .case-card-inner,
.software-intro-section .case-card-inner p,
.software-intro-section .case-card-inner ul,
.software-intro-section .case-card-inner li,
.software-intro-section .case-card-inner strong {
  color: var(--text-primary) !important;
}

/* 增加软件简介卡片的左右间距以避免文字贴边 */
.software-intro-section .case-card-inner {
  padding: 1.25rem 2rem; /* 保持上下 padding，左右加宽到 2rem */
}

@media (max-width: 768px) {
  .software-intro-section .case-card-inner {
    padding: 1rem; /* 移动端恢复更紧凑的内边距 */
  }
}

/* 列表符号置内，避免圆点出现在卡片外侧 */
.software-intro-section .case-card-inner ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.software-intro-section .case-card-inner li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 2rem; /* space for the check icon */
}

.software-intro-section .case-card-inner li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

.info-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.info-panel-official {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 2rem;
}

body.dark-mode .info-panel-official {
  background: rgba(26, 26, 46, 0.9);
}

.info-panel-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

body.dark-mode .info-panel-title {
  color: var(--accent-color);
}

.info-list-official {
  list-style: none;
  padding: 0;
}

.info-list-official li {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(123, 44, 191, 0.1);
}

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

.info-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-right: 1rem;
  min-width: 80px;
}

body.dark-mode .info-number {
  color: var(--accent-color);
}

.info-text {
  color: var(--text-primary);
  font-size: 1rem;
}

body.dark-mode .info-text {
  color: var(--dark-text);
}

/* 番剧展示 */
.anime-showcase-section {
  padding: 4rem 0;
}

.anime-grid-official {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}

.anime-card-official, a.anime-card-official {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(123, 44, 191, 0.1);
  text-decoration: none;
  color: inherit;
  display: block;
}

body.dark-mode .anime-card-official, body.dark-mode a.anime-card-official {
  background: rgba(26, 26, 46, 0.9);
  border-color: rgba(0, 245, 212, 0.1);
}

.anime-card-official:hover, a.anime-card-official:hover {
  transform: none;
  border-color: var(--primary-color);
}

body.dark-mode .anime-card-official:hover, body.dark-mode a.anime-card-official:hover {
  border-color: var(--accent-color);
}

.anime-poster-official {
  width: 100%;
  height: 250px;
  background-size: cover;
  background-position: center;
}

.anime-info-official {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.anime-title-official {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

body.dark-mode .anime-title-official {
  color: var(--dark-text);
}

.anime-badge-official {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: var(--accent-color);
  color: var(--text-primary);
  border-radius: 4px;
}

/* 下载中心 */
.download-center-section {
  background: rgba(123, 44, 191, 0.05);
  padding: 4rem 0;
  margin-top: 4rem;
  border-radius: 16px; /* make section background rounded */
  overflow: hidden;    /* clip inner content to rounded corners */
  box-shadow: 0 8px 30px rgba(123,44,191,0.03);
}

body.dark-mode .download-center-section {
  background: rgba(90, 24, 154, 0.15);
}

.download-center-content {
  max-width: 1000px;
  margin: 0 auto;
}

.download-center-title {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.download-center-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.download-center-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

.download-platforms {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100%;
}

.platform-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  min-height: 300px; /* increase card height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

body.dark-mode .platform-item {
  background: rgba(26, 26, 46, 0.9);
}

.platform-desc {
  color: var(--text-primary);
  margin: 1rem 0 1.25rem;
  line-height: 1.6;
  max-width: 320px;
  text-align: center;
}

/* 推荐理由宽度与 platform-desc 保持一致 */
.platform-recommend {
  color: var(--text-primary);
  margin: 1rem 0 1.25rem;
  line-height: 1.6;
  max-width: 320px;
  text-align: center;
}

.platform-icon {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

body.dark-mode .platform-icon {
  color: var(--accent-color);
}

.platform-item h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.download-qr-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.qr-code-official {
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem;
  border-radius: 8px;
}

body.dark-mode .qr-code-official {
  background: rgba(26, 26, 46, 0.9);
}

/* Download QR / logo replacement styling */
.download-qr-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(123,44,191,0.06);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .download-qr-logo {
    width: 120px;
    height: 120px;
  }
}

.download-notice {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 1.5rem;
  width: 100%;
  /* push notice to bottom of column when sibling elements exist */
  margin-top: auto;
}

body.dark-mode .download-notice {
  background: rgba(26, 26, 46, 0.9);
}

.download-notice h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.download-notice ul {
  list-style: none;
  padding: 0;
}

.download-notice li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.download-notice li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

/* 官网页脚 */
.footer-official {
  background: rgba(123, 44, 191, 0.05);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

body.dark-mode .footer-official {
  background: rgba(90, 24, 154, 0.15);
}

.footer-content-official {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid-official {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-column-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

body.dark-mode .footer-column-title {
  color: var(--dark-text);
}

.footer-brand h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links-official {
  list-style: none;
  padding: 0;
}

.footer-links-official li {
  margin-bottom: 0.75rem;
}

.footer-links-official a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links-official a:hover {
  color: var(--primary-color);
}

body.dark-mode .footer-links-official a:hover {
  color: var(--accent-color);
}

.footer-bottom-official {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(123, 44, 191, 0.1);
}

body.dark-mode .footer-bottom-official {
  border-top-color: rgba(0, 245, 212, 0.1);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid rgba(123, 44, 191, 0.2);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

body.dark-mode .social-icon:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.footer-icp {
  text-align: right;
}

.footer-icp p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-icp a {
  color: var(--primary-color);
  text-decoration: none;
}

body.dark-mode .footer-icp a {
  color: var(--accent-color);
}

.footer-icp a:hover {
  text-decoration: underline;
}

/* ========== 悬浮下载按钮 ========== */
.floating-download-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-light);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(123, 44, 191, 0.4);
  z-index: 9999;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  animation: float 3s ease-in-out infinite;
}

.floating-download-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(123, 44, 191, 0.5);
}

.floating-download-btn:active {
  transform: scale(0.95);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Mobile: adjust floating button position and size */
@media (max-width: 768px) {
  .floating-download-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .floating-download-btn {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }
}

/* ========== 工具类 ========== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* 响应式调整 */
@media (max-width: 1024px) {
  .brand-banner-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .features-grid-official {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .info-showcase-grid {
    grid-template-columns: 1fr;
  }
  
  .download-center-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid-official {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .official-search {
    display: none;
  }
  
  .features-grid-official {
    grid-template-columns: 1fr;
  }
  
  .footer-grid-official {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom-official {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-icp {
    text-align: center;
  }
}

/* Mobile navbar tweaks: left logo+name, right links; keep readable sizes */
@media (max-width: 768px) {
  .navbar {
    padding: 1.5rem 0;
  }
  /* official-navbar 使用了 !important 的默认值，移动端需要覆盖它以匹配更高的高度 */
  .official-navbar {
    padding: 1.5rem 0 !important;
  }
  /* force a minimum height on mobile so padding change is visually effective */
  .navbar,
  .official-navbar {
    min-height: 64px !important;
  }
  .nav-container {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  /* Mobile: prefer static flow and horizontal scrolling to avoid overlap */
  /* adjust nav-container padding to nudge nav links toward the right edge */
  .nav-container {
    padding-left: 0.75rem;
    padding-right: 0.6rem;
  }

  .nav-menu {
    margin-left: auto;
    transition: none; /* prevent animated sliding when styles apply */
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    gap: 1.2rem !important; /* slightly larger gap on mobile for breathing room */
    margin: 0 !important;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }
  /* Hide native scroll indicator on mobile to remove thin vertical bar */
  .nav-menu {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
  }
  .nav-menu::-webkit-scrollbar { 
    display: none;             /* Chrome, Safari, Opera */
    height: 0;
    width: 0;
  }
  /* Nudge the nav links slightly to the right on mobile */
  .nav-menu {
    transform: translateX(12px) !important;
  }

  /* Remove or soften navbar shadow on mobile to avoid a dark band */
  .navbar,
  .official-navbar {
    box-shadow: none !important;
    background: rgba(255,255,255,0.98) !important;
  }
  /* keep nav-container normal flow (no absolute centering) */
  .nav-container {
    position: relative;
  }
  .nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .nav-logo img {
    width: 28px;
    height: 28px;
    display: block;
    flex: 0 0 auto;
  }
  .nav-logo span {
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    max-width: 10.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }
  .nav-menu a {
    font-size: 0.95rem;
    padding: 0.25rem 0;
    white-space: nowrap;
  }
  .nav-right {
    gap: 0.5rem;
    display: flex;
    align-items: center;
  }
  /* Hide the desktop-style search on mobile to keep navbar clean */
  .official-search {
    display: none !important; /* force hide on mobile */
  }
  /* also ensure any search inside nav-right is hidden */
  .nav-right .official-search {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 0.5rem;
  }
  .nav-logo img {
    width: 26px;
    height: 26px;
  }
  .nav-logo span {
    font-size: 0.98rem;
  }
  .nav-menu a {
    font-size: 0.9rem;
  }
  .nav-menu {
    gap: 0.6rem;
  }
  .official-search {
    display: none;
  }
}

/* Desktop explicit overrides to ensure menu sits after the search box (logo → search → links)
   This defends against cached/leftover mobile rules or inline styles that may position the menu. */
@media (min-width: 769px) {
  /* Desktop layout: left logo, centered links, right search/controls */
  .nav-container {
    position: relative !important; /* needed for centering the nav-center */
    justify-content: space-between !important;
    gap: 2.5rem !important;
    padding: 0 3rem !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  /* center wrapper that will be absolutely centered inside nav-container */
  .nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: block;
    pointer-events: none; /* allow clicks to pass to children if needed */
  }
  .nav-center .nav-menu {
    pointer-events: auto;
    position: relative;
    display: flex !important;
    gap: 2.5rem !important;
    align-items: center;
  }

  .official-search {
    display: block !important;
    width: 260px !important;
  }

  /* ensure left and right blocks stay at ends */
  .nav-logo { order: 1 !important; }
  .nav-right { order: 3 !important; }
  .nav-center { order: 2 !important; }
}

/* Ensure help-outer and inner cards fill same width as other cards on mobile */
@media (max-width: 768px) {
  .help-outer {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
  .help-outer .version-card,
  .help-outer .faq-item,
  .help-card {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
  }
  /* make inner cards' padding match other cards */
  .help-outer .version-card,
  .help-outer .faq-item {
    padding: 1rem !important;
  }
  /* Force full-width and consistent box-sizing to override any competing rules */
  .help-outer,
  .help-outer .version-card,
  .help-outer .faq-item,
  .help-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Mobile: convert anime grid into horizontal swipeable carousel */
@media (max-width: 768px) {
  .anime-grid-official {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  .anime-grid-official::-webkit-scrollbar {
    height: 8px;
  }
  .anime-grid-official::-webkit-scrollbar-thumb {
    background: rgba(123,44,191,0.12);
    border-radius: 8px;
  }
  .anime-grid-official .anime-card-official {
    flex: 0 0 78%;
    min-width: 220px;
    scroll-snap-align: start;
    margin: 0;
  }
}

/* Mobile: convert features grid into horizontal swipeable carousel */
@media (max-width: 768px) {
  .features-grid-official {
    display: flex !important;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  .features-grid-official .feature-card,
  .features-grid-official .feature-item-official {
    /* prefer a larger card width on mobile to keep original proportions */
    flex: 0 0 min(340px, 92%) !important;
    min-width: 280px !important;
    scroll-snap-align: start;
    margin: 0;
  }
  .features-grid-official::-webkit-scrollbar {
    height: 8px;
  }
  .features-grid-official::-webkit-scrollbar-thumb {
    background: rgba(123,44,191,0.12);
    border-radius: 8px;
  }
}

/* ========== 案例与合作伙伴 ========== */
.case-studies-section {
  padding: 3rem 0;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.case-card .case-preview {
  border-radius: 8px;
  overflow: hidden;
}

.case-title {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.case-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.partners-section {
  padding: 2rem 0 3rem;
  text-align: center;
}

/* 案例 - 卡片风格与渐变外框 */
.case-wrapper {
  padding: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(123,44,191,0.12), rgba(0,245,212,0.12), rgba(157,78,221,0.12));
  box-shadow: 0 6px 30px rgba(123,44,191,0.06);
}

.case-wrapper .case-grid {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.95));
  padding: 1rem;
  border-radius: 10px;
  gap: 1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.04);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

/* Article/help page layout */
.article-article {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem;
  background: transparent;
}
.article-article .article-breadcrumb {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.article-article h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}
.article-article .article-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}
.article-article .article-lead {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.article-article .article-body img {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  border-radius: 6px;
}
.article-article p, .article-article ul, .article-article ol {
  text-align: left;
  color: var(--text-primary);
}
.article-pagination a {
  color: var(--text-secondary);
  text-decoration: none;
}

.case-card {
  background: transparent;
  display: flex;
  flex-direction: column;
}

.case-card-inner {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 30px rgba(123,44,191,0.06);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.case-card-inner:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(123,44,191,0.12);
}

.case-meta time {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: inline-block;
  margin-bottom: 0.75rem;
}

.case-title a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
}

.case-excerpt {
  color: var(--text-secondary);
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1 1 auto;
}

/* ========== 列表样式统一调整（对齐与层次感） ========== */
/* Apply to most content areas to ensure bullets align with text */
.container ul,
.container ol,
.card ul,
.card ol,
.case-card-inner ul,
.case-card-inner ol,
.download-notice ul,
.platform-item ul,
.software-intro-section .case-card-inner ul,
.contact-section .contact-form ul,
.info-list-official {
  list-style-position: outside;
  padding-left: 1.25rem; /* space for marker */
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 1rem;
}

.container ul li,
.container ol li,
.card ul li,
.case-card-inner li,
.platform-item ul li,
.download-notice li,
.info-list-official li {
  margin-bottom: 0.6rem;
  text-indent: 0;
}

/* Nested lists get additional indent */
.container ul ul,
.container ol ol,
.card ul ul,
.case-card-inner ul ul {
  padding-left: 1.25rem;
  margin-top: 0.25rem;
}

/* Improve ordered list marker weight and spacing */
.container ol {
  list-style-type: decimal;
}
.container ol li::marker,
.card ol li::marker {
  color: var(--primary-color);
  font-weight: 700;
}

/* Make unordered bullets use primary color */
.container ul li::marker,
.card ul li::marker,
.case-card-inner ul li::marker {
  color: var(--primary-color);
}

.case-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.case-link {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 768px) {
  .case-wrapper .case-grid {
    grid-template-columns: 1fr;
  }
}

/* cases header layout to align title with inner card content */
.cases-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cases-header-left {
  padding-left: 0; /* header now sits inside .case-wrapper so no extra offset needed */
}

.cases-header-left .section-title-official {
  /* Ensure title aligns with the left edge of the cards in the case wrapper */
  text-align: left;
  margin: 0 0 0.25rem 0;
}
.cases-header-left p {
  /* Ensure subtitle aligns with the title and add spacing below before the cards */
  text-align: left;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.cases-header-right {
  padding-right: 1rem;
}

@media (max-width: 1024px) {
  .cases-header-left {
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .cases-header-left {
    padding-left: 0;
  }
  .cases-header-right {
    align-self: flex-end;
  }
}

.partner-logos {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.partner-logo {
  min-width: 120px;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(123,44,191,0.06);
  color: var(--text-primary);
  font-weight:600;
}

/* ========== 团队 ========== */
.team-section {
  padding: 3rem 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.team-member {
  text-align: center;
  padding: 1.5rem;
}

.team-member h4 {
  margin-top: 0.75rem;
  color: var(--text-primary);
}

.team-member p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ========== FAQ 与联系表单 ========== */
.contact-faq-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  padding: 3rem 0;
}

.faq-section details {
  margin-bottom: 1rem;
  border: 1px solid rgba(123,44,191,0.06);
  border-radius: 8px;
  overflow: hidden;
}

.contact-section .contact-form input,
.contact-section .contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(123,44,191,0.08);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
  background: transparent;
}

.contact-section .contact-form input:focus,
.contact-section .contact-form textarea:focus {
  border-color: var(--primary-color);
}

.contact-form button {
  width: 100%;
  max-width: none;
  min-width: 0;
  display: inline-block;
}

/* Desktop: tighten FAQ / contact blocks so they don't touch page edges on wide viewports */
@media (min-width: 769px) {
  .contact-faq-section,
  .contact-faq-section .faq-section,
  .contact-faq-section .faq-list,
  .contact-faq-section .faq-item,
  .contact-faq-section .contact-section,
  .contact-faq-section .card {
    /* Match site main content/card max width so FAQ lines up with other cards */
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
  }
  /* ensure inner white cards keep their internal padding but remain centered */
  .contact-faq-section .card .card-body,
  .contact-faq-section .contact-section.card,
  .contact-faq-section .faq-item {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Ensure contact card text uses primary color and links have no underline */
.contact-section.card,
.contact-section.card h2,
.contact-section.card p,
.contact-section.card label,
.contact-section.card a,
.contact-section.card .contact-form input,
.contact-section.card .contact-form textarea {
  color: var(--text-primary);
}
.contact-section.card a {
  text-decoration: none;
  color: var(--text-primary);
}

/* Slightly tighten spacing in contact card actions */
.contact-section .contact-form > div[style] {
  gap: 1rem;
  align-items: center;
}

/* Download page specific styles */
.download-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.download-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-light);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(123,44,191,0.18);
  text-decoration: none;
}

.download-cta svg { flex: none; }

.download-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.download-screenshots img {
  width: 100%;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.version-list li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed rgba(123,44,191,0.06);
}

.version-list li .version-actions {
  display:flex;
  gap:0.75rem;
  align-items:center;
}

.version-list li .btn.btn-outline {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.download-aside .card {
  padding: 1rem;
}

@media (max-width: 1024px) {
  .download-main-grid {
    grid-template-columns: 1fr;
  }
  .download-cta { width: 100%; justify-content: center; }
}

/* Redesigned download page - refined layout & hierarchy */
.download-hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  align-items: stretch; /* make columns equal height so bottom alignment works */
  margin-bottom: 2rem;
}
.download-hero-grid .hero-left,
.download-hero-grid .hero-right {
  display: flex;
  flex-direction: column;
}
.download-hero-grid .hero-left .version-card {
  margin-top: auto; /* push version card to bottom of left column */
}
.download-hero-grid .hero-right .card:last-child {
  margin-top: auto; /* push last card (系统要求) to bottom of right column */
}
/* Ensure the left version card fills the left column and the right cards don't shrink */
.download-hero-grid .hero-left .version-card {
  width: 100%;
  max-width: none;
  align-self: stretch;
  min-height: 320px; /* restore original default */
}

/* Download-page specific: expand the "最新版本更新内容" card horizontally
   and reduce its visual height proportionally without affecting other pages.
   Use negative margins so it visually extends into the available gutter space. */
/* Ensure outer shell allows visible overflow so the inner version-card can extend */
/* Download-page: expand the outer gradient shell so the inner version-card can extend
   without overflowing the gradient background. Make the outer shell wider and center it
   by using negative horizontal margins; keep the inner version-card full-width inside. */
body.download-page .help-shell .help-outer {
  box-sizing: border-box !important;
  /* further reduce horizontal extension per request */
  width: calc(100% + 40px) !important;
  max-width: none !important;
  margin-left: -20px !important;
  margin-right: -20px !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  overflow: visible !important; /* allow decorative shadows to show */
}

body.download-page .help-shell .help-outer .version-card {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  /* fill the expanded outer shell; no further horizontal offset required */
  width: 100% !important;
  max-width: none !important;
  left: 0 !important;
  min-height: 150px; /* reduced height per request */
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  margin-bottom: 32px; /* slightly less bottom spacing */
}
.download-hero-grid .hero-right .card {
  width: 100%;
  box-sizing: border-box;
}
.download-hero-grid .hero-left h1 {
  font-size: 2.4rem;
  margin: 0;
  color: var(--primary-color);
}
.download-hero-grid .hero-left p.lead {
  margin-top: 0.5rem;
  color: var(--text-primary);
  font-size: 1.05rem;
}
.hero-ctas {
  display:flex;
  gap:0.75rem;
  margin-top:1rem;
  flex-wrap:wrap;
}
.hero-ctas .download-cta {
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
}
.hero-highlights {
  display:flex;
  gap:1rem;
  margin-top:1.25rem;
  flex-wrap:wrap;
}
.hero-highlights .hl {
  background: rgba(123,44,191,0.06);
  color: var(--text-primary);
  padding:0.5rem 0.75rem;
  border-radius:8px;
  font-weight:600;
  font-size:0.95rem;
}
.hero-right .logo-box {
  text-align:center;
  padding:1rem;
  border-radius:12px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 6px 20px rgba(123,44,191,0.04);
}
.hero-right .badges {
  display:flex;
  gap:0.5rem;
  justify-content:center;
  margin-top:0.75rem;
  flex-wrap:wrap;
}
.hero-right .badge {
  background: rgba(123,44,191,0.08);
  color: var(--primary-color);
  padding:0.25rem 0.6rem;
  border-radius:999px;
  font-weight:700;
  font-size:0.85rem;
}

.download-features {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  gap:1rem;
  margin-top:1.75rem;
}
.feature-card {
  background: rgba(255,255,255,0.95);
  padding:1rem;
  border-radius:10px;
  box-shadow: 0 6px 24px rgba(123,44,191,0.04);
  text-align:center;
}
.feature-card h4 { margin-bottom:0.5rem; color:var(--primary-color); }
.feature-card p { color:var(--text-secondary); font-size:0.95rem; }

.version-table {
  width:100%;
  border-collapse:collapse;
  margin-top:1rem;
}
.version-table th, .version-table td {
  padding:0.75rem 0.5rem;
  text-align:left;
  border-bottom:1px solid rgba(123,44,191,0.06);
}
.version-table th { color:var(--primary-color); font-weight:700; }
.version-download-btn {
  padding:0.45rem 0.6rem;
  border-radius:8px;
  font-size:0.9rem;
}
.checksum {
  font-family:monospace;
  font-size:0.85rem;
  color:var(--text-secondary);
}

.faq-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:1rem;
  margin-top:1.5rem;
}
.faq-item {
  background: rgba(255,255,255,0.95);
  padding:1rem;
  border-radius:8px;
  line-height:1.6;
}

@media (max-width: 1024px) {
  .download-hero-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
}

/* Version card styling to ensure clear separation and prevent icon/text overlap */
.version-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(123,44,191,0.06);
  box-shadow: 0 10px 30px rgba(123,44,191,0.06);
  position: relative;
  overflow: hidden;
  margin-top: 0.75rem;
  text-align: left;
}
.version-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.version-card .version-list {
  margin: 0;
  padding-left: 0;
  text-align: left;
}
.version-card .version-list {
  flex: 1 1 auto; /* allow list to take available space so footer stays at bottom */
}
.version-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px dashed rgba(123,44,191,0.06);
}
.version-card .version-meta {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.version-card .version-list li {
  border-bottom: none;
  padding: 0.6rem 0;
}
.version-card .version-card-footer-text {
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px dashed rgba(123,44,191,0.06);
  text-align: right;
}

/* Help-center style: outer gradient card with inner white card */
.help-outer {
  /* stronger help-center style gradient: purple -> light cyan -> purple */
  background: linear-gradient(90deg,
    rgba(123,44,191,0.12) 0%,
    rgba(225,249,253,0.75) 50%,
    rgba(157,78,221,0.10) 100%);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 30px rgba(123,44,191,0.06);
  border: 1px solid rgba(123,44,191,0.04);
}
.help-shell {
  /* ensure spacing matches other sections */
  margin-bottom: 0.75rem;
}
.help-outer .version-card {
  /* inner card color adjusted per request */
  background: #FBFCFE;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(123,44,191,0.06);
  box-shadow: 0 8px 24px rgba(123,44,191,0.04);
  color: var(--text-primary);
}
/* ensure faq items inside help-outer look like inner white cards */
.help-outer .faq-item {
  /* inner FAQ card color adjusted per request */
  background: #FBFCFE;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(123,44,191,0.06);
  box-shadow: 0 8px 24px rgba(123,44,191,0.04);
  color: var(--text-primary);
}
.help-outer .faq-grid {
  gap: 1rem;
}

/* grid of small inner cards for version entries */
.help-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
  align-items: stretch;
}
.help-card {
  background: #FBFCFE;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(123,44,191,0.06);
  box-shadow: 0 8px 20px rgba(123,44,191,0.04);
  display: flex;
  align-items: flex-start;
  width: 100%;
}
.help-card .card-body {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  flex: none;
  margin-top: 6px;
}
.card-text {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Force inner card content to be left-aligned */
.help-outer .version-card,
.help-outer .faq-item,
.help-card,
.feature-card {
  text-align: left;
}
.help-outer .version-card h3,
.help-outer .version-card p,
.help-outer .faq-item h4,
.help-outer .faq-item p,
.help-card .card-text,
.feature-card h4,
.feature-card p {
  text-align: left;
}

.version-card .version-list li {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-left: 0;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
.version-card .version-list li::before {
  /* replace previous triangle bullet with a small primary-color dot */
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  flex: none;
  /* ensure we are not affected by older absolute-positioned rules */
  position: static;
  margin-right: 0.75rem;
  margin-top: 0; /* align vertically via align-items:center */
}

.version-card .version-list .version-text {
  display: block;
  margin: 0;
  line-height: 1.6;
}
.version-card .version-list .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  flex: none;
  margin-right: 0.6rem;
  vertical-align: middle;
}
.version-card .version-list li {
  align-items: center; /* ensure dot and first text line are vertically centered */
}
.version-card h3 { margin-top: 0; }
.version-card .version-actions { gap: 0.5rem; align-items: center; display:flex; flex-wrap:wrap; }
.version-card .version-actions .checksum { margin-left:0.5rem; }

@media (max-width: 1024px) {
  .contact-faq-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .contact-faq-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .contact-faq-section .card {
    margin-left: 0;
    margin-right: 0;
  }
}

/* About page mobile fixes: prevent content overflow */
@media (max-width: 768px) {
  body.about-page .container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Scale down the stats section to fit mobile viewport */
  body.about-page section[style*="padding:4rem 1rem; text-align:center;"] {
    padding: 2rem 0.5rem !important;
  }

  /* Reduce gap between stat columns and make them fit better */
  body.about-page div[style*="display:flex; justify-content:center; gap:4rem; align-items:flex-end;"] {
    gap: 1.5rem !important;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  /* Make stat numbers smaller on mobile */
  body.about-page div[style*="display:flex; justify-content:center; gap:4rem; align-items:flex-end;"] div {
    font-size: 1.8rem !important;
  }

  /* Adjust the big headline size */
  body.about-page h1[style*="font-size:2rem; line-height:1.4; margin:0 0 2.5rem; font-weight:700;"] {
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 0 0.5rem;
  }

  /* Reduce padding on help-outer blocks */
  body.about-page .help-outer {
    padding: 0.75rem !important;
    margin: 1rem 0 !important;
  }

  /* Ensure help cards fit within viewport */
  body.about-page .help-outer .version-card {
    padding: 1rem !important;
  }

  /* Reduce CTA section padding */
  body.about-page section[style*="padding:3rem 0; background:transparent; text-align:center;"] {
    padding: 2rem 1rem !important;
  }

  /* Make CTA button smaller and fit better */
  body.about-page .btn-primary[style*="display:inline-block; padding:0.9rem 2rem; border-radius:8px; font-weight:700;"] {
    padding: 0.8rem 1.5rem !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 280px !important;
  }
}

/* Mobile: slightly increase right-side offset for the nav links group
   This only affects screens <= 768px so desktop layout remains unchanged. */
@media (max-width: 768px) {
  /* Move the nav-menu further to the right as a whole.
     Increased offset per user request. */
  .nav-menu {
    transform: translateX(64px) !important;
  }

  /* For very narrow screens, reduce the translate to avoid clipping */
  @media (max-width: 420px) {
    .nav-menu {
      transform: translateX(44px) !important;
    }
  }
}

/* Hide the top search box for intermediate tablet widths (e.g. iPad width ~820px)
   This ensures the search is hidden for screens <= 820px while leaving desktop intact. */
@media (max-width: 820px) {
  .official-search {
    display: none !important;
  }
}

/* Calendar: ensure full month fits horizontally at intermediate widths (<=820px)
   Reduce gaps/padding and slightly shorten aspect ratio so 7 columns fit without horizontal scroll. */
@media (max-width: 820px) {
  body.calendar-page {
    overflow-x: hidden !important;
  }

  /* tighten outer paddings so grid can use more available width
     Scope this to the calendar page only to avoid affecting homepage centering. */
  body.calendar-page .container,
  body.calendar-page .calendar-container {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    box-sizing: border-box !important;
  }

  /* make the calendar grid use the full width and reduce internal gaps */
  .calendar-grid {
    width: 100% !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0.12rem !important;
  }

  /* shrink each day card a bit and relax the 1:1 aspect ratio so they fit */
  .calendar-day {
    padding: 0.28rem !important;
    aspect-ratio: 0.93 !important; /* slightly shorter than square so 7 columns fit */
    border-radius: 8px !important;
    min-width: 0 !important;
  }

  .calendar-day .day-number {
    font-size: 0.86rem !important;
    font-weight: 600 !important;
  }

  .calendar-day .day-event {
    font-size: 0.72rem !important;
    line-height: 1.1 !important;
    padding: 0 !important;
  }

  /* reduce header/footer margins on calendar card */
  .calendar-container ~ .card,
  .calendar-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

