/* Web Server Comparison Guide — Modern Redesign */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0ea5e9;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-heading: #94a3b8;
  --sidebar-active: #38bdf8;
  --text: #334155;
  --text-light: #64748b;
  --heading: #0f172a;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

/* ── Header ───────────────────────────────────── */
.site-header {
  background: var(--primary);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}
.logo-text {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.logo-accent { color: #93c5fd; }
.logo-tagline {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  font-weight: 400;
  letter-spacing: .2px;
}

/* ── Layout ───────────────────────────────────── */
.layout {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 64px - 72px);
}

/* ── Sidebar ──────────────────────────────────── */
.sidebar {
  width: 230px;
  min-width: 230px;
  background: var(--sidebar-bg);
  padding: 20px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.nav-section { margin-bottom: 4px; }
.nav-section h3 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: var(--sidebar-heading);
  padding: 14px 18px 5px;
}
.nav-section ul { list-style: none; }
.nav-section ul li a {
  display: block;
  padding: 8px 18px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-section ul li a:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-section ul li a.active {
  color: var(--sidebar-active);
  border-left-color: var(--sidebar-active);
  background: rgba(56,189,248,.08);
}

/* ── Main Content ─────────────────────────────── */
.content {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}

/* ── Breadcrumb ───────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: #cbd5e1; }

/* ── Page Hero ────────────────────────────────── */
.page-hero {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}
.page-hero h1 {
  font-size: 25px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 6px;
  line-height: 1.3;
}
.page-hero .subtitle {
  font-size: 15px;
  color: var(--text-light);
}

/* ── Cards ────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.card p {
  color: var(--text);
  font-size: 15px;
  margin-bottom: 12px;
}
.card p:last-child { margin-bottom: 0; }

/* ── Info / Warning Boxes ─────────────────────── */
.info-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.info-box p { color: #1e40af; margin: 0; font-size: 14px; }

.tip-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.tip-box p { color: #166534; margin: 0; font-size: 14px; }

.warning-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.warning-box p { color: #c2410c; margin: 0; font-size: 14px; }

/* ── Home-page grid ───────────────────────────── */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }

.feature-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card h3 { font-size: 15px; font-weight: 600; color: var(--heading); }
.feature-card p { font-size: 13.5px; color: var(--text-light); flex: 1; }
.feature-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  align-self: flex-start;
}
.feature-card a:hover { text-decoration: underline; }

/* Server type badges */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef9c3; color: #854d0e; }

/* ── Link Directory ───────────────────────────── */
.link-list { list-style: none; }
.link-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.link-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.link-item a:hover { text-decoration: underline; }
.link-item .link-desc { color: var(--text-light); font-size: 13.5px; }
.link-item .link-url { color: #94a3b8; font-size: 12px; }

/* Pagination */
.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
  align-items: center;
}
.pagination-label { font-size: 13px; color: var(--text-light); margin-right: 4px; }
.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .15s;
}
.pagination a:hover, .pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Exchange info */
.exchange-info {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.exchange-info h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 14px;
}
.exchange-info p { font-size: 15px; color: var(--text); margin-bottom: 10px; }
.exchange-info ol, .exchange-info ul { padding-left: 20px; }
.exchange-info li { color: var(--text); font-size: 15px; margin-bottom: 5px; }
.exchange-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin-top: 12px;
  background: var(--bg);
  border-radius: 8px;
  padding: 14px;
}
.exchange-info dt { font-weight: 600; color: var(--heading); font-size: 14px; white-space: nowrap; }
.exchange-info dd { color: var(--text); font-size: 14px; }

/* Category tag pills */
.category-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.category-pill {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.category-pill:hover { background: var(--primary-dark); }

/* ── Footer ───────────────────────────────────── */
.site-footer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  line-height: 1.8;
}
.site-footer a { color: var(--sidebar-active); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    min-width: unset;
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 8px 0;
  }
  .nav-section { flex: 1; min-width: 160px; }
  .content { padding: 20px 16px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-hero { padding: 20px; }
  .page-hero h1 { font-size: 20px; }
}
