/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #34a853;
  --warning: #f9ab00;
  --danger: #ea4335;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #80868b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --border: #dadce0;
  --border-light: #e8eaed;
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.08);
  --shadow-md: 0 4px 12px rgba(60,64,67,0.12);
  --shadow-lg: 0 8px 24px rgba(60,64,67,0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Animations ===== */
@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 float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

/* ===== Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--nav-height);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
}

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-menu a:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-menu svg {
  width: 18px;
  height: 18px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
}

.btn .spinner {
  display: none;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  display: none;
}

/* ===== Hero Section ===== */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f0fe 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26,115,232,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 6s ease-in-out infinite;
}

.hero-image svg {
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 20px 40px rgba(26,115,232,0.2));
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.hero-meta-item {
  text-align: center;
}

.hero-meta-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-meta-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Download Cards ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.download-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-md);
}

.download-card-icon svg {
  width: 32px;
  height: 32px;
}

.download-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.download-card-version {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.download-card-size {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.download-card-btn {
  width: 100%;
  padding: 10px;
  font-size: 0.9rem;
}

/* ===== Ticker ===== */
.ticker {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  overflow: hidden;
}

.ticker-wrap {
  display: flex;
  gap: 48px;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.ticker-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== News Cards ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.news-card-body {
  padding: 24px;
}

.news-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.news-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.news-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.news-card-link:hover svg {
  transform: translateX(4px);
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== Article Page ===== */
.article-header {
  padding: 60px 0 40px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-light) 100%);
}

.article-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 24px 0;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article-body p {
  margin-bottom: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-body ul,
.article-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-body strong {
  color: var(--text-primary);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  padding: 12px 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.article-back svg {
  width: 18px;
  height: 18px;
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-card);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-secondary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
  background: var(--text-primary);
  color: var(--text-muted);
  padding: 40px 0 24px;
  margin-top: 60px;
}

.footer-content {
  text-align: center;
}

.footer-safe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 20px;
  background: rgba(52,168,83,0.15);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.9rem;
}

.footer-safe svg {
  width: 18px;
  height: 18px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-image svg {
    width: 200px;
    height: 200px;
  }
  
  .hero-meta {
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    gap: 0;
  }
  
  .nav-menu a {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .nav-menu a span {
    display: none;
  }
  
  .article-title {
    font-size: 1.75rem;
  }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none; }
