:root {
  --bg: #ffffff;
  --card: #f9fafb;
  --text: #111827;
  --text-sec: #4b5563;
  --primary: #3b82f6;
  --border: #e5e7eb;
  --nav-bg: #ffffff;
  --nav-text: #111827;
  --underline: #3b82f6;
  --news-bg: #f8fafc;
}

[data-theme="dark"] {
  --bg: #111827;
  --card: #1f2937;
  --text: #f3f4f6;
  --text-sec: #9ca3af;
  --primary: #60a5fa;
  --border: #374151;
  --nav-bg: #111827;
  --nav-text: #f3f4f6;
  --underline: #60a5fa;
  --news-bg: #1e293b;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s, color 0.4s;
}

.sr-only { 
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; 
  overflow:hidden; clip:rect(0,0,0,0); border:0; 
}

nav {
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links { display: flex; align-items: center; }

.nav-links a,
.nav-links .theme-toggle {
  margin-left: 2.8rem;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links .theme-toggle:hover { color: var(--primary); }

.nav-links .theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.hero { text-align: center; padding: 120px 1rem 80px; }
.hero h1 { font-size: 4.2rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; }
.hero .slogan { font-size: 1.55rem; color: var(--text-sec); margin-bottom: 2.5rem; }

.cta { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 2rem; }

.btn {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #2563eb; }

.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: rgba(59,130,246,0.05); }

section { padding: 100px 0; }

h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 4rem;
  position: relative;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--underline);
  border-radius: 2px;
}

.features-grid,
.screenshots-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .features-grid,
  .screenshots-grid,
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .features-grid,
  .screenshots-grid,
  .news-grid { grid-template-columns: 1fr; }
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s;
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.feature .icon { font-size: 4rem; margin-bottom: 1.5rem; color: var(--primary); }
.feature h3 { font-size: 1.5rem; margin: 1rem 0; color: var(--text); }
.feature p { color: var(--text-sec); font-size: 1.05rem; text-align: left; line-height: 1.6; }

.shot {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.shot:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 45px rgba(0,0,0,0.12);
}

.shot img { width: 100%; display: block; border-radius: 16px; }

.shot-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 1.2rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.shot:hover .shot-caption { opacity: 1; }

.news-center { margin-top: 5rem; }

.news-card {
  background: var(--news-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.25s ease;
}

.news-card:hover {
  border-color: var(--primary);
  background: rgba(59,130,246,0.03);
}

.news-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  color: var(--primary);
}

.news-card time {
  font-size: 0.9rem;
  color: var(--text-sec);
  display: block;
  margin-bottom: 1rem;
}

.news-card p {
  color: var(--text-sec);
  font-size: 1rem;
  line-height: 1.6;
}

.notice {
  text-align: center;
  color: #dc2626;
  font-size: 1.1rem;
  margin: 5rem 0;
}

footer {
  background: var(--card);
  text-align: center;
  padding: 4rem 1rem 2rem;
  color: var(--text-sec);
  border-top: 1px solid var(--border);
}

footer a { color: var(--primary); text-decoration: none; margin: 0 0.8rem; }
footer a:hover { text-decoration: underline; }

/* 回到顶部按钮 */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.visible {
  opacity: 0.9;
  visibility: visible;
}

#back-to-top:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.3);
}

[data-theme="dark"] #back-to-top {
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .hero .slogan { font-size: 1.3rem; }
  section { padding: 80px 0; }
  .nav-container { padding: 0 1.5rem; }
  .nav-links a,
  .nav-links .theme-toggle { margin-left: 1.4rem; }
  .nav-links .theme-toggle { font-size: 1.3rem; }
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
}

/* 新闻列表页专属样式 */
.hero.hero-news {
  padding: 90px 1rem 60px;
}
.hero-news h1 {
  font-size: 3.6rem;
  margin-bottom: 0.8rem;
}

.news-list-page {
  padding-top: 40px;
}

.news-card {
  background: var(--news-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.news-thumb {
  display: block;
  height: 180px;
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.news-card:hover .news-thumb img {
  transform: scale(1.06);
}

.news-content {
  padding: 1.5rem 1.8rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card h3 {
  font-size: 1.38rem;
  margin: 0 0 0.8rem;
  line-height: 1.4;
}

.news-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.news-card h3 a:hover {
  color: var(--primary);
}

.tag-top {
  font-size: 0.8rem;
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.news-meta {
  font-size: 0.9rem;
  color: var(--text-sec);
  margin-bottom: 1rem;
}

.news-meta time,
.news-meta .views {
  margin-right: 1.2rem;
}

.news-desc {
  color: var(--text-sec);
  font-size: 1.02rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  flex: 1;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  align-self: flex-start;
}

.read-more:hover {
  text-decoration: underline;
}

/* 分页样式 - 保持简洁 */
.pagination {
  text-align: center;
  margin: 4rem 0 2rem;
  font-size: 1.05rem;
}

.pagination a,
.pagination span.current {
  padding: 0.6rem 1.2rem;
  margin: 0 0.4rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-sec);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.pagination a:hover,
.pagination span.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .news-card {
    flex-direction: row;
  }
  .news-thumb {
    width: 38%;
    height: auto;
  }
  .news-content {
    width: 62%;
  }
}

@media (max-width: 640px) {
  .news-card {
    flex-direction: column;
  }
  .news-thumb,
  .news-content {
    width: 100%;
  }
  .news-thumb {
    height: 160px;
  }
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.6rem; /* 如果后面还想保留文字可参考这个字号 */
}

.logo-img {
  height: 50px;          /* 常见高度，可根据实际图标大小调整：32px ~ 48px */
  width: auto;           /* 保持比例 */
  max-height: 48px;      /* 防止太大 */
  display: block;
}

/* 暗色/亮色主题适配（如果有主题切换） */
[data-theme="dark"] .logo-img {
  filter: brightness(1.1); /* 可选：暗色模式下稍微提亮 */
}