/* ===== CSS Variables ===== */
:root {
  --primary: #1A73E8;
  --primary-hover: #185ABC;
  --primary-active: #1557B0;
  --light-blue: #E8F0FE;
  --bright-blue: #4285F4;
  --bg-gray: #F5F7FA;
  --white: #FFFFFF;
  --dark: #202124;
  --medium-gray: #5F6368;
  --light-gray: #DADCE0;
  --green: #34A853;
  --red: #EA4335;
  --yellow: #FBBC04;
  --shadow: 0 1px 2px rgba(60,64,67,0.08), 0 2px 6px rgba(60,64,67,0.06);
  --shadow-hover: 0 4px 12px rgba(60,64,67,0.12), 0 2px 4px rgba(60,64,67,0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 24px;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ===== Keyframes ===== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-gray {
  background: var(--bg-gray);
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--medium-gray);
  margin-bottom: 48px;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-gray);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: var(--shadow);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-menu a {
  color: var(--medium-gray);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.3s;
  }
  .nav-menu.open {
    transform: translateX(0);
  }
  .nav-menu a {
    font-size: 20px;
  }
  .nav-menu a.active::after {
    display: none;
  }
}

/* ===== Hero Section ===== */
.hero {
  padding: calc(var(--nav-height) + 80px) 0 80px;
  background: var(--white);
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--light-blue);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 40px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  color: var(--medium-gray);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-version {
  font-size: 13px;
  color: var(--medium-gray);
}

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.hero-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 28px;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--white);
  box-shadow: var(--shadow-hover);
}

.btn-primary:active {
  background: var(--primary-active);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
  background: var(--light-blue);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

/* Loading spinner */
.spinner {
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

/* ===== Platform Cards ===== */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.platform-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
}

.platform-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.platform-version {
  font-size: 14px;
  color: var(--medium-gray);
  margin-bottom: 4px;
}

.platform-req {
  font-size: 12px;
  color: var(--medium-gray);
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .platform-grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .platform-card {
    min-width: 200px;
    flex-shrink: 0;
  }
}

/* ===== Stats Section ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 16px;
  color: var(--medium-gray);
  margin-top: 8px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .stat-number {
    font-size: 36px;
  }
}

/* ===== News Cards ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.news-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.news-content {
  padding: 20px;
}

.news-tag {
  display: inline-block;
  background: var(--light-blue);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.news-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  font-size: 14px;
  color: var(--medium-gray);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: var(--medium-gray);
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Resource Scroll ===== */
.resource-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.resource-card {
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  padding: 20px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.resource-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.resource-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--primary);
}

.resource-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.resource-desc {
  font-size: 13px;
  color: var(--medium-gray);
}

/* ===== Download Page ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.download-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}

.download-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.download-card-icon {
  width: 56px;
  height: 56px;
}

.download-card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
}

.download-card-version {
  font-size: 14px;
  color: var(--medium-gray);
}

.download-requirements {
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.download-requirements h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.download-requirements ul {
  list-style: none;
  font-size: 13px;
  color: var(--medium-gray);
  line-height: 1.8;
}

.download-requirements li::before {
  content: '·';
  margin-right: 6px;
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .download-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Changelog ===== */
.changelog {
  max-width: 800px;
  margin: 0 auto;
}

.changelog-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--light-gray);
}

.changelog-version {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.changelog-date {
  font-size: 13px;
  color: var(--medium-gray);
}

.changelog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.changelog-list {
  list-style: none;
  font-size: 14px;
  color: var(--medium-gray);
  line-height: 1.8;
}

.changelog-list li::before {
  content: '·';
  margin-right: 8px;
  color: var(--primary);
  font-weight: 700;
}

@media (max-width: 768px) {
  .changelog-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--light-gray);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  cursor: pointer;
}

.faq-icon {
  width: 24px;
  height: 24px;
  color: var(--medium-gray);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 20px;
}

.faq-answer p {
  font-size: 15px;
  color: var(--medium-gray);
  line-height: 1.7;
}

/* ===== Article Page ===== */
.article-header {
  padding: calc(var(--nav-height) + 60px) 0 40px;
}

.article-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--medium-gray);
  margin-bottom: 32px;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--dark);
}

.article-body p {
  margin-bottom: 16px;
}

.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 40px 0 16px;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin: 32px 0 12px;
}

.article-body ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-size: 15px;
  font-weight: 500;
}

/* ===== News List Page ===== */
.news-list-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--light-gray);
  transition: all 0.2s;
}

.news-list-item:hover {
  background: var(--bg-gray);
  margin: 0 -24px;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.news-list-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.news-list-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-list-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 10px;
}

.news-list-excerpt {
  font-size: 15px;
  color: var(--medium-gray);
  line-height: 1.6;
  margin-bottom: 12px;
}

.news-list-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--medium-gray);
}

@media (max-width: 768px) {
  .news-list-item {
    grid-template-columns: 1fr;
  }
  .news-list-item:hover {
    margin: 0;
    padding: 24px 0;
  }
}

/* ===== Chinese Page - Tutorial ===== */
.tutorial-section {
  margin-bottom: 48px;
}

.tutorial-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light-blue);
}

.tutorial-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  margin: 24px 0 12px;
}

.tutorial-section p {
  font-size: 16px;
  color: var(--medium-gray);
  line-height: 1.8;
  margin-bottom: 12px;
}

.tutorial-section ol,
.tutorial-section ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.tutorial-section li {
  font-size: 15px;
  color: var(--medium-gray);
  line-height: 1.8;
  margin-bottom: 8px;
}

.tutorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.tutorial-table th {
  background: var(--light-blue);
  color: var(--primary);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--primary);
}

.tutorial-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--light-gray);
  color: var(--dark);
}

.tutorial-table tr:hover td {
  background: var(--bg-gray);
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 24px 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-security {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
}

.footer-copyright {
  font-size: 13px;
  color: #9AA0A6;
}

/* ===== Utilities ===== */
.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* ===== Page Header ===== */
.page-header {
  padding: calc(var(--nav-height) + 60px) 0 40px;
  background: var(--bg-gray);
  text-align: center;
}

.page-header h1 {
  font-size: 40px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: var(--medium-gray);
}

@media (max-width: 768px) {
  .page-header h1 {
    font-size: 28px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--light-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--medium-gray);
}
