/* =============================================
   down-clash.com.cn - Clash Download Site Styles
   Modern, clean, SEO-optimized design
   ============================================= */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-dark: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   Layout & Container
   ============================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   Typography
   ============================================= */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--primary-dark); }

/* =============================================
   Header & Navigation
   ============================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}

.logo svg { width: 36px; height: 36px; }

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray);
  border-radius: 8px;
  transition: all 0.2s;
}

.nav a:hover {
  color: var(--primary);
  background: rgba(99,102,241,0.06);
}

.nav a.active {
  color: var(--primary);
  background: rgba(99,102,241,0.08);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--gradient-primary);
  color: var(--white) !important;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  color: var(--white) !important;
  background: var(--gradient-primary);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
  position: relative;
  padding: 80px 0 100px;
  background: var(--dark);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
}

.hero-stat-label {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
  color: var(--white);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
}

/* =============================================
   Section Styles
   ============================================= */

.section {
  padding: 80px 0;
}

.section-sm {
  padding: 48px 0;
}

.section-dark {
  background: var(--dark);
  color: var(--white);
}

.section-gray {
  background: var(--light);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--gray);
  font-size: 1.0625rem;
}

.section-header-light p {
  color: rgba(255,255,255,0.6);
}

/* =============================================
   Platform Cards
   ============================================= */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.platform-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s;
  overflow: hidden;
}

.platform-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.platform-card:hover::before { opacity: 1; }

.platform-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  border-radius: 12px;
  font-size: 24px;
  margin-bottom: 16px;
}

.platform-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.platform-card p {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0;
}

.platform-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

/* =============================================
   Features Grid
   ============================================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 28px;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--gray);
  font-size: 0.9375rem;
  margin-bottom: 0;
  line-height: 1.7;
}

/* =============================================
   Content Cards
   ============================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.card-image {
  width: 100%;
  height: 200px;
  background: var(--gradient-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,0.2);
}

.card-body {
  padding: 24px;
}

.card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(99,102,241,0.08);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.card h3 a {
  color: var(--dark);
}

.card h3 a:hover { color: var(--primary); }

.card p {
  color: var(--gray);
  font-size: 0.9375rem;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--gray);
}

/* =============================================
   Table
   ============================================= */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

thead {
  background: var(--light);
}

th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--dark);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--gray);
}

tr:last-child td { border-bottom: none; }

tbody tr:hover {
  background: rgba(99,102,241,0.02);
}

code {
  background: rgba(99,102,241,0.08);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.875em;
}

pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 24px;
  font-family: 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* =============================================
   FAQ
   ============================================= */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item:hover { border-color: var(--primary-light); }

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.2s;
}

.faq-question:hover { color: var(--primary); }

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gray);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--gray);
  line-height: 1.7;
}

.faq-answer-inner p { margin-bottom: 12px; }
.faq-answer-inner p:last-child { margin-bottom: 0; }

/* =============================================
   Breadcrumb
   ============================================= */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 0.875rem;
  color: var(--gray);
}

.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--primary); }

.breadcrumb span { color: var(--primary); }

/* =============================================
   Article / Blog Post
   ============================================= */

.article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-header h1 {
  font-size: 2.25rem;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--gray);
}

.article-content h2 {
  font-size: 1.625rem;
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-content h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content p {
  color: var(--dark-3);
  line-height: 1.8;
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
  color: var(--dark-3);
  line-height: 1.7;
}

.article-content strong { color: var(--dark); }

/* =============================================
   Footer
   ============================================= */

.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-top: 16px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9375rem;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}

.footer-links li { margin-bottom: 12px; }

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom-links a:hover { color: var(--white); }

/* =============================================
   Steps
   ============================================= */

.steps {
  display: flex;
  gap: 24px;
  margin: 40px 0;
}

.step {
  flex: 1;
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -12px;
  width: 24px;
  height: 2px;
  background: var(--border);
}

.step:last-child::after { display: none; }

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0;
}

/* =============================================
   Download Section
   ============================================= */

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s;
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.download-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  border-radius: 16px;
  font-size: 32px;
  flex-shrink: 0;
}

.download-info { flex: 1; }

.download-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.download-info p {
  color: var(--gray);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.download-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.download-tag {
  padding: 4px 10px;
  background: var(--light);
  color: var(--gray);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
}

/* =============================================
   Schema Markup Placeholder (JSON-LD visual)
   ============================================= */

.schema-info {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 32px;
  font-size: 0.875rem;
}

.schema-info code {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--dark);
  color: #a5f3fc;
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.8125rem;
}

/* =============================================
   Mobile Responsive
   ============================================= */

@media (max-width: 768px) {
  .hero { padding: 60px 0 80px; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .hero-stat-number { font-size: 1.5rem; }

  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }

  .section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }

  .nav { display: none; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .steps {
    flex-direction: column;
  }

  .step::after { display: none; }

  .features-grid,
  .platform-grid,
  .card-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .table-wrapper {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* =============================================
   Utility Classes
   ============================================= */

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gray { color: var(--gray); }
.text-white { color: var(--white); }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.hidden { display: none; }

/* =============================================
   Scrollbar
   ============================================= */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark-3); }
