:root {
  --cream: #f8f1e3;
  --paper: #fffaf0;
  --straw: #d8b26a;
  --straw-dark: #b38a3e;
  --red: #a3271f;
  --red-dark: #7d1c16;
  --green: #2f5d3a;
  --ink: #2a1d14;
  --muted: #6e5b4a;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--red); }
h1, h2, h3 { font-family: "Playfair Display", Georgia, serif; line-height: 1.2; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 241, 227, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(42, 29, 20, .1);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.logo { display: flex; align-items: center; gap: 10px; font-family: "Playfair Display", serif; font-size: 1.5rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo svg { width: 38px; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--red); }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.7rem; cursor: pointer; color: var(--ink); }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid rgba(0,0,0,.1); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4%; border-top: 1px solid rgba(0,0,0,.06); }
}

/* Hero */
.hero { padding: 70px 0 60px; background: radial-gradient(circle at 80% 20%, #f1dfb6 0, transparent 55%); }
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 16px; }
.hero h1 span { color: var(--red); }
.hero p { font-size: 1.15rem; color: var(--muted); margin-bottom: 26px; }
.hero-art svg { width: 100%; max-width: 420px; margin: 0 auto; }
@media (max-width: 760px) {
  .hero { padding: 40px 0; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 240px; }
  .btn-row { justify-content: center; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 600;
  border: 2px solid var(--red); cursor: pointer; font-size: 1rem; font-family: inherit;
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: scale(.97); }
.btn.outline { background: transparent; color: var(--red); }
.btn.outline:hover { background: var(--red); color: #fff; }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* Sections */
section { padding: 70px 0; }
section.alt { background: var(--paper); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-title p { color: var(--muted); margin-top: 8px; }
.section-title .vn { display: block; font-family: "Be Vietnam Pro", sans-serif; font-size: .95rem; color: var(--straw-dark); letter-spacing: .15em; text-transform: uppercase; margin-bottom: 6px; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature { background: var(--paper); padding: 26px; border-radius: var(--radius); border: 1px solid rgba(179, 138, 62, .3); }
.feature .icon { font-size: 2rem; margin-bottom: 10px; }
.feature h3 { margin-bottom: 6px; }

/* Menu */
.menu-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.menu-tabs button { padding: 8px 18px; border-radius: 999px; border: 2px solid var(--straw); background: transparent; font-family: inherit; font-size: .95rem; cursor: pointer; color: var(--ink); }
.menu-tabs button.active { background: var(--straw); color: var(--ink); font-weight: 600; }
.menu-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 40px; }
.menu-item { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(42,29,20,.2); }
.menu-item h4 { font-size: 1.05rem; }
.menu-item p { color: var(--muted); font-size: .9rem; }
.menu-item .price { font-weight: 700; color: var(--red); white-space: nowrap; }

/* Shop */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; }
.product { background: var(--cream); border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(179,138,62,.3); display: flex; flex-direction: column; }
.product .thumb { aspect-ratio: 4/3; display: grid; place-items: center; }
.product .thumb svg { width: 60%; }
.product .info { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .info p { color: var(--muted); font-size: .92rem; flex: 1; }
.product .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.product .price { font-weight: 700; font-size: 1.15rem; color: var(--red); }

/* Games teaser */
.game-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.game-card { background: var(--green); color: #fff; border-radius: var(--radius); padding: 26px; text-decoration: none; transition: transform .15s; }
.game-card:hover { transform: translateY(-4px); }
.game-card .icon { font-size: 2.4rem; }
.game-card h3 { margin: 8px 0 4px; }
.game-card p { opacity: .85; font-size: .95rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.contact-info li { list-style: none; margin-bottom: 14px; display: flex; gap: 12px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.hours td:last-child { text-align: right; }
form.contact { display: flex; flex-direction: column; gap: 12px; }
form.contact input, form.contact textarea, form.contact select {
  padding: 12px; border-radius: 10px; border: 1px solid rgba(42,29,20,.25); font-family: inherit; font-size: 1rem; background: #fff;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

footer { background: var(--ink); color: #e9dcc6; padding: 30px 0; text-align: center; font-size: .9rem; }
footer a { color: var(--straw); }

/* ===== Games page ===== */
.game-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.game-tabs button { padding: 10px 18px; border-radius: 999px; border: 2px solid var(--green); background: transparent; color: var(--green); font-family: inherit; font-weight: 600; cursor: pointer; font-size: .95rem; }
.game-tabs button.active { background: var(--green); color: #fff; }
.game-panel { display: none; background: var(--paper); border-radius: var(--radius); padding: 24px; border: 1px solid rgba(179,138,62,.3); }
.game-panel.active { display: block; }
.game-panel h2 { margin-bottom: 4px; }
.game-panel .rules { color: var(--muted); font-size: .92rem; margin: 8px 0 18px; }
.status { text-align: center; font-weight: 600; margin: 14px 0; min-height: 1.6em; }

/* O an quan */
.oaq-wrap { overflow-x: auto; }
.oaq-board {
  display: grid; grid-template-columns: 1.3fr repeat(5, 1fr) 1.3fr; grid-template-rows: 1fr 1fr;
  gap: 4px; background: #6b4a2b; padding: 6px; border-radius: 16px; max-width: 640px; margin: 0 auto;
}
.oaq-cell {
  background: #c9a46a; border-radius: 8px; aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; font-weight: 700; font-size: 1.1rem; color: var(--ink);
  border: 3px solid transparent; user-select: none;
}
.oaq-cell.quan { grid-row: 1 / span 2; aspect-ratio: auto; border-radius: 60px 8px 8px 60px; background: #b8915a; }
.oaq-cell.quan.right { border-radius: 8px 60px 60px 8px; }
.oaq-cell .big { font-size: 1.4rem; }
.oaq-cell .lbl { font-size: .62rem; font-weight: 500; opacity: .7; }
.oaq-cell.playable { cursor: pointer; background: #e2c48c; }
.oaq-cell.selected { border-color: var(--red); background: #f0d9a8; }
.oaq-cell.flash { animation: flash .35s; }
@keyframes flash { 50% { background: #fff3c4; } }
.seeds { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; max-width: 80%; margin-top: 2px; }
.seeds i { width: 6px; height: 6px; border-radius: 50%; background: #3b2a1c; display: block; }
.oaq-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.scores { display: flex; justify-content: space-between; max-width: 640px; margin: 0 auto 10px; font-weight: 600; }

/* Bau cua */
.bc-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 480px; margin: 0 auto; }
.bc-tile { background: #fff; border: 3px solid var(--straw); border-radius: 12px; padding: 10px 4px; text-align: center; cursor: pointer; user-select: none; position: relative; }
.bc-tile .em { font-size: 2.4rem; line-height: 1.1; }
.bc-tile .name { font-weight: 600; font-size: .9rem; }
.bc-tile .bet { position: absolute; top: 4px; right: 6px; background: var(--red); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 7px; display: none; }
.bc-tile.has-bet .bet { display: block; }
.bc-tile.win { border-color: var(--green); background: #e5f2e7; }
.dice { display: flex; justify-content: center; gap: 12px; margin: 18px 0 6px; }
.die { width: 64px; height: 64px; background: #fff; border-radius: 12px; display: grid; place-items: center; font-size: 2.2rem; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.die.rolling { animation: shake .12s infinite; }
@keyframes shake { 0%{transform:rotate(-8deg)} 50%{transform:rotate(8deg)} 100%{transform:rotate(-8deg)} }
.bc-bar { display: flex; justify-content: space-between; align-items: center; max-width: 480px; margin: 0 auto 12px; flex-wrap: wrap; gap: 8px; }
.chips { display: flex; gap: 6px; }
.chips button { width: 42px; height: 42px; border-radius: 50%; border: 3px dashed #fff; background: var(--straw-dark); color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }
.chips button.active { background: var(--red); }

/* Oan tu ti */
.rps-choices { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.rps-choices button { font-size: 2.6rem; width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--straw); background: #fff; cursor: pointer; }
.rps-choices button span { display: block; font-size: .75rem; font-family: "Be Vietnam Pro", sans-serif; }
.rps-arena { display: flex; justify-content: center; align-items: center; gap: 24px; font-size: 3.5rem; margin: 20px 0 6px; min-height: 80px; }
.rps-arena small { font-size: 1rem; color: var(--muted); }
@media (max-width: 500px) {
  .game-panel { padding: 16px 12px; }
  .oaq-board { gap: 3px; padding: 4px; }
  .oaq-cell { font-size: .9rem; border-width: 2px; }
  .oaq-cell .lbl { display: none; }
  .seeds i { width: 4px; height: 4px; }
}

/* ===== Games hub ===== */
.lang-btn { border: 2px solid var(--green); background: #fff; color: var(--green); border-radius: 999px; padding: 4px 12px; font-weight: 700; cursor: pointer; font-family: inherit; margin-left: 10px; }
.hub-progress { text-align: center; color: var(--muted); margin: -20px 0 22px; font-size: .95rem; }
.hub-progress b { color: var(--green); }
.daily { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, var(--red), #c2462f); color: #fff; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; cursor: pointer; border: 0; width: 100%; text-align: left; font-family: inherit; }
.daily .gm-icon { font-size: 2.6rem; }
.daily small { opacity: .85; display: block; }
.daily b { font-size: 1.15rem; }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gm-card { position: relative; background: var(--paper); border: 2px solid rgba(179,138,62,.35); border-radius: var(--radius); padding: 16px 10px 14px; text-align: center; cursor: pointer; font-family: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .12s, border-color .12s; }
.gm-card:hover { transform: translateY(-3px); border-color: var(--green); }
.gm-icon { font-size: 2.3rem; line-height: 1.2; }
.gm-card b { font-size: 1rem; }
.gm-card .sub { font-size: .78rem; color: var(--muted); font-style: italic; }
.gm-card .tag { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.badge { position: absolute; top: 8px; right: 8px; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.badge.new { background: var(--red); color: #fff; }
.badge.done { background: #e5f2e7; color: var(--green); }
.play-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.play-bar h2 { flex: 1; font-size: 1.6rem; }
.play-bar h2 small { display: block; font-family: "Be Vietnam Pro", sans-serif; font-size: .85rem; font-weight: 500; color: var(--muted); font-style: italic; }
.best { font-weight: 600; color: var(--straw-dark); font-size: .95rem; }
.hud { display: flex; justify-content: space-between; font-weight: 700; max-width: 640px; margin: 0 auto 8px; }
.game-canvas { width: 100%; max-width: 640px; display: block; margin: 0 auto; border-radius: 12px; touch-action: none; user-select: none; -webkit-user-select: none; }
.opt-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; font-size: .95rem; }
.opt-row select { padding: 6px 10px; border-radius: 8px; font-family: inherit; }
.tap-btn { touch-action: manipulation; user-select: none; -webkit-user-select: none; font-family: inherit; font-weight: 800; font-size: 1.4rem; color: #fff; border: 0; border-radius: 18px; padding: 22px 10px; cursor: pointer; flex: 1; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.tap-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.tap-btn.blue { background: #2f6db3; }
.tap-btn.red { background: var(--red); }
.tap-btn.green { background: var(--green); }
.tap-btn:disabled { opacity: .5; }
.btn-line { display: flex; gap: 12px; max-width: 640px; margin: 12px auto 0; }

/* End panel / suggestions */
.end-panel { margin-top: 18px; background: #fff; border: 2px solid var(--straw); border-radius: var(--radius); padding: 18px; text-align: center; animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
.end-panel h3 { font-size: 1.4rem; margin-bottom: 4px; }
.end-panel .new-best { color: var(--red); font-weight: 700; }
.end-panel .sugg-title { margin: 16px 0 10px; font-weight: 600; color: var(--muted); }
.sugg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sugg .gm-card { padding: 12px 6px; }
.sugg .gm-icon { font-size: 1.8rem; }
.sugg .gm-card b { font-size: .85rem; }

/* Tug of war */
.tug-field { position: relative; overflow: hidden; background: linear-gradient(#cfe6b8, #a9cf8a); border-radius: 12px; height: 120px; max-width: 640px; margin: 0 auto; }
.tug-center { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; background: #fff; }
.tug-zone { position: absolute; top: 0; bottom: 0; width: 3px; background: rgba(163,39,31,.6); }
.tug-rope { position: absolute; left: 0; right: 0; top: 30px; display: flex; align-items: center; transition: transform .08s linear; }
.tug-rope .team { font-size: 2rem; white-space: nowrap; }
.tug-rope .team.l { filter: hue-rotate(180deg); }
.rope-line { flex: 1; height: 6px; background: repeating-linear-gradient(45deg, #b38a3e 0 6px, #8a6427 6px 12px); position: relative; border-radius: 3px; }
.rope-line .ribbon { position: absolute; left: 50%; top: -12px; width: 6px; height: 30px; background: var(--red); transform: translateX(-50%); }

/* Danh chuyen */
.dc-board { position: relative; height: 300px; max-width: 640px; margin: 0 auto; background: radial-gradient(circle at 50% 70%, #e9d3a6, #caa76c); border-radius: 14px; overflow: hidden; touch-action: manipulation; }
.stick { position: absolute; width: 8px; height: 54px; border-radius: 4px; background: linear-gradient(90deg, #e7cf8f, #b8913f); box-shadow: 0 1px 2px rgba(0,0,0,.3); cursor: pointer; }
.stick::after { content: ""; position: absolute; inset: -14px; }
.dc-ball { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd27a, #e07b1a); box-shadow: 0 2px 4px rgba(0,0,0,.3); left: calc(50% - 20px); cursor: pointer; z-index: 3; }
.dc-shadow { position: absolute; width: 34px; height: 10px; border-radius: 50%; background: rgba(0,0,0,.2); left: calc(50% - 17px); }
.dc-hand { position: absolute; bottom: 8px; left: 10px; font-weight: 700; }

/* Cuop co */
.cc-arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; max-width: 520px; margin: 0 auto; text-align: center; }
.cc-side { background: #fff; border-radius: 14px; padding: 12px 6px; }
.cc-side .num { display: inline-block; width: 44px; height: 44px; line-height: 44px; border-radius: 50%; background: #2f6db3; color: #fff; font-weight: 800; font-size: 1.3rem; }
.cc-side.cpu .num { background: var(--red); }
.cc-flag { font-size: 3rem; transition: transform .3s; }
.cc-call { font-family: "Playfair Display", serif; font-size: 2.2rem; text-align: center; min-height: 1.5em; margin: 14px 0 6px; }

@media (max-width: 500px) {
  .play-bar h2 { font-size: 1.3rem; }
  .play-bar .best { width: 100%; }
}

[hidden] { display: none !important; }
