/* v2rayNG Material-style (light) — match app feel, not VPN marketing dark theme */
:root {
  --bg: #f5f5f5;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #1c1b1f;
  --text-muted: #5f6368;
  --primary: #00897b;
  --primary-dark: #00695c;
  --primary-light: #4db6ac;
  --accent: #ff5722;
  --border: #e0e0e0;
  --divider: #eeeeee;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --container: 960px;
  --font: "Roboto", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

/* App bar */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.header a {
  color: #fff;
}

.header a:hover {
  text-decoration: none;
  opacity: 0.92;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.logo-text {
  font-size: 1.15rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.92rem;
}

.nav a.active {
  border-bottom: 2px solid #fff;
  padding-bottom: 2px;
}

.header-actions .btn {
  background: #fff;
  color: var(--primary-dark);
  border: none;
}

.header-actions .btn:hover {
  background: #e0f2f1;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* Buttons — Material */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.92rem;
  border: 0;
  cursor: pointer;
  text-decoration: none !important;
  transition: box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background: #e0f2f1;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-disabled,
a.btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
}

a.download-card.btn-disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* Hero — app-like, not globe marketing */
.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.hero-desc {
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 36em;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: 20px;
}

.hero-badges li {
  background: #e0f2f1;
  color: var(--primary-dark);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Phone / app mock */
.app-mock {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  max-width: 380px;
  margin-left: auto;
}

.app-mock.desktop-mock {
  border-radius: 8px 8px 4px 4px;
}

.app-mock-bar {
  background: var(--primary);
  color: #fff;
  padding: 10px 12px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.app-mock-list {
  list-style: none;
}

.app-mock-list li {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.app-mock-list li.active {
  background: #e8f5e9;
}

.app-mock-list .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #9e9e9e;
}

.app-mock-list li.active .dot {
  background: #4caf50;
}

.app-mock-fab {
  margin: 12px;
  height: 48px;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

/* Stats as simple chips row */
.stats {
  padding: 20px 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.stat-item strong {
  display: block;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 500;
}

.stat-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Sections */
.section {
  padding: 40px 0;
}

.section-alt {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 500;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.download-grid-main {
  grid-template-columns: repeat(3, 1fr);
}

.download-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.download-card:hover {
  text-decoration: none;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.download-card.featured {
  border-color: var(--primary);
}

.download-card h3 {
  font-weight: 500;
  margin: 8px 0 4px;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.platform-icon {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  background: #e0f2f1;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.75rem;
}

.download-btn-label {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.88rem;
}

.cta {
  background: var(--primary);
  color: #fff;
  padding: 36px 0;
  text-align: center;
}

.cta a {
  color: inherit;
}

.cta-inner h2 {
  font-weight: 500;
  margin-bottom: 8px;
}

.cta-inner p {
  opacity: 0.9;
  margin-bottom: 16px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--primary-dark);
}

.cta .btn-outline {
  border-color: #fff;
  color: #fff;
}

.cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Page content / docs */
.page-content {
  padding: 28px 0 48px;
}

.page-content .container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px 32px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary);
}

.article-body h1 {
  font-size: 1.55rem;
  font-weight: 500;
  margin-bottom: 12px;
  line-height: 1.35;
}

.article-body h2 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 1.4em 0 0.6em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--divider);
}

.article-body p,
.article-body li {
  margin-bottom: 0.75em;
  color: #3c4043;
}

.article-body ul,
.article-body ol {
  padding-left: 1.3em;
  margin-bottom: 1em;
}

.article-body code {
  background: #f1f3f4;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-meta {
  color: var(--text-muted) !important;
  font-size: 0.85rem;
}

.article-cta {
  margin-top: 1.75rem;
  padding: 16px 18px;
  background: #e0f2f1;
  border-radius: var(--radius);
  border: 1px solid #b2dfdb;
}

.article-cta .btn {
  margin: 4px 8px 4px 0;
}

.back-link {
  margin-top: 20px;
  font-size: 0.9rem;
}

/* Download page bits */
.download-smart {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.download-smart a {
  color: inherit;
}

.download-smart .btn {
  background: #fff;
  color: var(--primary-dark);
  margin-top: 4px;
}

.download-smart-label {
  margin-bottom: 10px;
  font-weight: 500;
}

.download-smart-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  opacity: 0.9;
}

.download-hero h1 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.download-lead {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.download-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: 20px;
}

.download-badges li {
  background: #e0f2f1;
  color: var(--primary-dark);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 16px;
}

.download-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.download-step {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.download-step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.download-step p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

.download-section-title {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 8px 0 14px;
}

.download-help {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--divider);
}

.download-help h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.download-help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.download-help-grid a {
  color: var(--primary-dark);
}

.download-cta-bar {
  margin-top: 24px;
  text-align: center;
  padding: 18px;
  background: #fafafa;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.download-cta-bar .btn {
  margin: 4px;
}

.download-card.recommended {
  outline: 2px solid var(--primary);
}

/* Blog list */
.blog-list {
  list-style: none;
}

.blog-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}

.blog-item a strong {
  color: var(--primary-dark);
  font-weight: 500;
}

.blog-date {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0;
}

.blog-index-cta {
  margin-top: 20px;
}

/* FAQ */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 500;
}

.faq-item p {
  margin-top: 8px;
  color: var(--text-muted);
}

.faq-list {
  margin-top: 8px;
}

/* Footer */
.footer {
  background: #263238;
  color: #cfd8dc;
  padding: 36px 0 20px;
  margin-top: 0;
  font-size: 0.9rem;
}

.footer a {
  color: #b2dfdb;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col strong {
  color: #fff;
  margin-bottom: 4px;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  font-size: 0.82rem;
  opacity: 0.85;
}

.error-page {
  min-height: 50vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
}

/* Mobile */
@media (max-width: 800px) {
  .nav-toggle {
    display: flex;
  }

  .nav,
  .header-actions {
    display: none;
  }

  .header-inner.nav-open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 56px;
    background: var(--primary-dark);
    padding: 12px 16px 16px;
    gap: 10px;
  }

  .header-inner.nav-open .header-actions {
    display: block;
    position: absolute;
    right: 16px;
    top: 64px;
    z-index: 2;
  }

  .hero-grid,
  .feature-grid,
  .download-grid,
  .download-grid-main,
  .download-steps,
  .download-help-grid,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .app-mock {
    margin: 0 auto;
  }

  .page-content .container {
    padding: 18px 16px 24px;
  }
}
