﻿:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --text: #212529;
  --text-light: #6c757d;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --border: #dee2e6;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --radius: 8px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f8f9fa;
    --text-light: #adb5bd;
    --bg: #121212;
    --bg-light: #1e1e1e;
    --border: #404040;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header */
.header { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; padding: 8px 0; }
.nav-container { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 24px; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; }
.nav-menu { display: flex; list-style: none; gap: 32px; }
.nav-menu a { padding: 8px 0; font-weight: 500; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 20px; transform: translateY(-100%); opacity: 0; visibility: hidden; transition: 0.3s; }
  .nav-menu.active { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
}

/* Buttons */
.btn { display: inline-block; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; text-align: center; border: none; cursor: pointer; transition: 0.3s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: white; text-decoration: none; }

/* Cards */
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 12px; }
.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Hero */
.hero { text-align: center; padding: 80px 0; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.25rem; margin-bottom: 32px; opacity: 0.9; }

@media (max-width: 768px) {
  .hero { padding: 60px 0; }
  .hero h1 { font-size: 2rem; }
}

/* Sections */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 20px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 60px; }

/* Breadcrumbs */
.breadcrumb { background: var(--bg-light); padding: 16px 0; }
.breadcrumb-list { display: flex; list-style: none; gap: 8px; align-items: center; }
.breadcrumb-list li:not(:last-child)::after { content: '/'; margin-left: 8px; color: var(--text-light); }

/* Article */
.article-header { margin-bottom: 40px; }
.article-meta { color: var(--text-light); margin-bottom: 16px; }
.article-content { line-height: 1.8; }
.article-content h2, .article-content h3 { margin: 32px 0 16px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }

/* FAQ */
.faq { margin: 40px 0; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; }
.faq summary { padding: 20px; cursor: pointer; font-weight: 600; background: var(--bg-light); border-radius: var(--radius); }
.faq summary:hover { background: var(--border); }
.faq-content { padding: 20px; }

/* Code */
code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; font-family: 'Monaco', monospace; font-size: 0.9em; }
pre { background: var(--bg-light); padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 16px 0; }
pre code { background: none; padding: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-light); font-weight: 600; }

/* Callouts */
.callout { padding: 20px; border-left: 4px solid var(--primary); background: var(--bg-light); margin: 16px 0; border-radius: var(--radius); }
.callout-warning { border-color: var(--warning); }
.callout-danger { border-color: var(--danger); }
.callout-success { border-color: var(--success); }

/* Footer */
.footer { background: var(--bg-light); padding: 60px 0 20px; border-top: 1px solid var(--border); margin-top: 80px; }
.footer-content { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-bottom: 40px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-light); }

/* Print */
@media print {
  .header, .footer, .nav-toggle, .btn { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}

/* Lazy loading */
img[loading="lazy"] { opacity: 0; transition: opacity 0.3s; }
img[loading="lazy"].loaded { opacity: 1; }
