/* ========================================================
   FEIYUE (飞跃) BENTO GRID DESIGN SYSTEM
   Theme: Modern Tactile Bento Grid / 现代便当盒网格
   Palette: #F2F2EE (Bg), #FFFFFF (Card), #141412 (Text), #70706A (Muted), #C6F24E (Lime)
======================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Sora:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-page: #F2F2EE;
  --bg-card: #FFFFFF;
  --border-card: #E6E6DE;
  --text-main: #141412;
  --text-muted: #70706A;
  --accent-lime: #C6F24E;
  --dark-tile: #141412;
  --font-display: 'Sora', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Sora', 'Noto Sans SC', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Bento Tile Card Baseline */
.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
  perspective: 900px;
  transform-style: preserve-3d;
}

/* Cursor Following Spotlight Glow */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  background: radial-gradient(
    400px circle at var(--mx, -500px) var(--my, -500px),
    rgba(198, 242, 78, 0.12),
    transparent 80%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.bento-card:hover::before {
  opacity: 1;
}

/* Dark Master Tile */
.bento-dark-tile {
  background: var(--dark-tile);
  color: #FFFFFF;
  border-color: #262624;
}

.bento-dark-tile::before {
  background: radial-gradient(
    500px circle at var(--mx, -500px) var(--my, -500px),
    rgba(198, 242, 78, 0.18),
    transparent 75%
  );
}

/* Lime Badge */
.lime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--accent-lime);
  color: #141412;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Lime Capsule Button */
.btn-lime-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  background: var(--accent-lime);
  color: #141412;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-lime-capsule:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(198, 242, 78, 0.4);
}

/* Secondary Button */
.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid #D6D6CE;
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-outline-pill:hover {
  background: #EAEAE4;
  border-color: #BEBEB6;
}

/* Dot Matrix Map Background */
.dot-matrix-map {
  background-image: radial-gradient(#CBD5E1 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}

/* Pulsing Ping Dot */
.pulsing-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-lime);
}

.pulsing-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-lime);
  opacity: 0.75;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Latency Comparison Bars */
.bar-track {
  height: 10px;
  border-radius: 9999px;
  background: #EAEAE4;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 9999px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Article Styling for Bento Theme */
.bento-article-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.bento-article-content {
  color: #2E2E2A;
  font-size: 16px;
  line-height: 1.85;
}

.bento-article-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-card);
}

.bento-article-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-main);
  margin: 26px 0 12px;
}

.bento-article-content p {
  margin-bottom: 20px;
}

.bento-article-content ul, .bento-article-content ol {
  margin-left: 24px;
  margin-bottom: 22px;
}

.bento-article-content li {
  margin-bottom: 8px;
}

.bento-article-content pre {
  background: #141412;
  color: #E2E8F0;
  padding: 18px;
  border-radius: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  margin-bottom: 24px;
}

.bento-article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 26px 0;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-card);
}

.bento-article-content th, .bento-article-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-card);
}

.bento-article-content th {
  background: #EAEAE4;
  font-weight: 700;
  text-align: left;
}

.bento-article-content tr:last-child td {
  border-bottom: none;
}

@media (prefers-reduced-motion: reduce) {
  .bento-card {
    transition: none !important;
    transform: none !important;
  }
  .pulsing-dot::after {
    animation: none !important;
  }
}
