/* hub.css — giao diện KHO GAME RPX: sân ga đêm, biển neon, bảng giờ tàu lật chữ, thẻ game như màn hình toa tàu.
   Màu: nền xanh than đêm, vàng đèn sân ga (--amber) làm nhấn chính, mỗi game có màu riêng (--acc, từ games.json).
   2026-11-28: tạo — wiki http://localhost:3000/wiki/apps/game_hub#l1 */
@font-face { font-family: "Bungee"; src: url(fonts/Bungee-Regular.ttf); font-display: swap; }
@font-face { font-family: "BVP"; src: url(fonts/BeVietnamPro-Regular.ttf); font-display: swap; }
@font-face { font-family: "BVP"; src: url(fonts/BeVietnamPro-Bold.ttf); font-weight: 700; font-display: swap; }
:root { --night: #070a12; --ink: #0d1220; --amber: #ffb627; --cream: #f3ead6; --dim: #8b93a7; --line: #ffffff14; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--cream); font: 16px/1.55 "BVP", sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
/* hạt nhiễu phim phủ toàn trang (SVG turbulence, không ảnh ngoài) */
.grain { position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0,0) } 50% { transform: translate(-3%,2%) } 100% { transform: translate(2%,-3%) } }

.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(16px, 4vw, 48px); background: linear-gradient(#070a12ee, #070a1200); }
.logo { font: 20px "Bungee", sans-serif; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; }
.logo b { color: var(--amber); font-weight: 400; }
.logo .dot { width: 12px; height: 12px; border-radius: 50%; background: #3dff8a; box-shadow: 0 0 12px #3dff8a; animation: blink 2.4s infinite; }
@keyframes blink { 50% { opacity: .3 } }
.clock { font: 18px "Bungee", monospace; color: var(--amber); letter-spacing: 3px; text-shadow: 0 0 10px #ffb62788; }

/* ── hero: ảnh bìa game mới nhất phủ toàn màn, chữ neon bên trái ── */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.08);
  animation: drift 24s ease-in-out infinite alternate; filter: saturate(1.15); }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #070a12 8%, #070a12cc 40%, #070a1222 75%), linear-gradient(0deg, #070a12 0%, transparent 35%); }
@keyframes drift { to { transform: scale(1.16) translate(-2%, -1%); } }
.hero-in { position: relative; padding: 96px clamp(20px, 6vw, 90px) 80px; max-width: 760px; }
.eyebrow { font: 13px "Bungee"; letter-spacing: 6px; color: var(--amber); margin-bottom: 18px; animation: up .8s .1s both; }
  .marquee { font: clamp(38px, 6.2vw, 86px)/.98 "Bungee", sans-serif; margin: 0 0 22px; letter-spacing: 1px;
  text-shadow: 0 0 2px #fff, 0 0 26px #ffb62755; animation: up .8s .25s both; }
.marquee span { color: var(--amber); -webkit-text-stroke: 0; animation: flicker 7s infinite; }
@keyframes flicker { 0%, 93%, 97%, 100% { opacity: 1 } 95% { opacity: .35 } }
.lead { font-size: clamp(16px, 1.6vw, 20px); color: #d9d2c1; max-width: 520px; margin: 0 0 32px; animation: up .8s .4s both; }
.cta { display: inline-block; font: 15px "Bungee"; letter-spacing: 3px; padding: 16px 26px; color: var(--night); background: var(--amber);
  border-radius: 2px; box-shadow: 0 0 0 4px #ffb62733, 0 10px 40px #ffb62744; transition: .2s; animation: up .8s .55s both; }
.cta:hover { transform: translateY(-3px); box-shadow: 0 0 0 6px #ffb62744, 0 14px 50px #ffb62766; }
@keyframes up { from { opacity: 0; transform: translateY(24px) } }
/* đường ray chạy ngang đáy hero, ánh đèn tàu lướt qua */
.rail { position: absolute; left: 0; right: 0; bottom: 34px; height: 6px; background: repeating-linear-gradient(90deg, #ffffff22 0 26px, transparent 26px 40px); }
.rail i { position: absolute; top: -5px; width: 140px; height: 16px; border-radius: 50%; background: radial-gradient(#fff6, transparent 70%); animation: train 5s linear infinite; }
@keyframes train { from { left: -160px } to { left: 100% } }

/* ── bảng giờ tàu ── */
.board-wrap { padding: 70px clamp(14px, 5vw, 70px) 30px; }
.board { background: #05070d; border: 2px solid #1f2638; border-radius: 6px; box-shadow: inset 0 0 40px #000, 0 20px 60px #0008; padding: 14px; }
.board-head, .row { display: grid; grid-template-columns: 90px 1.6fr 1.2fr 110px 150px; gap: 12px; align-items: center; }
.board-head { font: 11px "Bungee"; letter-spacing: 3px; color: var(--dim); padding: 6px 10px 12px; border-bottom: 1px solid var(--line); }
.row { padding: 12px 10px; border-bottom: 1px dashed var(--line); cursor: pointer; transition: background .2s; }
.row:hover { background: #ffb6270d; }
.row:last-child { border-bottom: 0; }
.flap { font: 17px "Bungee", monospace; letter-spacing: 2px; color: var(--amber); white-space: nowrap; overflow: hidden; }
.flap.plat { color: #fff; background: #1a2236; text-align: center; border-radius: 3px; padding: 4px 0; }
.status { font: 12px "Bungee"; letter-spacing: 2px; padding: 6px 10px; border-radius: 3px; text-align: center; }
.status.go { background: #3dff8a1f; color: #3dff8a; animation: blink 1.6s infinite; }
.status.soon { background: #ffffff0d; color: var(--dim); }
@media (max-width: 720px) { .board-head, .row { grid-template-columns: 64px 1fr 110px; } .hide-s { display: none; } .flap { font-size: 14px; } }

/* ── thẻ game ── */
.tracks { padding: 30px clamp(14px, 5vw, 70px) 60px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip { font: 12px "Bungee"; letter-spacing: 2px; padding: 9px 14px; border: 1px solid #ffffff2a; border-radius: 30px; background: transparent; color: var(--cream); cursor: pointer; }
.chip.on, .chip:hover { background: var(--amber); color: var(--night); border-color: var(--amber); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 26px; }
.card { --acc: var(--amber); position: relative; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--ink); border: 1px solid #ffffff12;
  box-shadow: 0 20px 50px #0009; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; animation: up .7s both; }   /* 'both': hiện dần từ keyframe from, không cần opacity:0 (opacity:0 làm thẻ biến mất hẳn — 2026-11-28) */
.card:hover { transform: translateY(-8px) rotate(-.4deg); box-shadow: 0 30px 70px #000c, 0 0 0 2px var(--acc), 0 0 50px color-mix(in srgb, var(--acc) 40%, transparent); }
.shot { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }   /* <a> mặc định inline: aspect-ratio không ăn */
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s, opacity .5s; }
.shot img.b { position: absolute; inset: 0; opacity: 0; }
.card:hover .shot img { transform: scale(1.06); }
.card:hover .shot img.b { opacity: 1; }
/* vạch quét kiểu màn hình CRT trên ảnh */
.shot::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, #0000 0 2px, #0003 2px 3px), linear-gradient(0deg, var(--ink), transparent 45%); pointer-events: none; }
.badge { position: absolute; top: 14px; left: 14px; z-index: 2; font: 12px "Bungee"; letter-spacing: 2px; padding: 6px 10px; background: var(--acc); color: #000; border-radius: 2px; }
.devs { position: absolute; top: 14px; right: 14px; z-index: 2; display: flex; gap: 6px; }
.devs span { font-size: 12px; padding: 5px 8px; border-radius: 20px; background: #000a; border: 1px solid #ffffff30; }
.body { padding: 0 22px 22px; margin-top: -54px; position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.body .play { margin-top: auto; }   /* nút CHƠI NGAY luôn nằm đáy thẻ dù mô tả dài ngắn khác nhau */
.body h3 { font: clamp(26px, 3vw, 34px)/1.05 "Bungee"; margin: 0 0 6px; color: #fff; text-shadow: 0 2px 20px #000; }
.body .tl { color: var(--acc); font-weight: 700; margin: 0 0 10px; }
.body .ds { color: #c9c3b4; font-size: 15px; margin: 0 0 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.meta span { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: #ffffff0d; color: #d8d2c4; }
.play { display: flex; align-items: center; justify-content: space-between; font: 16px "Bungee"; letter-spacing: 3px; padding: 15px 20px;
  background: var(--acc); color: #000; border-radius: 4px; transition: .2s; }
.play:hover { filter: brightness(1.1); letter-spacing: 4px; }
.play i { font-style: normal; transition: transform .2s; }
.play:hover i { transform: translateX(6px); }
/* thẻ "chuyến tiếp theo": chỗ trống chờ game mới */
.card.soon { display: flex; align-items: center; justify-content: center; min-height: 380px; border: 2px dashed #ffffff22; background:
  repeating-linear-gradient(-45deg, #ffffff05 0 14px, transparent 14px 28px); box-shadow: none; }
.card.soon:hover { transform: none; box-shadow: none; }
.soon-in { text-align: center; color: var(--dim); }
.soon-in b { display: block; font: 26px "Bungee"; color: #ffffff55; margin-bottom: 8px; letter-spacing: 2px; }
.foot { text-align: center; padding: 40px 20px 60px; border-top: 1px solid var(--line); font-size: 14px; }
.foot .muted { color: var(--dim); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
