:root {
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-accent: #0ea5e9;
  --color-border: #e2e8f0;
  --color-ad: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 10px;
  --max-width: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 16px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .page-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  padding: 70px 0 50px;
  text-align: center;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.25;
  margin-bottom: 20px;
  color: var(--color-text);
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-muted);
  max-width: 720px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
}

.btn:hover {
  background: var(--color-primary-hover);
  text-decoration: none;
}

/* Layout */
section {
  margin-bottom: 56px;
}

h2 {
  font-size: 1.7rem;
  margin: 36px 0 14px;
  color: var(--color-text);
}

h3 {
  font-size: 1.25rem;
  margin: 24px 0 10px;
  color: var(--color-text);
}

h4 {
  font-size: 1.1rem;
  margin: 20px 0 8px;
  color: var(--color-text);
}

p {
  margin-bottom: 18px;
  color: var(--color-muted);
}

ul, ol {
  margin-bottom: 18px;
  padding-left: 24px;
  color: var(--color-muted);
}

ul li, ol li {
  margin-bottom: 10px;
}

strong {
  color: var(--color-text);
}

/* Tables */
table.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

table.compare th {
  background: var(--color-surface);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 600;
}

table.compare td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

table.compare tr:last-child td {
  border-bottom: none;
}

table.compare tr:hover {
  background: #f8fafc;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.app-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--color-bg);
  transition: box-shadow 0.2s ease;
}

.app-card:hover {
  box-shadow: var(--shadow);
}

.app-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.app-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #1e3a8a;
  margin-right: 6px;
  margin-bottom: 8px;
}

.notice {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 20px;
  margin: 28px 0;
  font-size: 0.95rem;
  color: #92400e;
}

.notice strong {
  color: #92400e;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
  background: var(--color-bg);
}

.faq-item h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.faq-item p {
  margin-bottom: 0;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 28px;
}

.breadcrumb a {
  color: var(--color-primary);
}

/* Related articles block */
.related {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  margin: 44px 0;
}

.related h3 {
  margin-bottom: 18px;
  font-size: 1.15rem;
  color: var(--color-text);
}

.related ul {
  list-style: none;
  padding-left: 0;
}

.related li {
  margin-bottom: 12px;
  padding-left: 22px;
  position: relative;
}

.related li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* Advertising slots */
.ad-slot {
  text-align: center;
  padding: 40px 0;
  background: var(--color-ad);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  margin: 48px 0;
}

.ad-banner {
  display: inline-block;
  max-width: 100%;
}

.ad-placeholder {
  background: #e2e8f0;
  color: var(--color-muted);
  padding: 48px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  max-width: 100%;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0;
  border-top: 1px solid #1e293b;
  margin-top: 70px;
}

.site-footer .page-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

.site-footer nav a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.site-footer nav a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.9rem;
  }

  .site-header .page-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .main-nav ul {
    gap: 16px;
    font-size: 0.9rem;
  }

  .site-footer .page-container {
    flex-direction: column;
    text-align: center;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  table.compare {
    font-size: 0.8rem;
  }
}