/* ============================================
   Portfolio Coder - Dark Mode Cyberpunk/Terminal
   Font: JetBrains Mono | Màu chủ đạo: Neon Cyan/Pink
   ============================================ */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(15, 15, 25, 0.7);
  --text-primary: #e0e0e0;
  --text-muted: #888;
  --accent-cyan: #00f5d4;
  --accent-pink: #f72585;
  --accent-purple: #7b2cbf;
  --neon-glow-cyan: 0 0 10px #00f5d4, 0 0 20px #00f5d4, 0 0 40px #00f5d4;
  --neon-glow-pink: 0 0 10px #f72585, 0 0 20px #f72585;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: none;
}

@media (hover: none) {
  body { cursor: auto; }
}

/* ---- SSH Gatekeeper (màn hình khởi động) ---- */
.ssh-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0a0f0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.ssh-overlay.ssh-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ssh-screen {
  padding: 2rem;
}

.ssh-line {
  color: #00ff41;
  font-size: 1.1rem;
  text-shadow: 0 0 10px #00ff41;
  margin: 0.5rem 0;
  opacity: 0;
  animation: ssh-typing 0.5s ease forwards;
}

.ssh-line-2 {
  animation-delay: 0.8s;
  animation-fill-mode: backwards;
}

@keyframes ssh-typing {
  to { opacity: 1; }
}

/* ---- Canvas particles (nền) ---- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(ellipse at bottom, #1a1a2e 0%, var(--bg-dark) 70%);
}

/* ---- Scanlines (cyberpunk) ---- */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.5) 2px,
    rgba(0, 0, 0, 0.5) 4px
  );
}

/* ---- Custom cursor ---- */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: transform 0.1s ease-out;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  transition: width 0.2s, height 0.2s, margin 0.2s, border-color 0.2s, box-shadow 0.2s;
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: var(--accent-pink);
  box-shadow: 0 0 20px rgba(247, 37, 133, 0.5);
}

body.cursor-hover .cursor-dot {
  background: var(--accent-pink);
  transform: scale(1.3);
}

@media (hover: none) {
  .cursor-dot,
  .cursor-ring { display: none; }
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
}

.nav-brand {
  font-weight: 600;
  color: var(--accent-cyan);
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav-links a:hover {
  color: var(--accent-cyan);
  text-shadow: var(--neon-glow-cyan);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

.btn-theme,
.btn-audio {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  cursor: none;
  transition: border-color 0.2s, color 0.2s;
}

.btn-theme:hover,
.btn-audio:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-audio.muted { opacity: 0.5; }

/* ---- Hero Section ---- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 700px;
}

.hero-greeting {
  color: var(--accent-cyan);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}

.typing-cursor {
  color: var(--accent-cyan);
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--accent-cyan), #00c9b7);
  border: none;
  border-radius: 4px;
  cursor: none;
  transition: box-shadow 0.3s, transform 0.2s, background 0.3s;
}

.btn:hover {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-cyan));
  box-shadow: var(--neon-glow-cyan), 0 0 30px rgba(247, 37, 133, 0.3);
  transform: translateY(-3px);
}

/* ---- Section chung ---- */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  text-align: center;
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
}

/* Glitch effect cho tiêu đề section (text-shadow) */
.section-title-glitch {
  animation: glitch-shadow 4s ease-in-out infinite;
}

@keyframes glitch-shadow {
  0%, 85%, 100% {
    text-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
    transform: translate(0, 0);
  }
  87% {
    text-shadow: -2px 0 var(--accent-pink), 2px 0 var(--accent-cyan);
    transform: translate(-1px, 1px);
  }
  89% {
    text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--accent-pink);
    transform: translate(1px, -1px);
  }
  91% {
    text-shadow: 0 0 25px rgba(247, 37, 133, 0.5);
    transform: translate(0, 0);
  }
}

/* ---- About - Terminal window (viền glow động) ---- */
.terminal-window {
  position: relative;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 245, 212, 0.08);
  animation: terminal-glow 3s ease-in-out infinite;
}

@keyframes terminal-glow {
  0%, 100% { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 245, 212, 0.06); }
  50% { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 245, 212, 0.12), 0 0 60px rgba(247, 37, 133, 0.06); }
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  margin-left: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.5rem;
}

.terminal-output {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  overflow-x: auto;
}

.terminal-output .comment { color: #6a9955; }
.terminal-output .keyword { color: var(--accent-pink); }
.terminal-output .string { color: var(--accent-cyan); }
.terminal-output .boolean { color: #569cd6; }

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.terminal-prompt {
  color: var(--accent-cyan);
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
}

.terminal-input::placeholder {
  color: var(--text-muted);
}

.terminal-response {
  min-height: 24px;
  font-size: 0.9rem;
  color: var(--accent-cyan);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---- System Health Dashboard (Grafana style) ---- */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.chart-item {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chart-item:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.15);
}

.chart-bar-wrap {
  position: relative;
  height: 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.chart-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 4px;
  transition: width 1s ease-out;
}

.chart-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.4), transparent);
  animation: wave-move 2s ease-in-out infinite;
}

@keyframes wave-move {
  0%, 100% { transform: translateX(-100%); opacity: 0.5; }
  50% { transform: translateX(100%); opacity: 1; }
}

.chart-label { font-size: 0.9rem; color: var(--text-muted); }
.chart-value { font-size: 1rem; font-weight: 600; color: var(--accent-cyan); margin-left: 0.5rem; }

.live-logs {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
}

.live-logs-header {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--glass-border);
}

.live-logs-body {
  padding: 0.75rem 1rem;
  max-height: 120px;
  overflow: hidden;
  font-size: 0.8rem;
}

.log-line {
  margin: 0.25rem 0;
  animation: log-fade 0.5s ease;
}

@keyframes log-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-ok { color: #00ff41; }
.log-info { color: var(--accent-cyan); }
.log-warn { color: #ffbd2e; }

/* ---- Contact Links (Facebook, Zalo, Telegram) ---- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-link-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 2rem;
  min-width: 180px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
}

.contact-link-item::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.3s;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

.contact-link-item:hover {
  transform: translateY(-5px);
  border-color: transparent;
}

.contact-link-item:hover::before {
  opacity: 1;
  animation: border-glow 2s ease infinite;
}

@keyframes border-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: box-shadow 0.3s, transform 0.3s;
}

.contact-icon img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.contact-link-item:hover .contact-icon {
  transform: scale(1.1);
}

.contact-facebook .contact-icon {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.15);
}
.contact-facebook:hover {
  box-shadow: 0 10px 30px rgba(24, 119, 242, 0.25);
}
.contact-facebook:hover .contact-icon {
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.5);
}

.contact-zalo .contact-icon {
  color: #0068ff;
  background: rgba(0, 104, 255, 0.15);
}
.contact-zalo:hover {
  box-shadow: 0 10px 30px rgba(0, 104, 255, 0.25);
}
.contact-zalo:hover .contact-icon {
  box-shadow: 0 0 20px rgba(0, 104, 255, 0.5);
}

.contact-telegram .contact-icon {
  color: #0088cc;
  background: rgba(0, 136, 204, 0.15);
}
.contact-telegram:hover {
  box-shadow: 0 10px 30px rgba(0, 136, 204, 0.25);
}
.contact-telegram:hover .contact-icon {
  box-shadow: 0 0 20px rgba(0, 136, 204, 0.5);
}

.contact-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.contact-value {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
}

/* ---- Easter egg: sudo rm -rf / ---- */
.easter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.easter-overlay.easter-show {
  opacity: 1;
  visibility: visible;
}

.easter-rm-content {
  font-family: var(--font-mono);
  color: #ff4444;
  text-align: center;
  font-size: 1.2rem;
}

.easter-rm-content p { margin: 0.5rem 0; }

/* ---- Easter egg: Matrix rain ---- */
.matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.matrix-overlay.matrix-show {
  opacity: 1;
  visibility: visible;
}

#matrix-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
}

.footer p {
  letter-spacing: 0.05em;
}

/* Cho phép pointer trên link/button khi dùng custom cursor */
a, button {
  cursor: none;
}

@media (hover: none) {
  a, button { cursor: pointer; }
}

/* ---- Scroll reveal (class do JS thêm) ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.98);
    padding: 1rem;
    gap: 1rem;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .contact-link-item {
    width: 100%;
    max-width: 280px;
  }
}

/* ---- OS Theme Switcher ---- */
body.theme-ubuntu {
  --bg-dark: #2d0922;
  --accent-cyan: #e95420;
  --accent-pink: #77216f;
  --glass-border: rgba(233, 84, 32, 0.2);
}
body.theme-ubuntu .terminal-window,
body.theme-ubuntu .chart-item,
body.theme-ubuntu .contact-link-item { border-radius: 12px; }

body.theme-kali {
  --bg-dark: #0d0d0d;
  --accent-cyan: #557c9a;
  --accent-pink: #8b8b8b;
  --text-primary: #c0c0c0;
  --glass-border: rgba(85, 124, 154, 0.3);
}

body.theme-win95 {
  --bg-dark: #008080;
  --bg-card: rgba(0, 0, 128, 0.3);
  --accent-cyan: #c0c0c0;
  --accent-pink: #000080;
  --text-primary: #000;
  --text-muted: #333;
  --glass: rgba(192, 192, 192, 0.5);
  --glass-border: #404040;
  --font-mono: 'Consolas', 'Courier New', monospace;
}
body.theme-win95 .btn,
body.theme-win95 .contact-link-item,
body.theme-win95 .chart-item {
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-shadow: 1px 1px 0 #000;
}
body.theme-win95 .btn:hover,
body.theme-win95 .contact-link-item:hover {
  border-color: #404040 #fff #fff #404040;
}

/* ---- Thông tin ngân hàng: FAB + Modal ---- */
.bank-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), var(--neon-glow-cyan);
  transition: transform 0.2s, box-shadow 0.2s;
}
.bank-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 245, 212, 0.2);
}
.bank-fab-icon { font-size: 1.2rem; }
.bank-fab-label { font-weight: 500; }

.bank-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.bank-modal-backdrop.bank-modal-open {
  opacity: 1;
  visibility: visible;
}
.bank-modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 245, 212, 0.08);
}
.bank-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--glass);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.bank-modal-close:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}
.bank-modal-subtitle {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}
.bank-modal-title {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-align: center;
}
.bank-modal-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}
.bank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.bank-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bank-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.1);
}
.bank-card-qr {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.bank-card-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bank-qr-placeholder {
  display: none;
  font-size: 0.75rem;
  color: #666;
  text-align: center;
  padding: 0.5rem;
}
.bank-card-details {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: center;
}
.bank-card-details p { margin: 0.35rem 0; }
.bank-card-details strong { color: var(--accent-cyan); }
.bank-btn-copy {
  width: 100%;
  padding: 0.5rem 1rem;
  background: var(--accent-cyan);
  color: var(--bg-dark);
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.bank-btn-copy:hover {
  background: #00ddbb;
  transform: translateY(-1px);
}

.bank-btn-app {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.bank-btn-app:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
  color: #fff;
}

@media (max-width: 768px) {
  .bank-fab-label { display: none; }
  .bank-fab { padding: 0.75rem; }
  .bank-cards { grid-template-columns: 1fr; }
}

/* ===================== MOBILE IMPROVEMENTS ===================== */
/* Fix: giới hạn chiều cao menu mobile + backdrop đẹp hơn */
@media (max-width: 768px) {
  .nav {
    padding: 0.7rem 1rem;
  }
  .nav-brand {
    font-size: 1rem;
  }
  .nav.nav-open .nav-links {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    gap: 0.4rem;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  }
  .nav-links li {
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 0.55rem 0.5rem;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s, padding-left 0.2s;
  }
  .nav-links a:hover {
    border-left-color: var(--accent-cyan);
    padding-left: 0.8rem;
  }

  /* Hero: title không tràn, đủ thoáng */
  .hero {
    padding: 4.5rem 1rem 2.5rem;
  }
  .hero-title {
    font-size: clamp(1.4rem, 7vw, 2rem);
    min-height: 1.4em;
    word-break: break-word;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }
  .hero-greeting {
    font-size: 0.85rem;
  }

  /* Section + tiêu đề */
  .section {
    padding: 2.5rem 0.85rem;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.75rem;
  }

  /* Terminal: không tràn ngang, chữ đọc được */
  .terminal-window {
    border-radius: 6px;
  }
  .terminal-body {
    padding: 1rem;
  }
  .terminal-output {
    font-size: 0.78rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .terminal-output code {
    white-space: pre;
  }
  .terminal-title {
    font-size: 0.75rem;
  }
  .terminal-input {
    font-size: 0.85rem;
  }
  .terminal-response {
    font-size: 0.8rem;
  }

  /* System Health: 1 cột gọn, số to dễ đọc */
  .dashboard-charts {
    grid-template-columns: 1fr;
  }
  .chart-item {
    padding: 0.85rem 1rem;
  }
  .chart-bar-wrap {
    height: 20px;
  }
  .live-logs-body {
    max-height: 100px;
    font-size: 0.72rem;
  }

  /* Contact cards: full width hơn */
  .contact-links {
    gap: 1rem;
  }
  .contact-link-item {
    max-width: 100%;
    min-width: 0;
    padding: 1.25rem 1.5rem;
  }

  /* Nút bank: gọn, không che nội dung */
  .bank-fab {
    bottom: 1rem;
    right: 1rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
  }
  .bank-fab-icon {
    font-size: 1.1rem;
  }

  /* Modal bank: full width, padding hợp lý */
  .bank-modal {
    padding: 1.25rem 1rem;
    max-height: 88vh;
    border-radius: 10px;
  }
  .bank-modal-title {
    font-size: 1.35rem;
  }
  .bank-modal-subtitle {
    font-size: 0.78rem;
  }
  .bank-modal-hint {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }
  .bank-cards {
    gap: 0.9rem;
  }
  .bank-card {
    padding: 1rem;
  }
  .bank-card-qr {
    width: 120px;
    height: 120px;
  }
  .bank-card-qr img {
    width: 120px;
    height: 120px;
  }
  .bank-card-details p {
    font-size: 0.82rem;
  }
  .bank-btn-copy, .bank-btn-app {
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
  }

  .footer {
    padding: 1.5rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* Fix đặc thù màn hình rất nhỏ */
@media (max-width: 400px) {
  .hero-title {
    font-size: 1.3rem;
  }
  .terminal-output {
    font-size: 0.72rem;
  }
  .nav-links a {
    font-size: 0.9rem;
  }
  .bank-card-details p {
    font-size: 0.78rem;
  }
  .chat-fab, .vth-chat-fab {
    bottom: 0.9rem;
    left: 0.9rem;
  }
}

/* Fix safe-area cho iPhone (notch/home indicator) */
@supports (padding: max(0px)) {
  .vth-chat-fab {
    bottom: max(1.2rem, env(safe-area-inset-bottom));
    left: max(1.2rem, env(safe-area-inset-left));
  }
  .vth-chat-panel {
    bottom: calc(5.75rem + env(safe-area-inset-bottom));
    left: max(1.2rem, env(safe-area-inset-left));
  }
  .bank-fab {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }
}
