:root { --c: #D84315; --c2: #FFB300; --bg: #3E2723; --ink: #2b1d14; --mut: #6d5a4e; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink); overscroll-behavior: none; }
canvas#c { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
#ov { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
#menu { position: fixed; inset: 0; z-index: 20; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(180deg, rgba(62,39,35,.55), rgba(62,39,35,.9)); }
#menu.on { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
.home { min-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(var(--sat) + 70px) 16px 32px; max-width: 520px; margin: 0 auto; }
.logo { text-align: center; color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.4); }
.logo .mark { width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 26px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); transform: rotate(-6deg); }
.logo .mark img { width: 100%; height: 100%; display: block; }
.logo h1 { margin: 0; font-size: clamp(40px, 11vw, 60px); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.logo p { margin: 6px 0 0; font-weight: 800; font-size: 17px; }
.btn { display: block; width: 100%; min-height: 54px; border: 0; border-radius: 18px; background: #fff; font-weight: 800; font-size: 18px; margin: 4px 0; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0,0,0,.18); text-align: center; }
.btn small { display: block; font-size: 13px; font-weight: 700; opacity: .8; margin-top: 2px; }
.btn.main { background: linear-gradient(180deg, #FF7043, #D84315); color: #fff; }
.btn.big { min-height: 76px; font-size: 24px; font-weight: 900; }
.btn.day { background: linear-gradient(180deg, #FFF6D9, #FFE3A3); text-align: left; }
.btn.day b { display: block; font-size: 19px; color: #4e2a12; }
.btn.day span { display: block; font-size: 14px; font-weight: 700; color: #6B5320; margin-top: 2px; }
.btn.bao { text-align: left; } .btn.bao b { display: block; }
.row2 { display: flex; gap: 10px; width: 100%; }
.link { border: 0; background: rgba(255,255,255,.92); border-radius: 14px; padding: 12px 10px; font-weight: 800; width: 100%; min-height: 48px; }
.panel { background: #fff; border-radius: 22px; padding: 20px; max-width: 520px; margin: calc(var(--sat) + 70px) auto 24px; width: calc(100% - 32px); }
.panel h2 { margin: 0 0 8px; color: #4e2a12; } .panel h3 { margin: 16px 0 6px; color: #4e2a12; font-size: 17px; }
.panel p { color: var(--mut); font-weight: 600; line-height: 1.5; }
.panel .btn { border: 2px solid #f1e6dc; box-shadow: none; } .panel .btn.main { border: 0; }
.so .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.so .o { border-left: 6px solid var(--c); background: #fbf6f1; border-radius: 12px; padding: 8px 10px; }
.so .o b { display: block; color: #4e2a12; font-size: 15px; } .so .o small { display: block; color: #6d5a4e; font-size: 12px; font-weight: 600; line-height: 1.35; }
.so .o.an { opacity: .45; filter: grayscale(1); }
.foot { color: #fff; font-size: 13px; text-align: center; opacity: .85; } .foot a { color: #fff; }
/* HUD trên */
#hud { position: fixed; left: 0; right: 0; top: 0; z-index: 8; padding: calc(var(--sat) + 8px) 10px 0; pointer-events: none; }
#hud .hang1 { display: flex; align-items: center; gap: 8px; background: rgba(40,24,18,.82); color: #fff; border-radius: 16px; padding: 8px 12px; font-weight: 800; }
#hud .tim { color: #ff5252; font-size: 18px; letter-spacing: 1px; } #hud .vong { flex: 1; font-size: 14px; } #hud .diem { color: #ffd54f; font-size: 18px; }
#hud .ygoi { margin-top: 6px; background: rgba(255,248,225,.92); border-radius: 12px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: #5d4037; }
#hud .hes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
#hud .he { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 10px; background: rgba(255,255,255,.7); color: #5d4037; border-left: 4px solid var(--m); }
#hud .he.on { background: var(--m); color: #fff; }
#hud .nhan { margin-top: 6px; display: inline-block; background: rgba(40,24,18,.9); color: #fff; padding: 6px 12px; border-radius: 12px; font-size: 14px; font-weight: 800; }
/* bảng dưới */
#pn { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 8px 8px calc(var(--sab) + 8px); background: linear-gradient(180deg, rgba(62,39,35,0), rgba(40,24,18,.94) 18%); }
#pn:empty { display: none; }
#pn .thanh { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 900; margin: 0 4px 6px; flex-wrap: wrap; }
#pn .xu { color: #ffd54f; font-size: 18px; } #pn .cap { font-size: 14px; opacity: .9; }
#pn .tui { display: flex; gap: 4px; flex-wrap: wrap; }
#pn .bv { border: 0; border-radius: 10px; padding: 4px 8px; font-size: 12px; font-weight: 800; background: var(--m); color: #fff; min-height: 30px; }
#pn .bv.on { outline: 3px solid #ffeb3b; }
#pn .hang { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
#pn .mua { border: 0; border-radius: 12px; background: #fff8ef; padding: 6px 3px 5px; text-align: center; min-height: 104px; display: flex; flex-direction: column; align-items: center; gap: 1px; border-top: 4px solid #9e9e9e; }
#pn .mua.g2 { border-top-color: #42a5f5; } #pn .mua.g3 { border-top-color: #ab47bc; }
#pn .mua b { font-size: 11.5px; line-height: 1.15; color: #3e2723; } #pn .mua small { font-size: 9.5px; color: #6d5a4e; font-weight: 700; line-height: 1.15; }
#pn .mua em { font-style: normal; font-weight: 900; font-size: 12px; color: #e65100; }
#pn .mua:disabled { opacity: .45; } #pn .mua.trong { background: rgba(255,255,255,.15); color: #fff; font-size: 11px; justify-content: center; font-weight: 700; }
#pn .av { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 10%, var(--a) 11%); border: 3px solid var(--b); display: grid; place-items: center; }
#pn .av i { font-style: normal; font-weight: 900; font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
#pn .cho { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 6px; }
#pn .cho .o { border: 2px dashed rgba(255,255,255,.35); border-radius: 12px; background: rgba(255,255,255,.08); min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; }
#pn .cho .o small { color: #ffd54f; font-size: 10px; } #pn .cho .o.on { border: 3px solid #ffeb3b; background: rgba(255,235,59,.2); }
#pn .cho .o .av { width: 30px; height: 30px; }
#pn .nut { display: flex; gap: 6px; margin-top: 7px; }
#pn .phu { flex: 1; border: 0; border-radius: 14px; background: #fff; font-weight: 800; font-size: 14px; min-height: 48px; }
#pn .chinh { flex: 1.3; border: 0; border-radius: 14px; background: linear-gradient(180deg, #FF7043, #D84315); color: #fff; font-weight: 900; font-size: 18px; min-height: 48px; }
#pn .day { margin-top: 6px; background: #ffeb3b; color: #3e2723; border-radius: 12px; padding: 7px 10px; font-weight: 800; font-size: 14px; text-align: center; }
#pn.dau { background: none; } #pn .dangdau { display: flex; align-items: center; gap: 8px; background: rgba(40,24,18,.85); color: #fff; border-radius: 16px; padding: 10px 12px; }
#pn .dangdau b { flex: 1; font-size: 15px; } #pn .nho { border: 0; border-radius: 12px; background: #fff; color: #3e2723; font-weight: 800; padding: 10px 14px; min-height: 44px; }
.lon { position: fixed; left: 50%; top: 38%; transform: translate(-50%,-50%); z-index: 12; background: rgba(40,24,18,.9); color: #fff; padding: 16px 26px; border-radius: 22px; text-align: center; animation: nay .3s ease-out; pointer-events: none; }
.lon b { display: block; font-size: 30px; font-weight: 900; color: #ffd54f; } .lon span { font-weight: 800; }
@keyframes nay { from { transform: translate(-50%,-50%) scale(.6); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
