@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/be-vietnam-pro-400-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/be-vietnam-pro-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/be-vietnam-pro-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/be-vietnam-pro-700-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/be-vietnam-pro-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/be-vietnam-pro-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/be-vietnam-pro-900-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/be-vietnam-pro-900-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 900; font-display: swap; src: url('fonts/be-vietnam-pro-900-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* tityco games — trang studio. Giao diện nền tối theo kiểu trang studio game (imba.co): header cố định trong suốt,
   hero toàn màn hình có ảnh nền, tiêu đề chữ hoa rất đậm kèm dòng chữ viền, giới thiệu + ô số liệu, lưới game có
   thanh lọc, liên hệ, chân trang. Mã và nội dung tự viết; ảnh là ảnh của các game. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root { --bg: #0a0a0a; --card: #111; --line: #222; --line2: #444; --muted: #888; --soft: #ccc; --cyan: #00ffff; }

html { scroll-behavior: smooth; }
body { font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
html.i18n-pending body { visibility: hidden; }
section[id] { scroll-margin-top: 72px; }

/* ───── Header ───── */
#header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: 72px; padding: 16px 0; transition: background .3s, backdrop-filter .3s; }
#header.scrolled { background: rgba(10,10,10,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.35rem; letter-spacing: -.02em; text-transform: uppercase; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
nav { display: flex; align-items: center; gap: 32px; }
nav a.l { font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: opacity .2s; }
nav a.l:hover { opacity: .65; }
.langsel { position: relative; display: inline-flex; }
.langsel select {
  appearance: none; -webkit-appearance: none; background: transparent; color: #fff; border: 1px solid var(--line2); border-radius: 3px;
  padding: 5px 24px 5px 10px; font: inherit; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
}
.langsel select:hover { border-color: #fff; }
.langsel select option { background: #111; color: #fff; }
.langsel::after { content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: .7rem; color: var(--muted); }
@media (max-width: 760px) { nav a.l { display: none; } }

/* ───── Hero ───── */
#hero { position: relative; display: flex; align-items: center; min-height: 100vh; background: var(--bg) url("img/hero.jpg") center / cover no-repeat; isolation: isolate; }
/* Video nền: nằm dưới nội dung, trên ảnh dự phòng; chỉ hiện khi đã chạy (class .on) */
.hero-video { position: absolute; inset: 0; z-index: -2; overflow: hidden; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.hero-video.on { opacity: 1; }
.hero-video iframe { position: absolute; top: 50%; left: 50%; border: 0; transform: translate(-50%, -50%) scale(1.12); pointer-events: none; }
.hero-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.6) 0%, rgba(10,10,10,.42) 45%, rgba(10,10,10,.66) 100%); }
#hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(180deg, transparent, var(--bg)); z-index: -1; }
.hero-content { padding: 120px 0 140px; margin-left: clamp(0px, 14vw, 215px); }
h1 { font-size: clamp(3rem, 5.1vw, 6rem); line-height: .95; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 24px; text-shadow: 0 4px 40px rgba(0,0,0,.45); }
html:lang(vi) h1 { line-height: 1.12; }
h1 .hl { display: inline-block; text-wrap: balance; }
h1 .hl { color: transparent; -webkit-text-stroke: 2px #fff; text-shadow: none; }
.hero-sub { font-size: 1.2rem; color: #d4d4d4; margin-bottom: 40px; max-width: 520px; text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 2px 24px rgba(0,0,0,.7); }
.btn-main { display: inline-block; background: #fff; color: var(--bg); border: 2px solid #fff; padding: 16px 40px; font-size: 1rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: background .25s, color .25s; }
.btn-main:hover { background: transparent; color: #fff; }
.vtoggle { position: absolute; right: 32px; bottom: 26px; display: inline-flex; align-items: center; gap: 8px; background: rgba(0,0,0,.4); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 8px 16px 8px 12px; font: inherit; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.vtoggle:hover { background: rgba(0,0,0,.65); border-color: #fff; }
.vtoggle[hidden] { display: none; }
.vtoggle svg { width: 16px; height: 16px; fill: #fff; }
.vtoggle .p-pause, .vtoggle.playing .p-play { display: none; }
.vtoggle.playing .p-pause { display: inline; }
@media (max-width: 640px) { .vtoggle { right: 16px; bottom: 20px; } }
.scroll { position: absolute; left: 50%; bottom: 28px; width: 24px; height: 40px; margin-left: -12px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; }
.scroll::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ───── Khối nội dung ───── */
.sec { padding: 128px 0; }
h2 { display: inline-block; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1.2; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 32px; }
h2::after { content: ""; display: block; width: 100px; height: 3px; margin-top: 14px; background: #fff; }
.center { text-align: center; }
.center h2::after { margin-inline: auto; }

/* Giới thiệu */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about p { color: var(--soft); font-size: 1.1rem; line-height: 1.6; margin-bottom: 24px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); padding: 40px 16px 36px; text-align: center; }
.stat b { display: block; font-size: 2.5rem; line-height: 1.6; font-weight: 900; }
.stat span { text-wrap: balance; display: block; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1.7; }

/* Lưới game */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 48px; }
.pill { background: transparent; color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 8px 24px; font: inherit; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.pill:hover { color: #fff; border-color: #fff; }
.pill.active { background: #fff; border-color: #fff; color: #000; }
.games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.game { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); transition: border-color .25s, transform .25s; }
.game:hover { border-color: var(--line2); transform: translateY(-4px); }
.game[hidden] { display: none; }
.thumb { display: flex; justify-content: center; background: var(--line); }
.thumb img { width: 230px; height: 230px; object-fit: cover; }
.game-body { display: flex; flex: 1; flex-direction: column; padding: 28px 24px 26px; }
.game h3 { font-size: 1.5rem; line-height: 1.3; font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; margin-bottom: 8px; }
.tags { color: var(--muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 12px; }
.game p { color: var(--muted); font-size: .94rem; line-height: 1.6; margin-bottom: 22px; flex: 1; }
.badges { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.badge { display: inline-flex; align-items: center; gap: 10px; background: #000; border: 1px solid var(--line2); border-radius: 5px; padding: 6px 18px 6px 14px; transition: border-color .2s, background .2s; }
.badge:hover { border-color: #fff; background: #151515; }
.badge[hidden] { display: none; }
.badge svg { width: 22px; height: 22px; flex: none; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge small { display: block; font-size: .62rem; line-height: 1.1; }
.badge b { display: block; font-size: 1.02rem; line-height: 1.2; font-weight: 700; }

/* Liên hệ */
#contact { text-align: center; }
#contact p { max-width: 600px; margin: 0 auto 28px; }
.company { font-size: 1.2rem; font-weight: 700; text-transform: uppercase; }
.mail { display: inline-block; margin-top: 6px; font-size: 1.2rem; font-weight: 700; word-break: break-all; }
.mail:hover { color: var(--cyan); }

/* Chân trang */
footer { border-top: 1px solid var(--line); padding: 32px 0; text-align: center; }
.privacy { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 4px; margin-bottom: 14px; }
.privacy span { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-right: 8px; }
.privacy a { color: var(--cyan); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; }
.privacy a:hover { text-decoration: underline; }
footer small { display: block; max-width: 820px; margin: 0 auto; color: var(--muted); font-size: .76rem; line-height: 1.7; }

/* Hiện dần khi cuộn — chỉ bật khi có JS để tắt JS vẫn thấy đủ nội dung */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ───── Màn hình nhỏ ───── */
@media (max-width: 960px) {
  .games { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .sec { padding: 84px 0; }
  .hero-content { margin-left: 0; padding: 110px 0 120px; }
  h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  .games { grid-template-columns: 1fr; }
  .thumb img { width: 100%; height: auto; max-height: 300px; aspect-ratio: 1; max-width: 300px; }
  .stats { gap: 12px; }
  .stat { padding: 28px 8px; }
  .stat b { font-size: 2rem; }
  .btn-main { padding: 14px 30px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } .js .reveal { opacity: 1; transform: none; } }

/* ───── Trang chính sách ───── */
body[data-page="policy"] #header { background: rgba(10,10,10,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.doc { padding: 128px 0 96px; }
.narrow { max-width: 860px; }
.doc .back { display: inline-block; margin-bottom: 28px; color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc .back:hover { color: #fff; }
.doc h1 { text-wrap: balance; font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.12; margin-bottom: 10px; text-shadow: none; }
.doc .meta { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.doc section { margin-top: 44px; }
.doc h2 { display: block; font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; margin-bottom: 12px; }
.doc h2::after { display: none; }
.doc p { color: var(--soft); font-size: 1.02rem; line-height: 1.75; margin-bottom: 14px; }
.doc ul { margin: 6px 0 14px 22px; color: var(--soft); }
.doc li { margin-bottom: 8px; line-height: 1.7; }
.doc a:not(.back) { color: var(--cyan); }
.doc a:not(.back):hover { text-decoration: underline; }
.doc .box { margin-top: 52px; padding: 26px 28px; background: var(--card); border: 1px solid var(--line); }
.doc .box h2 { margin-bottom: 8px; }
.doc .box p { margin-bottom: 0; }
.doc .mail { word-break: break-all; font-weight: 700; }
@media (max-width: 640px) { .doc { padding-top: 104px; } }
nav a.l.current { border-bottom: 2px solid #fff; padding-bottom: 2px; }
.badge svg.fill { fill: #fff; stroke: none; }
.badge svg.gp { fill: none; stroke: none; stroke-linejoin: round; stroke-width: 1; }
