:root {
  --primary-color: #6366F1; /* Modern Indigo */
  --primary-hover: #4F46E5;
  --bg-color: #FAFAFA;
  --surface-color: #FFFFFF;
  --text-main: #1E2329;
  --text-muted: #474D57;
  --text-light: #707A8A;
  --border-color: #EAECEF;
  --danger-color: #F6465D;
  --danger-bg: #FFEDEF;
  --success-color: #0ECB81;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
  --radius-md: 12px;
  --radius-lg: 24px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .top-disclaimer-banner,
html[dir="rtl"] .hero-content,
html[dir="rtl"] .article-content,
html[dir="rtl"] .toc,
html[dir="rtl"] .breadcrumbs,
html[dir="rtl"] .footer,
html[dir="rtl"] .risk-warning,
html[dir="rtl"] .author-card,
html[dir="rtl"] .highlight-box,
html[dir="rtl"] .article-subtitle {
  text-align: right;
}

html[dir="rtl"] .logo,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .nav-right,
html[dir="rtl"] .benefit-list li,
html[dir="rtl"] .footer-links,
html[dir="rtl"] .article-footer-nav,
html[dir="rtl"] .author-info p {
  direction: rtl;
}

html[dir="rtl"] .lang-menu {
  right: auto;
  left: 0;
}

/* Top Disclaimer Banner */
.top-disclaimer-banner {
  background-color: #1E2329;
  color: #A0A5AD;
  text-align: center;
  padding: 8px 24px;
  font-size: 12px;
  line-height: 1.4;
}
.top-disclaimer-banner strong {
  color: #FFFFFF;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  background-color: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 24px;
}
.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo svg, .logo img { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  transition: all 0.2s;
}
.lang-btn:hover { background-color: var(--bg-color); }
.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 220px;
  max-height: 360px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 130;
}
.lang-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
}
.lang-menu a:hover { background-color: var(--bg-color); }
.lang-option,
.lang-note {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  white-space: nowrap;
}
.lang-option {
  color: var(--text-main);
}
.lang-option.current {
  font-weight: 600;
  background-color: var(--bg-color);
  cursor: default;
}
.lang-option.disabled {
  color: var(--text-light);
  cursor: not-allowed;
}
.lang-note {
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 12px;
  line-height: 1.5;
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface-color);
  color: var(--text-main);
  cursor: pointer;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* Hero Section */
.hero {
  padding: 80px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-content h1 {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.risk-warning {
  background-color: var(--danger-bg);
  color: var(--danger-color);
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}
.btn-primary svg {
  margin-left: 8px;
}
.btn-primary.inline {
  display: inline-flex;
}

/* Hero Card */
.hero-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 6px;
  background: var(--primary-color);
}
.card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.benefit-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
}
.benefit-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}
.benefit-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Section Titles */
.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 60px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(76, 130, 251, 0.08);
  border: 1px solid rgba(76, 130, 251, 0.18);
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero-subtitle {
  max-width: 640px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(76, 130, 251, 0.32);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* SEO Article Content */
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: start;
}
.toc {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.toc::-webkit-scrollbar {
  width: 4px;
}
.toc::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
.toc h3 {
  font-size: 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}
.toc ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.toc a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: color 0.2s;
  line-height: 1.5;
}
.toc a:hover {
  color: var(--primary-hover);
}
.toc a::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.article-content {
  min-width: 0; /* Prevent grid blowout */
}
.article-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}
.article-content h2:not(:first-child) {
  margin-top: 60px;
}
.article-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text-main);
}
.article-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.article-content ul, .article-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-muted);
  line-height: 1.8;
}
.article-content li {
  margin-bottom: 12px;
}
.article-content strong {
  color: var(--text-main);
}

.highlight-box {
  background: rgba(99, 102, 241, 0.08);
  border-left: 4px solid var(--primary-color);
  padding: 24px;
  margin: 32px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.highlight-box h4 {
  margin-bottom: 8px;
  font-size: 18px;
  color: #4338ca;
}
.highlight-box.alt-theme {
  background: rgba(99, 102, 241, 0.05);
  border-left-color: var(--primary-hover);
}
.highlight-box.alt-theme h4 {
  color: var(--primary-hover);
}
.highlight-box.alt-theme p {
  margin-bottom: 0;
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
}

.stats-card {
  width: 100%;
  max-width: 500px;
}

.stats-card h3 {
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 20px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
}

.feature-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.feature-list li::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px rgba(76, 130, 251, 0.12);
}

.card-note {
  margin-top: 20px;
  color: var(--text-light);
  font-size: 14px;
}

.features,
.content-section {
  padding: 88px 0;
}

.features {
  background: linear-gradient(180deg, #FAFAFA 0%, #F4F7FB 100%);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 48px;
}

.features-grid,
.locale-grid,
.home-grid,
.trust-grid {
  display: grid;
  gap: 24px;
}

.features-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.locale-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .nav-links {
    gap: 24px;
  }

  .lang-btn {
    padding: 8px 14px;
  }

  .locale-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-section.alt-surface {
  background: var(--surface-color);
}

.feature-card,
.home-card,
.trust-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.feature-card h3,
.home-card h3,
.trust-card h3 {
  font-size: 22px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.feature-card p,
.home-card p,
.trust-card p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(76, 130, 251, 0.1);
  color: var(--primary-hover);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* Links */
.link-external {
  display: inline-block;
  margin: 8px 0 16px;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
}
.link-internal {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: underline;
}

/* Author Card */
.author-card {
  background: var(--bg-color);
  padding: 32px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 24px;
  border: 1px solid var(--border-color);
}
.author-avatar {
  width: 64px;
  height: 64px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  flex-shrink: 0;
}
.author-info h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}
.author-info p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.author-info p + p {
  margin-top: 12px;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs span {
  color: var(--text-main);
}

/* Article Headers */
.article-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
}
.article-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.section-note {
  font-size: 14px;
  color: var(--text-light);
  margin-top: -8px;
  margin-bottom: 24px;
}
.article-footer-nav {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.data-table-wrapper {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-color);
  min-width: 600px;
}
.data-table th, .data-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.data-table th {
  background: var(--bg-color);
  font-weight: 600;
  color: var(--text-main);
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* Tutorial Section */
.tutorial { padding: 100px 0; background: var(--surface-color); }
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}
.step-card {
  background: var(--bg-color);
  padding: 32px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.3s;
}
.step-card:hover { transform: translateY(-5px); }
.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  margin: 0 auto 24px;
}
.step-card h3 { margin-bottom: 12px; font-size: 20px; }
.step-card p { color: var(--text-muted); font-size: 14px; }

/* Security Section */
.security { padding: 100px 0; }
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.security-item {
  display: flex;
  gap: 24px;
  background: var(--surface-color);
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.security-item svg { width: 48px; height: 48px; color: var(--success-color); flex-shrink: 0; }
.security-item h3 { margin-bottom: 8px; font-size: 20px; }
.security-item p { color: var(--text-muted); font-size: 14px; }

/* FAQ Section */
.faq { padding: 100px 0; background: var(--surface-color); }
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-list {
  border-top: 1px solid var(--border-color);
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 24px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question svg { transition: transform 0.3s; }
.faq-question.active svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.faq-answer-inner {
  padding-bottom: 24px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Footer */
.footer {
  background: var(--text-main);
  color: var(--surface-color);
  padding: 60px 0 40px;
}
.footer-disclaimer {
  background: rgba(255,255,255,0.05);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  font-size: 14px;
  color: #A0A5AD;
  line-height: 1.8;
}
.footer-disclaimer strong {
  color: #FFFFFF;
  display: block;
  margin-bottom: 8px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: #707A8A;
  font-size: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  color: var(--text-light);
  text-decoration: underline;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 992px) {
  .navbar .container {
    position: relative;
    gap: 12px;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 24px;
    right: 24px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-color);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 0;
    z-index: 120;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 12px 8px;
  }
  .nav-links a + a {
    border-top: 1px solid var(--border-color);
  }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    max-width: 360px;
  }
  .hero-visual {
    justify-content: flex-start;
  }
  .features,
  .content-section {
    padding: 72px 0;
  }
  .features-grid,
  .locale-grid,
  .home-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .toc { position: static; max-height: none; margin-bottom: 40px; }
}
@media (max-width: 768px) {
  .hero-content h1 { font-size: 36px; }
  .section-title { font-size: 30px; }
  .section-subtitle { font-size: 16px; margin-bottom: 40px; }
  .security-grid { grid-template-columns: 1fr; }
  .hero-card,
  .feature-card,
  .home-card,
  .trust-card {
    padding: 24px;
  }
  .article-layout { padding: 40px 20px; }
}
