/* ==========================================================================
   CMBET OFFICIAL WIKI - DESIGN SYSTEM & STYLESHEET
   Brand Color Harmony: Matched directly with logo.webp 
   ("CM" Deep Navy #002F9A -> "Bet" Vibrant Azure #1B9FE3 -> Light Cyan #58D3FE)
   Path: assets/css/styles.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;700;800&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & LOGO-MATCHED COLOR PALETTE
   -------------------------------------------------------------------------- */
:root {
  /* Brand Colors Extracted Directly from logo.webp */
  --logo-navy: #002f9a;       /* Deep Navy from "CM" text & dark emblem curve */
  --logo-royal: #0038b8;      /* Royal Blue transition shade */
  --logo-azure: #1b9fe3;      /* Bright Azure Blue from "Bet" text */
  --logo-cyan: #58d3fe;       /* Light Ice Cyan from top emblem wave */

  /* Dark Theme Surfaces */
  --bg-dark: #040812;
  --bg-surface: #0a1124;
  --bg-card: rgba(10, 17, 36, 0.85);
  --bg-card-hover: rgba(18, 30, 61, 0.9);
  
  /* Borders & Glow Effects */
  --border-color: rgba(27, 159, 227, 0.25);
  --border-glow: rgba(88, 211, 254, 0.5);
  --neon-glow: rgba(27, 159, 227, 0.45);

  /* Primary Brand Utilities */
  --primary-blue: var(--logo-royal);
  --bright-blue: var(--logo-azure);
  --cyan-accent: var(--logo-cyan);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Status Colors */
  --success-green: #10b981;
  --warning-amber: #f59e0b;

  /* Typography */
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shape Tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* FX & Elevation */
  --shadow-blue: 0 8px 32px rgba(0, 47, 154, 0.35);
  --glass-backdrop: blur(12px);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESET & BASE STYLES
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 47, 154, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(27, 159, 227, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(88, 211, 254, 0.12) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: var(--cyan-accent);
  transition: color 0.2s ease;
  word-break: break-word;
}

a:hover {
  color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
}

code, pre {
  word-break: break-all;
  white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   3. NAVBAR & STICKY HEADER COMPONENT
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4, 8, 18, 0.92);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  width: 100%;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.logo-img {
  max-height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 12px var(--neon-glow));
}

.wiki-tag {
  font-size: 0.7rem;
  background: rgba(27, 159, 227, 0.18);
  color: var(--logo-cyan);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.nav-link:hover, 
.nav-link.active {
  color: #ffffff;
  background: rgba(27, 159, 227, 0.18);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--logo-navy) 0%, var(--logo-azure) 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-blue);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(88, 211, 254, 0.3);
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.88rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(27, 159, 227, 0.45);
  background: linear-gradient(135deg, var(--logo-royal) 0%, var(--logo-cyan) 100%);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(10, 17, 36, 0.85);
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.88rem;
}

.btn-secondary:hover {
  background: rgba(27, 159, 227, 0.2);
  border-color: var(--logo-cyan);
  color: #ffffff;
}

.mobile-toggle {
  display: none;
  background: rgba(27, 159, 227, 0.12);
  border: 1px solid var(--border-color);
  color: var(--logo-cyan);
  font-size: 1.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.mobile-toggle:hover {
  background: rgba(27, 159, 227, 0.25);
  color: #ffffff;
  border-color: var(--logo-cyan);
}

/* --------------------------------------------------------------------------
   4. HERO SECTION & LIVE SEARCH BAR
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 3rem 1.5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.hero-card {
  background: linear-gradient(135deg, rgba(10, 17, 36, 0.95), rgba(0, 47, 154, 0.35));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: var(--glass-backdrop);
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--neon-glow) 0%, transparent 70%);
  pointer-events: none;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.dot-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--success-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-green);
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, #ffffff 30%, var(--logo-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  max-width: 650px;
  margin-top: 1rem;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  background: rgba(4, 8, 18, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--logo-cyan);
  box-shadow: 0 0 20px rgba(27, 159, 227, 0.35);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--logo-cyan);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   5. MAIN LAYOUT GRID & ARTICLE CONTENT
   -------------------------------------------------------------------------- */
.main-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  width: 100%;
}

.wiki-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: var(--glass-backdrop);
  width: 100%;
  overflow: hidden;
}

.toc-box {
  background: rgba(4, 8, 18, 0.65);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--logo-azure);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--logo-cyan);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: var(--logo-cyan);
  text-decoration: underline;
}

.article-section {
  margin-bottom: 2.5rem;
  width: 100%;
  overflow-wrap: break-word;
}

.article-section h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  word-break: break-word;
}

.article-section h2 svg {
  color: var(--logo-azure);
  flex-shrink: 0;
}

.article-section h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--logo-cyan);
  margin: 1.5rem 0 0.8rem;
}

.article-section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.02rem;
}

.article-section ul, 
.article-section ol {
  margin: 0.5rem 0 1.2rem 1.5rem;
  color: var(--text-muted);
}

.article-section li {
  margin-bottom: 0.5rem;
}

.highlight-box {
  background: rgba(0, 47, 154, 0.18);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   6. SIDEBAR INFOBOX COMPONENT
   -------------------------------------------------------------------------- */
.wiki-infobox {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  height: fit-content;
  backdrop-filter: var(--glass-backdrop);
  position: sticky;
  top: 90px;
  width: 100%;
}

.infobox-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--logo-navy);
  margin-bottom: 1.2rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.infobox-image {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 1.2rem;
  background: rgba(4, 8, 18, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  text-align: center;
}

.infobox-logo-img {
  max-width: 180px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 10px var(--logo-azure));
}

.infobox-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.infobox-table th, 
.infobox-table td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  word-break: break-word;
}

.infobox-table th {
  color: var(--text-muted);
  font-weight: 600;
  width: 40%;
}

.infobox-table td {
  color: var(--text-main);
  font-weight: 600;
}

.status-badge-green {
  display: inline-block;
  color: var(--success-green);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   7. CARDS, CTA BOXES, & LATENCY PING TABLE
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
  width: 100%;
}

.card-feature {
  background: rgba(4, 8, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card-feature:hover {
  border-color: var(--logo-azure);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 47, 154, 0.25);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(0, 47, 154, 0.3), rgba(27, 159, 227, 0.3));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--logo-cyan);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.cta-box {
  background: linear-gradient(135deg, rgba(0, 47, 154, 0.45), rgba(10, 17, 36, 0.95));
  border: 1px solid var(--logo-azure);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

/* Responsively Scrollable Ping Table Wrapper */
.table-responsive {
  width: 100%;
  margin: 1.5rem 0;
}

.ping-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(4, 8, 18, 0.6);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.ping-table th, 
.ping-table td {
  padding: 0.9rem;
  text-align: left;
}

.ping-table th {
  background: rgba(10, 17, 36, 0.9);
  color: var(--logo-cyan);
  font-family: var(--font-heading);
  font-weight: 700;
  white-space: nowrap;
}

.ping-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ping-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ping-ms {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-green);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   8. FAQ ACCORDION COMPONENT
   -------------------------------------------------------------------------- */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.2rem;
  width: 100%;
}

.faq-item {
  background: rgba(4, 8, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: var(--logo-azure);
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 0.8rem;
}

.faq-toggle {
  color: var(--logo-cyan);
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 1rem 1.2rem 1.2rem;
}

/* --------------------------------------------------------------------------
   9. FOOTER COMPONENT
   -------------------------------------------------------------------------- */
.footer {
  background: rgba(3, 6, 14, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
  width: 100%;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.8rem;
  max-width: 360px;
}

.footer-logo-img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 8px var(--neon-glow));
}

.footer-col h4 {
  font-family: var(--font-heading);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--logo-cyan);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  width: 100%;
}

/* --------------------------------------------------------------------------
   10. COMPREHENSIVE RESPONSIVE MEDIA QUERIES & TABLET HEADER OPTIMIZATION
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .navbar {
    padding: 0.65rem 1rem;
  }

  .logo-img {
    max-height: 34px;
  }

  .wiki-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  /* Right-align CTA Buttons next to Hamburger Toggle on Tablet & Mobile (< 1080px) */
  .nav-cta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(6, 11, 24, 0.98);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    padding: 1.2rem 1.2rem;
    gap: 0.5rem;
    align-items: stretch;
  }

  .nav-links.show {
    display: flex;
    animation: fadeInDown 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  /* Hamburger Menu Links Custom Tablet & Mobile Hover & Focus Animation */
  .nav-links .nav-link {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    display: block;
    width: 100%;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links .nav-link:hover,
  .nav-links .nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(27, 159, 227, 0.22) 0%, rgba(0, 47, 154, 0.15) 100%);
    border-color: rgba(27, 159, 227, 0.3);
    border-left: 4px solid var(--logo-cyan);
    transform: translateX(6px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-cta .btn-primary,
  .nav-cta .btn-secondary {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
  }

  .main-layout {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.5rem;
  }
  
  .wiki-infobox {
    position: static;
    order: -1;
    width: 100%;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 1.5rem 1rem 1rem;
  }

  .hero-card {
    padding: 1.6rem 1.2rem;
    border-radius: var(--radius-md);
  }

  .hero-title {
    font-size: 1.7rem;
    line-height: 1.3;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .main-layout {
    padding: 1rem 0.75rem;
  }

  .wiki-content {
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-md);
  }

  .article-section h2 {
    font-size: 1.45rem;
  }

  .article-section h3 {
    font-size: 1.15rem;
  }

  .article-section p, 
  .article-section li {
    font-size: 0.95rem;
  }

  .toc-box {
    padding: 1rem 1.2rem;
  }

  .cta-box {
    padding: 1.5rem 1.2rem;
    border-radius: var(--radius-md);
  }

  .cta-box h2 {
    font-size: 1.35rem !important;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .footer {
    padding: 2.5rem 1rem 1.2rem;
    margin-top: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   MOBILE CARDS TRANSFORM FOR PING LATENCY TABLE (< 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wiki-tag {
    display: none;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  /* Transform ping latency table into modern card list on mobile screens */
  .table-responsive {
    overflow-x: visible;
  }

  .ping-table, 
  .ping-table tbody, 
  .ping-table tr, 
  .ping-table td {
    display: block;
    width: 100%;
  }

  .ping-table thead {
    display: none;
  }

  .ping-table tr {
    background: rgba(10, 17, 36, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  }

  .ping-table tr:not(:last-child) td {
    border-bottom: none;
  }

  .ping-table td {
    padding: 0.4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .ping-table td:first-child {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: block;
  }

  .ping-table td:last-child {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: block;
  }

  .ping-table td:last-child a {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.55rem 0.75rem;
  }

  .nav-container {
    gap: 0.35rem;
  }

  .nav-cta {
    margin-left: auto;
    gap: 0.35rem;
  }

  .nav-cta .btn-secondary {
    display: none;
  }

  .nav-cta .btn-primary {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .badge-live {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
  }

  .wiki-content {
    padding: 1.25rem 0.9rem;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, 
  .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
