/* ============ CSS Reset ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #2D2D2D;
  background: #FFFFFF;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ============ CSS Variables ============ */
:root {
  --color-primary: #E60012;
  --color-primary-hover: #CC0010;
  --color-nav-bg: #1E1E1E;
  --color-white: #FFFFFF;
  --color-bg-light: #F5F7FA;
  --color-text: #2D2D2D;
  --color-text-secondary: #666666;
  --color-border: #E8E8E8;
  --color-success: #10B981;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --spacing-section: 80px;
  --spacing-section-mobile: 50px;
}

/* ============ Keyframes ============ */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Spinner ============ */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.spinner-dark {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--color-primary);
}

/* ============ Container ============ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Navigation ============ */
.navbar {
  background: var(--color-nav-bg);
  height: 64px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  animation: slideDown 0.4s ease-out;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-size: 20px;
  font-weight: 600;
}

.navbar-brand svg {
  flex-shrink: 0;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.navbar-item {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  position: relative;
}

.navbar-item:hover {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

.navbar-item.active {
  color: var(--color-primary);
}

.navbar-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* Mobile Menu */
.navbar-toggle {
  display: none;
  color: var(--color-white);
  padding: 8px;
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-nav-bg);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
  }
  .navbar-menu.open {
    display: flex;
  }
  .navbar-item {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .navbar-item.active::after {
    display: none;
  }
  .navbar-toggle {
    display: block;
  }
}

/* ============ Main Content ============ */
main {
  padding-top: 64px;
  animation: fadeIn 0.3s ease-out;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: transparent;
  color: #333;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 17px;
}

/* ============ Section ============ */
.section {
  padding: var(--spacing-section) 0;
}

.section-alt {
  background: var(--color-bg-light);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 48px;
}

/* ============ Cards ============ */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

/* ============ Hero Section ============ */
.hero {
  background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-white) 100%);
  padding: 100px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0 50px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 26px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* ============ Platform Cards ============ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.platform-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.platform-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.platform-card.featured {
  border-color: var(--color-primary);
  position: relative;
}

.platform-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -1px;
  right: 16px;
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 0 0 6px 6px;
}

.platform-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.platform-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.platform-version {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.platform-requirement {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.platform-btn {
  padding: 10px 24px;
  font-size: 14px;
}

/* ============ Feature Cards ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--color-primary);
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============ Why Choose Section ============ */
.reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.reason-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.reason-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.reason-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  color: var(--color-primary);
}

.reason-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.reason-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============ FAQ Section ============ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.faq-question:hover {
  background: var(--color-bg-light);
}

.faq-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 18px;
}

.faq-answer p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============ News Cards ============ */
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.news-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.5;
  color: var(--color-text);
}

.news-title:hover {
  color: var(--color-primary);
}

.news-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 14px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #999;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

.news-link:hover {
  text-decoration: underline;
}

/* ============ Stats Section ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-item {
  padding: 24px;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* ============ Download List ============ */
.download-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.download-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.download-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.download-item.featured {
  border-color: var(--color-primary);
}

.download-item-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.download-item-info {
  flex: 1;
}

.download-item-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.download-item-meta {
  font-size: 14px;
  color: var(--color-text-secondary);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.download-item-action {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .download-item {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .download-item-action {
    width: 100%;
  }
  .download-item-action .btn {
    width: 100%;
  }
}

/* ============ Changelog ============ */
.changelog-list {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-item {
  background: var(--color-white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.changelog-header {
  width: 100%;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.changelog-header:hover {
  background: var(--color-bg-light);
}

.changelog-version {
  font-weight: 600;
  color: var(--color-primary);
  margin-right: 12px;
}

.changelog-date {
  color: #999;
  font-size: 14px;
}

.changelog-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.changelog-item.open .changelog-body {
  max-height: 400px;
  padding: 0 24px 18px;
}

.changelog-body ul {
  padding-left: 20px;
}

.changelog-body ul li {
  list-style: disc;
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

/* ============ Feature Detail ============ */
.feature-detail {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
}

.feature-detail:last-child {
  border-bottom: none;
}

.feature-detail-icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.feature-detail-content h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-detail-content p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.feature-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.feature-detail-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}

.feature-detail-list svg {
  width: 18px;
  height: 18px;
  color: var(--color-success);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .feature-detail {
    flex-direction: column;
    gap: 24px;
  }
  .feature-detail-list {
    grid-template-columns: 1fr;
  }
}

/* ============ Article ============ */
.article-hero {
  background: var(--color-bg-light);
  padding: 60px 0 40px;
}

.article-hero-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.article-title {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--color-text-secondary);
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 0;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--color-text);
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--color-text);
}

.article-body p {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
}

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body ul li, .article-body ol li {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--color-text);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 500;
  margin-top: 40px;
}

.article-back:hover {
  text-decoration: underline;
}

/* ============ News List Page ============ */
.news-page-list {
  max-width: 900px;
  margin: 0 auto;
}

.news-page-item {
  display: flex;
  gap: 24px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.news-page-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.news-page-image {
  width: 280px;
  height: 180px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-page-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (max-width: 640px) {
  .news-page-item {
    flex-direction: column;
  }
  .news-page-image {
    width: 100%;
    height: 200px;
  }
}

/* ============ Footer ============ */
.footer {
  background: var(--color-nav-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0 32px;
  text-align: center;
}

.footer-safe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-copyright {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

/* ============ Fade Up Animation ============ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .section {
    padding: var(--spacing-section-mobile) 0;
  }
  .hero-grid {
    gap: 40px;
  }
  .platform-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 640px) {
  .section-title {
    font-size: 22px;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .reason-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-number {
    font-size: 36px;
  }
  .article-title {
    font-size: 24px;
  }
  .feature-detail-list {
    grid-template-columns: 1fr;
  }
}
