* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  --white: #f5f5f5;
  --muted: rgba(245,245,245,.62);
  /* Hệ màu HUD dùng chung: xanh phosphor giống mưa số và favicon. */
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;
  --neon: #7dffa0;
  --neon-line: rgba(125,255,160,.28);
  --neon-faint: rgba(125,255,160,.35);
  --hud-text: rgba(200,255,215,.82);
  --hud-dim: rgba(200,255,215,.55);
  --hud-panel: rgba(5,12,8,.72);
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #050505;
}
body { min-width: 320px; }
/* Ẩn khỏi màn hình nhưng vẫn để công cụ tìm kiếm và trình đọc màn hình đọc được. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.noscript {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--hud-text);
  font: 500 12px/1.5 var(--mono);
  letter-spacing: .1em;
  text-align: center;
}
#home {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #050505;
}
#binaryArt {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: #050505;
  image-rendering: pixelated;
}
/* Scanline + viền tối kiểu màn hình CRT cũ. */
#home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
}
/* Hai góc HUD (thương hiệu + đồng hồ trên trái, hướng dẫn dưới phải) dùng chung một hệ terminal. */
.brand-mark,
.interaction-hint {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 6px #000;
}
.brand-mark {
  top: clamp(16px, 2.5vh, 30px);
  left: clamp(18px, 3vw, 44px);
}
.brand-name {
  color: var(--hud-text);
  font-weight: 700;
}
.brand-name i {
  margin-right: 7px;
  color: var(--neon);
  font-style: normal;
}
/* Đồng hồ kiểu terminal hi-tech: mono, số cố định độ rộng, dấu ":" nhấp nháy. */
.clock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 12px;
  padding: 3px 8px 3px 7px;
  border: 1px solid var(--neon-line);
  border-left: 2px solid var(--neon);
  background: var(--hud-panel);
  color: var(--hud-text);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.clock b { color: var(--neon); font-weight: 700; }
.clock em { font-style: normal; animation: clockBlink 1s steps(1) infinite; }
.clock s { text-decoration: none; color: var(--neon-faint); letter-spacing: 0; }
.clock u { text-decoration: none; color: var(--hud-dim); }
.clock-dot {
  width: 5px;
  height: 5px;
  background: var(--neon);
  animation: clockBlink 2s steps(1) infinite;
}
@keyframes clockBlink { 50% { opacity: .15; } }

/* Menu chuột phải: cùng hệ HUD với đồng hồ (viền xanh, nền tối, chữ mono). */
.ctx-menu {
  position: fixed;
  z-index: 20;
  min-width: 220px;
  padding: 8px 0 6px;
  border: 1px solid var(--neon-line);
  border-left: 2px solid var(--neon);
  background: rgba(4,10,6,.94);
  color: var(--hud-text);
  font: 500 10px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  animation: ctxIn .12s steps(3) both;
}
.ctx-menu[hidden] { display: none; }
@keyframes ctxIn { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.ctx-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px 6px;
  color: var(--hud-dim);
  font-size: 9px;
}
.ctx-dot {
  width: 5px;
  height: 5px;
  background: var(--neon);
  animation: clockBlink 2s steps(1) infinite;
}
.ctx-url {
  margin: 0 0 6px;
  padding: 6px 12px 8px;
  border-bottom: 1px solid var(--neon-line);
  color: var(--neon);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: none;
}
.ctx-url span { color: var(--neon-faint); font-weight: 500; }
.ctx-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--hud-text);
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.ctx-item kbd {
  min-width: 18px;
  padding: 1px 4px;
  border: 1px solid var(--neon-line);
  color: var(--neon);
  font: 700 9px/1.2 var(--mono);
  text-align: center;
}
.ctx-item:hover,
.ctx-item:focus-visible {
  outline: none;
  background: rgba(125,255,160,.12);
  color: var(--neon);
}
.ctx-item:focus:not(:focus-visible):not(:hover) { background: none; color: var(--hud-text); }
.brand-name { pointer-events: auto; cursor: pointer; }
.menu-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(88vw, 340px); }
.menu-card .ctx-item { justify-content: space-between; }
.dish-tag { font-size: .85em; opacity: .7; letter-spacing: .08em; }
.dish-empty { padding: 10px 12px; opacity: .6; }
@media (prefers-reduced-motion: reduce) {
  .ctx-menu, .ctx-dot { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .clock em, .clock-dot { animation: none; }
}
.tagline {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(36px, 7vh, 76px);
  width: min(90vw, 620px);
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(0,0,0,.95), 0 0 32px rgba(0,0,0,.9);
}
.tagline-main {
  margin: 0;
  color: var(--white);
  font: 800 clamp(22px, 3.2vw, 42px)/1.08 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.045em;
}
.ellipsis { color: #f4b84a; }
.ellipsis > span {
  opacity: 0;
  animation: 1.8s ease-in-out infinite both;
}
.ellipsis > span:nth-child(1) { animation-name: dot1; }
.ellipsis > span:nth-child(2) { animation-name: dot2; }
.ellipsis > span:nth-child(3) { animation-name: dot3; }
@keyframes dot1 { 0%, 8% { opacity: 0; } 18%, 82% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes dot2 { 0%, 26% { opacity: 0; } 36%, 82% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes dot3 { 0%, 44% { opacity: 0; } 54%, 82% { opacity: 1; } 92%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ellipsis > span { animation: none; opacity: 1; }
}
.tagline-sub {
  transition: opacity .26s ease;
  margin: 9px 0 0;
  color: rgba(255,255,255,.72);
  font: 400 clamp(11px, 1.15vw, 14px)/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .035em;
}
.interaction-hint {
  right: clamp(18px, 3vw, 44px);
  bottom: 22px;
  gap: 16px;
  color: var(--hud-dim);
}
.interaction-hint > span { display: inline-flex; align-items: center; gap: 7px; }
.interaction-hint kbd {
  padding: 2px 5px;
  border: 1px solid var(--neon-line);
  background: var(--hud-panel);
  color: var(--neon);
  font: 700 9px/1.2 var(--mono);
  letter-spacing: .12em;
}
.key-touch { display: none; }
/* Thiết bị cảm ứng: không có hover, chỉ còn chạm để xả hơi. */
@media (hover: none) {
  .hint-hover, .key-pointer { display: none !important; }
  .key-touch { display: inline; }
}
/* Không có chuyển động thì tương tác cũng tắt, nên ẩn hướng dẫn. */
@media (prefers-reduced-motion: reduce) {
  .interaction-hint { display: none; }
}
@media (max-width: 700px) {
  /* Màn hình hẹp: đồng hồ xuống dòng dưới tên thương hiệu. */
  .brand-mark { flex-direction: column; align-items: flex-start; font-size: 9px; letter-spacing: .12em; }
  .clock { margin: 6px 0 0; gap: 6px; }
  .tagline { bottom: max(34px, env(safe-area-inset-bottom) + 26px); }
  .tagline-main { font-size: clamp(23px, 7vw, 34px); }
  .tagline-sub { font-size: 11px; }
  .interaction-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
