:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --text: #e0e0e0;
  --text2: #a0a0b0;
  --accent: #7C3AED;
  --accent-light: #A78BFA;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --border: #2a2a3e;
  --success: #10b981;
  --radius: 8px;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #c4b5fd; text-decoration: underline; }
img { max-width:100%; height:auto; border-radius: var(--radius); }
kbd {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; font-size: 13px; font-family: inherit;
}

/* === TOP NAV === */
.topnav {
  position: sticky; top:0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
  height: 56px;
}
.topnav .logo { font-weight: 700; font-size: 18px; color: var(--accent-light); white-space: nowrap; }
.topnav .logo span { color: var(--text2); font-weight: 400; font-size: 13px; margin-left: 8px; }
.topnav ul { list-style:none; display:flex; gap:18px; margin-left: auto; }
.topnav ul li a { color: var(--text2); font-size: 14px; padding: 4px 0; }
.topnav ul li a:hover, .topnav ul li a.active { color: var(--accent-light); text-decoration:none; }
.lang-switch { margin-left: 16px; }
.lang-switch select {
  background: var(--surface2); color: var(--text); border: 1px solid var(--border);
  padding: 4px 8px; border-radius: 4px; font-size: 13px; cursor: pointer;
}
.store-btn {
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  color: #fff; padding: 8px 18px; border-radius: 6px; font-weight: 600;
  font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.store-btn:hover { background: linear-gradient(135deg, #8B5CF6, #6D28D9); color:#fff; text-decoration:none; }

/* === MAIN LAYOUT === */
.main-wrap {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 20px;
}
.left-ad {
  width: 160px; flex-shrink: 0;
  position: sticky; top: 76px; height: calc(100vh - 96px); overflow: hidden;
}
.left-ad .ad-box {
  text-align: center;
  min-height: 600px;
}
.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 76px; height: calc(100vh - 96px); overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar nav a {
  display: block; padding: 10px 16px; margin-bottom: 2px;
  border-radius: 6px; font-size: 14px; color: var(--text2);
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: var(--surface2); color: var(--text); text-decoration:none; }
.sidebar nav a.active {
  background: var(--accent-glow); color: var(--accent-light);
  border-left-color: var(--accent); font-weight: 600;
}
.content {
  flex: 1; min-width: 0;
}
.right-panel {
  width: 240px; flex-shrink: 0;
  position: sticky; top: 76px; height: calc(100vh - 96px); overflow-y: auto;
}
.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* === PAGE CONTENT === */
.page h1 { font-size: 28px; margin-bottom: 8px; color: var(--accent-light); }
.page h2 { font-size: 22px; margin: 32px 0 12px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.page h3 { font-size: 18px; margin: 24px 0 8px; color: var(--accent-light); }
.page p { margin-bottom: 14px; }
.page ul, .page ol { margin: 0 0 16px 24px; }
.page li { margin-bottom: 6px; }
.page .step {
  background: var(--surface2); border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; border-left: 4px solid var(--accent);
}
.page .step-num {
  display: inline-block; background: var(--accent); color: #fff;
  width: 28px; height: 28px; border-radius: 50%; text-align: center;
  line-height: 28px; font-weight: 700; font-size: 14px; margin-right: 10px;
}
.page .screenshot {
  margin: 16px 0; text-align: center;
}
.page .screenshot img {
  border: 1px solid var(--border); max-width: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.page .screenshot .caption {
  font-size: 13px; color: var(--text2); margin-top: 6px; font-style: italic;
}
.page .tip {
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius); padding: 14px 18px; margin: 16px 0;
}
.page .tip::before { content: "\1F4A1 "; }
.page .warn {
  background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius); padding: 14px 18px; margin: 16px 0;
}
.page .warn::before { content: "\26A0\FE0F "; }
.ins-adsbygoogle {
  margin: 20px 0;
}

/* === RELATED APPS === */
.related-title {
  font-size: 14px; font-weight: 600; color: var(--text2);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px;
}
.related-item {
  display: flex; gap: 10px; padding: 10px; margin-bottom: 8px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border); transition: border-color 0.2s;
}
.related-item:hover { border-color: var(--accent); }
.related-item img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; }
.related-item .info h4 { font-size: 13px; color: var(--text); margin-bottom: 2px; }
.related-item .info p { font-size: 11px; color: var(--text2); line-height: 1.4; }

/* === PAGINATION === */
.pagination {
  display: flex; justify-content: center; gap: 8px; margin: 32px 0;
}
.pagination a {
  background: var(--surface2); color: var(--text2); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 14px;
  text-decoration: none; display: inline-block;
}
.pagination a:hover { background: var(--accent-glow); color: var(--accent-light); text-decoration: none; }
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* === FOOTER === */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 24px; text-align: center; color: var(--text2); font-size: 13px;
  margin-top: 40px;
}
.footer a { color: var(--accent-light); margin: 0 12px; }

/* === RESPONSIVE === */
@media (max-width: 1100px) { .left-ad { display:none; } }
@media (max-width: 900px) {
  .sidebar { display:none; }
  .right-panel { display:none; }
  .topnav ul { display:none; }
}
