/* ==========================================================================
   vps.co — VPS Comparison Platform Stylesheet
   ========================================================================== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --ok: #059669;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, .10), 0 20px 48px rgba(15, 23, 42, .10);
  --container: 1180px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); letter-spacing: -.02em; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-size: .95rem; font-weight: 800;
}
.brand:hover { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 13px; border-radius: 8px; color: var(--ink-soft);
  font-weight: 500; font-size: .92rem; transition: .15s;
}
.nav a:hover, .nav a.active { background: #eef2ff; color: var(--primary); }
.header-cta {
  padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: .9rem;
  background: var(--primary); color: #fff; border: none; transition: .15s;
}
.header-cta:hover { background: var(--primary-dark); color: #fff; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--ink); padding: 6px 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 400px at 80% -10%, rgba(6, 182, 212, .14), transparent 60%),
    radial-gradient(900px 400px at 10% 0%, rgba(37, 99, 235, .12), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg));
  padding: 88px 0 72px; text-align: center;
}
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 760px; margin: 18px auto 0; color: var(--muted); font-size: 1.06rem; }
.hero-providers { margin-top: 14px; color: var(--muted); font-size: .85rem; }
.hero-providers strong { color: var(--ink-soft); font-weight: 600; }

/* Search box */
.search-wrap { max-width: 620px; margin: 34px auto 0; position: relative; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 6px 6px 6px 18px; box-shadow: var(--shadow-lg);
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box svg { flex: none; color: var(--muted); }
.search-box input { flex: 1; border: none; outline: none; font-size: 1rem; font-family: inherit; color: var(--ink); background: transparent; min-width: 0; }
.search-box input::placeholder { color: #94a3b8; }
.search-btn {
  flex: none; border: none; background: var(--primary); color: #fff;
  font-weight: 600; font-size: .92rem; padding: 11px 22px; border-radius: 10px; transition: .15s;
}
.search-btn:hover { background: var(--primary-dark); }
.search-suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; display: none; z-index: 50;
}
.search-suggest.show { display: block; }
.suggest-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 16px; color: var(--ink-soft); cursor: pointer; font-size: .95rem;
}
.suggest-item:hover { background: #eef2ff; color: var(--primary); }
.suggest-item .price { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.suggest-item:hover .price { color: var(--primary); }
.search-hint { margin-top: 10px; font-size: .8rem; color: var(--muted); }

/* Trust badges */
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  box-shadow: var(--shadow);
}
.trust-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section.tinted { background: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 6px; font-size: .98rem; max-width: 640px; }
.section-more { font-weight: 600; font-size: .92rem; white-space: nowrap; }

/* Location cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.loc-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
  transition: .18s; position: relative; overflow: hidden;
}
.loc-card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0; transition: .18s;
}
.loc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; color: inherit; }
.loc-card:hover::after { opacity: 1; }
.loc-flag { font-size: 1.5rem; line-height: 1; }
.loc-name { font-weight: 700; font-size: 1.05rem; margin-top: 10px; color: var(--ink); }
.loc-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: #eef2ff; color: var(--primary); border: 1px solid #dbe4ff;
}
.tag.neutral { background: #f1f5f9; color: var(--muted); border-color: var(--line); }
.loc-price { margin-top: 12px; font-size: .86rem; color: var(--muted); }
.loc-price strong { color: var(--primary); font-size: 1rem; }
.footnote { margin-top: 22px; font-size: .8rem; color: var(--muted); max-width: 820px; }

/* ---------- Category cards (special VPS types) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.cat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; gap: 12px;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.cat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #e0f7fe); font-size: 1.3rem;
}
.cat-title { font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.cat-desc { color: var(--muted); font-size: .92rem; flex: 1; }
.cat-link { font-weight: 600; font-size: .9rem; }
.cat-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; width: fit-content;
}

/* ---------- Region tiles ---------- */
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.region-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); transition: .18s;
}
.region-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.region-name { font-weight: 700; font-size: 1.1rem; color: var(--ink); display: flex; align-items: center; justify-content: space-between; }
.region-count { font-size: .8rem; font-weight: 700; color: var(--primary); background: #eef2ff; padding: 3px 10px; border-radius: 999px; border: 1px solid #dbe4ff; }
.region-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.region-link { font-weight: 600; font-size: .9rem; margin-top: 6px; }

/* ---------- AI helper banner ---------- */
.ai-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(120deg, #0f172a, #1e3a8a 60%, #0e7490);
  border-radius: 18px; padding: 34px 38px; color: #fff;
  box-shadow: var(--shadow-lg); flex-wrap: wrap;
}
.ai-banner h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.ai-banner p { color: #cbd5e1; font-size: .95rem; margin-top: 6px; max-width: 520px; }
.ai-btn {
  border: none; background: #fff; color: var(--primary); font-weight: 700;
  padding: 12px 24px; border-radius: 11px; font-size: .95rem; transition: .15s; white-space: nowrap;
}
.ai-btn:hover { background: #e0f2fe; }

/* ---------- Compare table ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font-weight: 600; font-size: .84rem; padding: 8px 16px; border-radius: 999px; transition: .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.compare-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.compare { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 780px; }
table.compare th, table.compare td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.compare th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
table.compare tr:last-child td { border-bottom: none; }
table.compare tr:hover td { background: #f8fafc; }
.plan-name { font-weight: 700; color: var(--ink); }
.plan-price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.buy-btn {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 600;
  font-size: .82rem; padding: 7px 15px; border-radius: 8px; transition: .15s; white-space: nowrap;
}
.buy-btn:hover { background: var(--primary-dark); color: #fff; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 17px 20px; font-weight: 600; font-size: .98rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}

/* ---------- Prose (guide/about pages) ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.prose .lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 30px; }
.prose h2 { font-size: 1.35rem; font-weight: 800; margin: 36px 0 14px; letter-spacing: -.01em; }
.prose h3 { font-size: 1.08rem; font-weight: 700; margin: 26px 0 10px; }
.prose p { color: var(--ink-soft); margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--ink-soft); }
.prose li { list-style: disc; margin-bottom: 8px; }
.prose ol li { list-style: decimal; }
.prose code { background: #eef2f7; border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; font-size: .86em; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 18px 0; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: #f8fafc; font-weight: 700; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.note-box {
  background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid var(--primary);
  border-radius: 10px; padding: 16px 18px; font-size: .92rem; color: #1e40af; margin: 20px 0;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, #fff, var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; }
.page-hero p { color: var(--muted); margin-top: 10px; max-width: 720px; font-size: 1.02rem; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: 60px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 36px;
  padding: 56px 0 40px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 14px; }
.footer-about { font-size: .88rem; line-height: 1.7; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #94a3b8; font-size: .88rem; transition: .15s; }
.footer-col a:hover { color: #60a5fa; }
.footer-legal {
  border-top: 1px solid #1e293b; padding: 22px 0; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 12px; font-size: .8rem;
}
.footer-legal .links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-legal a { color: #94a3b8; }
.footer-legal a:hover { color: #60a5fa; }

/* ---------- Disclaimer strip ---------- */
.disclaimer {
  background: #f1f5f9; border-top: 1px solid var(--line); padding: 26px 0; font-size: .78rem; color: var(--muted);
}
.disclaimer .container { display: grid; gap: 10px; }
.disclaimer strong { color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 18px; border-bottom: 1px solid var(--line); gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .ai-banner { padding: 26px 24px; }
}
@media (max-width: 560px) {
  .hero { padding: 56px 0 48px; }
  .search-btn { padding: 11px 14px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .loc-card { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.faq-q .chev { color: var(--muted); transition: transform .2s; font-size: .8rem; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--muted); font-size: .93rem; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 20px 18px; }