/* ============================================================
   PEPE NUÔI THÂN — DESIGN SYSTEM & STYLESHEET
   Aesthetic: Clean Indie-Hacker Terminal / Modern Developer UI
   Anti-AI-Slop: Minimal, Purposeful Color Palette, High Visual Hierarchy
   ============================================================ */

:root {
  /* Surface colors — Refined Slate & Obsidian */
  --bg: #0b0f19;
  --bg-secondary: #111827;
  --card: #131d2e;
  --card-hover: #17243a;
  --card-subtle: #0f1624;
  --line: #1e2d42;
  --line-subtle: rgba(255, 255, 255, 0.07);
  --line-strong: #2a3d58;

  /* Typography Colors */
  --txt: #f1f5f9;
  --txt-secondary: #94a3b8;
  --muted: #64748b;
  --muted-subtle: #475569;

  /* Signature Brand Accent — Refined Emerald (Used with Purpose & Restraint) */
  --pepe: #10b981;
  --pepe-hover: #059669;
  --pepe-light: #34d399;
  --pepe-dark: #047857;
  --pepe-glow: rgba(16, 185, 129, 0.14);
  --pepe-subtle: rgba(16, 185, 129, 0.08);
  --pepe-contrast: #052e16;

  /* Purposeful Accent Accents (For status, badges, or specific tags) */
  --amber: #f59e0b;
  --amber-subtle: rgba(245, 158, 11, 0.1);
  --rose: #f43f5e;
  --rose-subtle: rgba(244, 63, 94, 0.1);
  --cyan: #06b6d4;
  --cyan-subtle: rgba(6, 182, 212, 0.1);
  --blue: #3b82f6;

  /* Neutral Controls & Chips */
  --chip: #192437;
  --chip-hover: #22314a;

  /* Modern Subtle Elevation & Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.25);
  --shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.35), 0 2px 6px -2px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.45), 0 4px 10px -2px rgba(0, 0, 0, 0.3);

  /* Geometry & Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Transitions */
  --trans: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme — Clean Paper / Slate */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --card-subtle: #f1f5f9;
  --line: #e2e8f0;
  --line-subtle: rgba(0, 0, 0, 0.05);
  --line-strong: #cbd5e1;

  --txt: #0f172a;
  --txt-secondary: #475569;
  --muted: #64748b;
  --muted-subtle: #94a3b8;

  --pepe: #059669;
  --pepe-hover: #047857;
  --pepe-light: #10b981;
  --pepe-dark: #064e3b;
  --pepe-glow: rgba(5, 150, 105, 0.12);
  --pepe-subtle: rgba(5, 150, 105, 0.07);
  --pepe-contrast: #ffffff;

  --amber: #d97706;
  --amber-subtle: rgba(217, 119, 6, 0.1);
  --rose: #e11d48;
  --rose-subtle: rgba(225, 29, 72, 0.1);
  --cyan: #0891b2;
  --cyan-subtle: rgba(8, 145, 178, 0.1);
  --blue: #2563eb;

  --chip: #e2e8f0;
  --chip-hover: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.09), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--trans), color var(--trans);
}

/* Accessibility Focus Ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--pepe);
  outline-offset: 2px;
}

/* Container */
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ============================================================
   TOP NAVIGATION BAR (Site Header)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--trans), border-color var(--trans);
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.88);
}

.nav-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--txt);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  transition: opacity var(--trans);
}

.nav-brand:hover {
  opacity: 0.85;
}

.nav-brand .nav-logo {
  font-size: 20px;
  line-height: 1;
}

.nav-brand .nav-status-dot {
  width: 7px;
  height: 7px;
  background: var(--pepe);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--pepe);
  animation: pulseDot 2s infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  color: var(--txt-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--trans), background var(--trans);
}

.nav-link:hover {
  color: var(--txt);
  background: var(--chip);
}

.nav-link.active {
  color: var(--pepe);
  background: var(--pepe-subtle);
  font-weight: 600;
}

.nav-link.nav-highlight {
  color: var(--pepe);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Theme Switcher Button */
.theme-btn {
  background: var(--chip);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--trans), border-color var(--trans), transform var(--trans);
}

.theme-btn:hover {
  background: var(--chip-hover);
  border-color: var(--line-strong);
}

/* ============================================================
   TYPOGRAPHY & HEADINGS
   ============================================================ */
h1 {
  font-size: clamp(26px, 4.8vw, 36px);
  line-height: 1.2;
  font-weight: 800;
  margin: 18px 0 12px;
  letter-spacing: -0.025em;
  color: var(--txt);
}

h1 .hl {
  color: var(--pepe);
  background: transparent;
  padding: 0;
  font-weight: 800;
  border-bottom: 2px solid var(--pepe);
}

h2 {
  font-size: clamp(20px, 3.5vw, 24px);
  font-weight: 700;
  margin: 36px 0 8px;
  letter-spacing: -0.015em;
  color: var(--txt);
  display: flex;
  align-items: center;
  gap: 8px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt);
  letter-spacing: -0.01em;
}

.sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.intro {
  font-size: 15.5px;
  color: var(--txt-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.intro b {
  color: var(--txt);
  font-weight: 600;
  background: transparent;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 1px;
}

/* Badges & Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--pepe-subtle);
  color: var(--pepe);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.tag-hot {
  background: var(--rose-subtle);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.25);
}

.tag-yellow {
  background: var(--amber-subtle);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.25);
}

/* ============================================================
   MASCOT TERMINAL CARD & HERO
   ============================================================ */
.robot-card {
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow);
  transition: border-color var(--trans);
}

.robot-card:hover {
  border-color: var(--line-strong);
}

.screen-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--chip);
  color: var(--txt-secondary);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
  font-family: ui-monospace, Menlo, monospace;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.robot-card-top {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.mascot-container {
  position: relative;
  width: 140px;
  height: 140px;
  cursor: pointer;
  transition: transform var(--trans);
  flex-shrink: 0;
}

.mascot-container:hover {
  transform: translateY(-2px);
}

.mascot {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background: #080d16;
  box-shadow: var(--shadow-sm);
}

/* Mascot SVG Keyframe Animations */
.mascot-bob {
  animation: mascotBob 3.6s ease-in-out infinite;
}
@keyframes mascotBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.mascot-blink {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotBlink 4.5s infinite;
}
@keyframes mascotBlink {
  0%, 90%, 100% { transform: scaleY(1); }
  93%, 97% { transform: scaleY(0.08); }
}

.mascot-wave {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotWave 2.4s ease-in-out infinite;
}
@keyframes mascotWave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(-6deg); }
}

.mascot-twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotTwinkle 2.8s ease-in-out infinite;
}
@keyframes mascotTwinkle {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Mascot Actions Column (Clean Hierarchy: Primary, Secondary, Tertiary) */
.mascot-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-width: 240px;
}

.btn-mascot-action {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
  text-decoration: none;
  transition: all var(--trans);
  border: 1px solid transparent;
}

.btn-mascot-action span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
  opacity: 0.85;
}

/* Primary Hero Highlight Action (BÁN THÂN PEPE) */
.btn-mascot-action.btn-pepe {
  background: var(--pepe);
  color: var(--pepe-contrast);
  border-color: var(--pepe-hover);
  box-shadow: 0 2px 8px var(--pepe-glow);
}
.btn-mascot-action.btn-pepe:hover {
  background: var(--pepe-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--pepe-glow);
}

/* Secondary Action (Chat Tâm Sự) — Clean Solid Card */
.btn-mascot-action.btn-pink {
  background: var(--chip);
  color: var(--txt);
  border-color: var(--line);
}
.btn-mascot-action.btn-pink:hover {
  background: var(--chip-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.btn-mascot-action.btn-pink span {
  color: var(--txt-secondary);
}

/* Tertiary Action (Donate / Nuôi Pepe) — Clean Subtle Border */
.btn-mascot-action.btn-yellow {
  background: transparent;
  color: var(--txt-secondary);
  border-color: var(--line);
}
.btn-mascot-action.btn-yellow:hover {
  background: var(--chip);
  color: var(--txt);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.btn-mascot-action.btn-yellow span {
  color: var(--muted);
}

/* Speech Bubble for Pepe */
#pepeSpeechBubble,
.pepe-speech-bubble {
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--card);
  color: var(--txt);
  border: 1.5px solid var(--pepe);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  width: max-content;
  max-width: min(260px, 80vw);
  box-shadow: var(--shadow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 40;
}

#pepeSpeechBubble::after,
.pepe-speech-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--pepe) transparent transparent transparent;
}

#pepeSpeechBubble.visible,
.pepe-speech-bubble.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Ticker & Status Pill */
.ticker {
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--txt-secondary);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pepe-subtle);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--pepe);
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 10px;
}

/* Status Bar */
.statusbar {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13px;
  color: var(--txt-secondary);
}

.statusbar .dot {
  width: 8px;
  height: 8px;
  background: var(--pepe);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--pepe);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.viewers {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.viewers b {
  color: var(--txt);
  font-weight: 600;
}

/* ============================================================
   FINANCIAL STATS DASHBOARD (Highlight Focus)
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  transition: border-color var(--trans), transform var(--trans);
}

.stat:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.stat .k {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat .v {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  color: var(--txt);
  margin: 6px 0 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  word-break: break-word;
}

.stat .n {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Focus Highlight: Current Balance (Prominent & Clean) */
.stat.balance-stat {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.03));
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 12px var(--pepe-subtle);
}

.stat.balance-stat .k {
  color: var(--pepe);
  font-weight: 700;
}

.stat.balance-stat .v {
  color: var(--txt);
  font-size: clamp(28px, 4.2vw, 36px);
  font-weight: 800;
}

.stat.balance-stat .n {
  color: var(--txt-secondary);
  font-size: 12.5px;
}

/* Focus Highlight: Real Revenue */
.stat.hero-stat {
  border-color: rgba(16, 185, 129, 0.25);
  background: var(--card);
}

.stat.hero-stat .v {
  color: var(--pepe);
}

.stat.hot {
  border-color: rgba(244, 63, 94, 0.2);
}

.stat.hot .v {
  color: var(--rose);
}

/* ============================================================
   SURVIVAL THERMOMETER & METHOD BOXES
   ============================================================ */
.method {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
}

.thermo-bar {
  position: relative;
  height: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 10px;
}

.thermo-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--pepe), #059669);
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.thermo-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  font-family: ui-monospace, Menlo, monospace;
}

.thermo-ticks span {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.thermo-ticks .tick-label {
  font-size: 10px;
  color: var(--muted-subtle);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-top: 2px;
}

/* ============================================================
   QUICK ECOSYSTEM CARDS
   ============================================================ */
.quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.quick-nav-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  text-decoration: none;
  color: var(--txt);
  transition: all var(--trans);
}

.quick-nav-card:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.quick-nav-card .icon {
  font-size: 24px;
  line-height: 1;
  padding: 6px;
  background: var(--chip);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-nav-card .title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--txt);
}

.quick-nav-card .desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

/* ============================================================
   PRODUCTS & SHOP SHOWCASE
   ============================================================ */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 14px;
  margin-top: 16px;
}

.shop-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color var(--trans), box-shadow var(--trans);
}

.shop-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

/* Featured Product: Subtle top highlight */
.shop-card.featured {
  border-top: 2px solid var(--pepe);
  background: linear-gradient(180deg, var(--card), var(--card-subtle));
}

.shop-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--chip);
  color: var(--txt-secondary);
  border: 1px solid var(--line);
}

.shop-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2px;
}

.shop-card .price {
  font-size: 24px;
  font-weight: 800;
  margin: 10px 0;
  color: var(--txt);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shop-card .price s {
  font-size: 15px;
  color: var(--muted);
  margin-right: 6px;
  font-weight: 400;
}

.shop-card ul {
  margin: 10px 0 16px 18px;
  font-size: 13.5px;
  color: var(--txt-secondary);
}

.shop-card ul li {
  margin-bottom: 6px;
  line-height: 1.45;
}

.shop-card ul li b {
  color: var(--txt);
  font-weight: 600;
}

.btn-buy {
  display: block;
  width: 100%;
  background: var(--pepe);
  color: var(--pepe-contrast);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all var(--trans);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-buy:hover {
  background: var(--pepe-hover);
  transform: translateY(-1px);
}

/* ============================================================
   DEVELOPER TOOLS / INTERACTIVE AREA
   ============================================================ */
.tool-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 14px;
  transition: border-color var(--trans);
}

.tool-box:hover {
  border-color: var(--line-strong);
}

.tool-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  margin-top: 8px;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
  font-family: inherit;
}

.tool-input:focus {
  border-color: var(--pepe);
  box-shadow: 0 0 0 3px var(--pepe-glow);
}

.tool-btn {
  background: var(--chip);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-top: 10px;
  transition: all var(--trans);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tool-btn:hover {
  background: var(--chip-hover);
  border-color: var(--line-strong);
}

.tool-result {
  margin-top: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13.5px;
}

/* ============================================================
   LIVE DIARY SECTION
   ============================================================ */
.live-diary {
  margin-top: 16px;
  text-align: left;
}

.pinned-note {
  background: var(--chip);
  border-left: 3px solid var(--pepe);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--txt-secondary);
}

.pinned-note b {
  color: var(--txt);
}

.diary-item {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13.5px;
}

.diary-time {
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 600;
  color: var(--pepe);
  min-width: 48px;
  font-size: 12.5px;
}

.diary-text {
  flex: 1;
  color: var(--txt-secondary);
  line-height: 1.5;
}

.diary-toggle {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: var(--chip);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--trans);
}

.diary-toggle:hover {
  background: var(--chip-hover);
  border-color: var(--line-strong);
}

/* Filter buttons (e.g. Sổ cái tabs) */
.filter-btn {
  background: var(--chip);
  color: var(--txt-secondary);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans);
}

.filter-btn:hover {
  background: var(--chip-hover);
  color: var(--txt);
  border-color: var(--line-strong);
}

.filter-btn.active {
  background: var(--pepe);
  color: var(--pepe-contrast);
  border-color: var(--pepe-hover);
  font-weight: 600;
  box-shadow: 0 1px 4px var(--pepe-glow);
}

/* ============================================================
   PUBLIC LEDGER TABLE
   ============================================================ */
.ledger-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  background: var(--card);
}

table.ledger {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

table.ledger th,
table.ledger td {
  padding: 10px 12px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

table.ledger thead th {
  border-top: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
}

table.ledger tbody tr:hover {
  background: var(--card-hover);
}

table.ledger td.lname {
  font-weight: 600;
  color: var(--txt);
}

table.ledger td.lstatus .st {
  display: inline-block;
  white-space: nowrap;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

.st.done {
  background: rgba(16, 185, 129, 0.15);
  color: var(--pepe);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.st.run {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.st.wait {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.st.zero {
  background: var(--chip);
  color: var(--muted);
}

table.ledger th.lrev,
table.ledger td.lrev {
  text-align: right;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  white-space: nowrap;
}

/* ============================================================
   MODALS & OVERLAYS (VietQR & Chat)
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-panel {
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 14px 18px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  color: var(--txt);
}

.modal-header.header-pink,
.modal-header.header-pepe {
  background: var(--card);
  color: var(--txt);
  border-bottom: 1px solid var(--line);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius-xs);
  transition: color var(--trans);
}

.modal-close:hover {
  color: var(--txt);
}

/* QR Code Container */
.qr-container {
  text-align: center;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
}

.qr-img {
  max-width: 210px;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  margin: 10px auto;
  background: #ffffff;
  padding: 6px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

footer a {
  color: var(--txt-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--trans);
}

footer a:hover {
  color: var(--pepe);
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
  .wrap {
    padding: 16px 14px 60px;
  }
  .nav-wrap {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px 0;
  }
  .nav-brand {
    order: 1;
    font-size: 14.5px;
  }
  .nav-actions {
    order: 2;
    margin-left: auto;
  }
  .nav-links {
    order: 3;
    width: 100%;
    flex: 0 0 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0 2px;
    gap: 6px;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-link {
    font-size: 12.5px;
    padding: 5px 9px;
  }
  .robot-card {
    padding: 16px;
  }
  .robot-card-top {
    flex-direction: column;
    gap: 16px;
  }
  .mascot-container {
    margin: 12px auto 6px;
  }
  .mascot-actions {
    width: 100%;
    min-width: 0;
  }
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat .v {
    font-size: 22px;
  }
  .screen-label {
    font-size: 11px;
    padding: 3px 8px;
    line-height: 1.35;
  }
}

@media (max-width: 640px) {
  .statusbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
  }
}

@media (max-width: 520px) {
  .thermo-ticks .tick-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .quick-nav-grid {
    grid-template-columns: 1fr;
  }
  .btn-mascot-action {
    padding: 10px 13px;
    font-size: 14px;
  }
  .modal-panel {
    max-height: 90vh;
  }
}


/* ============================================================
   LIVE TERMINAL LOG VIEWER & ACTIVITY SUMMARY RECAP
   ============================================================ */
.terminal-window {
  background: #06090e;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="light"] .terminal-window {
  background: #0f172a;
}

.terminal-header {
  background: #0b111b;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--txt-secondary);
  flex-wrap: wrap;
  gap: 8px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-body {
  padding: 14px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: #e2e8f0;
}

.terminal-line {
  display: flex;
  gap: 8px;
  align-items: baseline;
  word-break: break-all;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 3px 0;
}

.terminal-line:hover {
  background: rgba(255, 255, 255, 0.05);
}

.term-time {
  color: #38bdf8;
  font-size: 11.5px;
  min-width: 58px;
  font-weight: 600;
}

.term-tag {
  color: #f59e0b;
  font-weight: 700;
  font-size: 11.5px;
}

.term-msg {
  color: #cbd5e1;
  flex: 1;
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--pepe);
  animation: termBlink 1s infinite;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes termBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Activity Summary Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  transition: all var(--trans);
}

.summary-card:hover {
  border-color: var(--pepe);
  transform: translateY(-2px);
}

.summary-card .s-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.summary-card .s-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--pepe);
  font-family: ui-monospace, monospace;
}

.summary-card .s-lbl {
  font-size: 12px;
  color: var(--txt-secondary);
  margin-top: 2px;
  font-weight: 500;
}

/* Visitor Recap Banner */
.recap-strip {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px dashed var(--pepe);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.term-filter {
  background: var(--chip);
  color: var(--txt-secondary);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--trans);
  font-family: inherit;
}
.term-filter.active, .term-filter:hover {
  background: var(--pepe);
  color: #052e16;
  font-weight: 700;
  border-color: var(--pepe);
}

/* ============================================================
   REPO ARSENAL / LANDING PAGE PROFILES
   ============================================================ */
.repo-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.tech-stack-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 16px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--txt-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tech-tag.hot {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--pepe);
}

.tech-tag.amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber);
}

.repo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  transition: all var(--trans);
  box-shadow: var(--shadow);
}

.repo-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.repo-card.featured {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, var(--card) 0%, rgba(16, 185, 129, 0.04) 100%);
}

.repo-card-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.repo-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--chip);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.repo-title-wrap {
  flex: 1;
}

.repo-title-wrap h2 {
  font-size: 20px;
  margin: 0 0 4px;
  color: var(--txt);
}

.repo-subtitle {
  font-size: 14px;
  color: var(--txt-secondary);
  line-height: 1.5;
}

.repo-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}

@media (max-width: 768px) {
  .repo-analysis-grid {
    grid-template-columns: 1fr;
  }
}

.analysis-box {
  border-radius: var(--radius);
  padding: 16px;
  font-size: 13.5px;
  line-height: 1.65;
}

.analysis-box.capability {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.analysis-box.monetization {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.analysis-box h4 {
  margin: 0 0 10px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-box.capability h4 {
  color: var(--pepe);
}

.analysis-box.monetization h4 {
  color: var(--amber);
}

.analysis-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--txt-secondary);
}

.analysis-box li {
  margin-bottom: 8px;
}

.analysis-box li b {
  color: var(--txt);
}

.repo-pricing-bar {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.pricing-options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.pricing-opt {
  font-size: 13px;
}

.pricing-opt span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.pricing-opt b {
  font-size: 16px;
  color: var(--pepe);
  font-family: ui-monospace, monospace;
}

.repo-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Category Filter Tabs */
.repo-filter-wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  margin-bottom: 20px;
  scrollbar-width: none;
}
.repo-filter-wrap::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--txt-secondary);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--trans);
}

.filter-tab:hover {
  background: var(--chip-hover);
  color: var(--txt);
}

.filter-tab.active {
  background: var(--pepe);
  border-color: var(--pepe);
  color: #052e16;
  font-weight: 800;
}
