/* =============================================
   TySeiSei — style.css
   Aesthetic: Dark Glassmorphism / Neon Accent
   Fonts: Be Vietnam Pro (display+body) — hỗ trợ đầy đủ tiếng Việt & tiếng Anh
   ============================================= */

/* ===== CSS VARIABLES ===== */
/* Palette: Silver / White-Grey */
:root {
  --accent:        #9aa5b4;
  --accent2:       #cbd5e1;
  --accent-glow:   rgba(154, 165, 180, 0.30);
  --success:       #34d399;
  --warn:          #fbbf24;
  --danger:        #f87171;

  /* Light theme */
  --bg:            #f5f6f8;
  --bg2:           #eceef1;
  --surface:       #ffffff;
  --surface2:      #f0f2f5;
  --border:        rgba(0,0,0,0.08);
  --text:          #1c1e22;
  --text2:         #4a4e57;
  --text3:         #8a8f99;
  --shadow:        0 8px 32px rgba(0,0,0,0.10);
  --shadow-sm:     0 4px 12px rgba(0,0,0,0.07);
  --nav-bg:        #ffffff;
  --hero-overlay:  rgba(245,246,248,0.7);
}

[data-theme="dark"] {
  --bg:            #0e0f11;
  --bg2:           #141618;
  --surface:       rgba(255,255,255,0.05);
  --surface2:      rgba(255,255,255,0.08);
  --border:        rgba(255,255,255,0.09);
  --text:          #e8eaed;
  --text2:         #b0b6c0;
  --text3:         #636878;
  --shadow:        0 8px 32px rgba(0,0,0,0.55);
  --shadow-sm:     0 4px 12px rgba(0,0,0,0.35);
  --nav-bg:        rgba(14,15,17,0.96);
  --hero-overlay:  rgba(14,15,17,0.55);
}

/* ===== RESET ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:16px; }
body {
  font-family: 'Be Vietnam Pro', 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.4s, color 0.4s;
  min-height: 100vh;
}
body.loading { overflow: hidden; }
a { text-decoration: none; color: inherit; }
img { display:block; max-width:100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* =============================================
   INTRO SPLASH
   ============================================= */
#introSplash {
  position: fixed; inset: 0;
  background: #080909;
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  transition: opacity 0.6s, visibility 0.6s;
}
#introSplash.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-inner {
  text-align: center;
  position: relative;
}

.splash-ring {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent2);
  border-right-color: var(--accent);
  animation: spinRing 1.2s linear infinite;
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
}
@keyframes spinRing { to { transform: translateX(-50%) rotate(360deg); } }

.splash-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 3px solid var(--accent);
  animation: popIn 0.7s cubic-bezier(0.175,0.885,0.32,1.275);
  position: relative; z-index:1;
}
@keyframes popIn { from { transform:scale(0.3); opacity:0; } to { transform:scale(1); opacity:1; } }

.splash-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 26px; font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  animation: fadeUp 0.5s 0.3s both;
}
.splash-sub {
  font-size: 14px; color: #9090bb;
  margin-top: 6px;
  animation: fadeUp 0.5s 0.5s both;
}
.splash-loader {
  margin-top: 24px;
  display: flex; justify-content: center;
  animation: fadeUp 0.5s 0.6s both;
}
.splash-loader span {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  position: relative;
  overflow: hidden;
}
.splash-loader span::after {
  content: '';
  position: absolute; top:0; left:-100%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.6);
  animation: shimmer 1s infinite;
}
@keyframes shimmer { to { left: 100%; } }
@keyframes fadeUp { from { transform:translateY(14px); opacity:0; } to { transform:translateY(0); opacity:1; } }

/* =============================================
   MODAL / POPUP
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 8000;
  padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal-box {
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px 24px;
  width: 100%; max-width: 340px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: popIn 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

.modal-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e2a1e, #2a4a2a);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #3ddc84;
  margin: 0 auto 14px;
}
.modal-icon.android-icon { background: linear-gradient(135deg, #143320, #1e5c2e); color: #3ddc84; }
.modal-icon.apple { background: linear-gradient(135deg, #1a1a1a, #333); color: #e0e0e0; }

.modal-box h3 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 19px; font-weight: 800;
  margin-bottom: 6px;
}
.modal-box p { font-size: 13px; color: var(--text2); font-weight: 500; margin-bottom: 20px; }

/* Horizontal layout (iOS) */
.modal-actions { display: flex; gap: 10px; margin-bottom: 10px; }
/* Vertical layout (Android) */
.modal-actions.vertical { flex-direction: column; gap: 10px; margin-bottom: 10px; }

.modal-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 12px;
  border-radius: 14px;
  font-weight: 700; font-size: 14px;
  transition: filter 0.2s, transform 0.15s;
}
.modal-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.modal-btn.primary   { background: linear-gradient(135deg, #2d7a3a, #3ddc84); color: #fff; }
.modal-btn.secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }

/* Device modal — nút có title + sub text */
.device-btn-text {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: 1;
}
.device-btn-text span { font-size: 14px; font-weight: 700; }
.device-btn-text small { font-size: 11px; opacity: 0.75; font-weight: 400; line-height: 1.3; text-align: left; }

/* GetKey centered below arch buttons */
.modal-getkey-wrap {
  display: flex; justify-content: center;
  margin-bottom: 10px;
}
.modal-getkey-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  border-radius: 99px;
  background: linear-gradient(135deg, #b8860b, #f5c518);
  color: #1a1200;
  font-weight: 700; font-size: 14px;
  transition: filter 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(245,197,24,0.3);
}
.modal-getkey-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.modal-getkey-btn i { font-size: 16px; }

.modal-cancel {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 11px;
  color: var(--danger); font-size: 14px; font-weight: 600;
  border-radius: 12px;
  transition: background 0.2s;
}
.modal-cancel:hover { background: rgba(248,113,113,0.1); }

/* =============================================
   FAB MENU BUTTON
   ============================================= */
.menu-fab {
  position: fixed; top: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), 0 0 0 0 var(--accent-glow);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  z-index: 7000;
  transition: box-shadow 0.3s, transform 0.2s;
}
.menu-fab:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-glow);
}
.menu-fab span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 99px;
  transition: 0.3s;
}
.menu-fab.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-fab.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-fab.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   SIDEBAR NAV
   ============================================= */
#menuOverlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 6500;
  opacity: 0; visibility: hidden;
  transition: 0.35s;
}
#menuOverlay.open { opacity: 1; visibility: visible; }

#sideNav {
  position: fixed; top: 0; right: 0;
  width: 300px; height: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  z-index: 7500;
  display: flex; flex-direction: column;
  padding: 0 0 24px;
  border-radius: 28px 0 0 28px;
}
#sideNav.open { transform: translateX(0); }

.nav-close {
  position: absolute; top: 18px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text);
  transition: background 0.2s;
}
.nav-close:hover { background: rgba(248,113,113,0.15); color: var(--danger); }

.nav-header {
  display: flex; align-items: center; gap: 14px;
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.nav-avatar {
  width: 48px; height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--accent);
}
.nav-name { font-family:'Be Vietnam Pro',sans-serif; font-weight: 700; font-size: 15px; }
.nav-role { font-size: 12px; color: var(--text2); font-weight: 500; margin-top: 2px; }

.nav-links {
  list-style: none;
  padding: 20px 16px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.nav-links a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 600; font-size: 15px;
  color: var(--text2);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.nav-links a:hover {
  background: var(--surface2);
  color: var(--accent2);
  transform: translateX(4px);
}
.nav-links a i { font-size: 18px; width: 24px; }

.nav-footer { padding: 0 16px; }
.theme-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 16px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: 0.2s;
}
.theme-btn:hover { background: var(--accent); color: #fff; }
.theme-btn i { font-size: 18px; }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  padding: 80px 24px 0px;
  text-align: center;
  overflow: hidden;
  min-height: 480px;
  display: flex; align-items: center; justify-content: center;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(154,165,180,0.20) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(203,213,225,0.12) 0%, transparent 60%),
    var(--bg);
  z-index: 0;
}
[data-theme="dark"] .hero-bg {
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(154,165,180,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(203,213,225,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 15% 70%, rgba(100,110,120,0.10) 0%, transparent 60%),
    var(--bg);
}

.hero-content { position: relative; z-index: 1; max-width: 480px; }

.avatar-wrap { position: relative; width: 110px; margin: 0 auto 16px; }
.avatar-glow {
  position: absolute; inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulseGlow 2.5s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.2); opacity: 1; }
}
.hero-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  position: relative; z-index:1;
}

.hero-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px;
  color: var(--text2);
  background: rgba(154,165,180,0.12);
  border: 1px solid rgba(154,165,180,0.25);
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 16px; font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
}

.hero-name {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 32px; font-weight: 800;
  line-height: 1.15;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-wrap: wrap;
}
.verify-badge { width: 28px; }

.hero-typed {
  font-size: 16px; font-weight: 600;
  color: var(--text2);
  min-height: 26px;
  margin-top: 10px;
}


/* =============================================
   QUICK SECTION (SOCIALS + CARDS)
   ============================================= */
.quick-section {
  padding: 0 20px 40px;
  max-width: 520px;
  margin: 0 auto;
}

.socials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.social-pill {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 8px;
  border-radius: 14px;
  font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
  transition: 0.2s;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  color: var(--text);
}
.social-pill span { white-space: nowrap; }
.social-pill i { font-size: 17px; flex-shrink: 0; }
.custom-icon { flex-shrink: 0; }
.custom-icon-img {
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}
.zalo-icon {
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.35em;
  border-radius: 0.45em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0068ff;
  color: #fff;
  font-size: 0.62em;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}
/* YouTube — đỏ */
.social-pill.tiktok   { border-color: rgba(0,0,0,0.15); }
.social-pill.tiktok svg { color: #010101; transition: color 0.2s; }
[data-theme="dark"] .social-pill.tiktok svg { color: #fff; }
[data-theme="dark"] .social-pill.tiktok { border-color: rgba(255,255,255,0.15); }
.social-pill.tiktok:hover { background: #010101; color: #fff; border-color: #010101; }
.social-pill.tiktok:hover svg { color: #fff; }
/* Telegram — xanh dương */
.social-pill.tele   { border-color: rgba(41,182,246,0.25); }
.social-pill.tele i { color: #29b6f6; }
.social-pill.tele:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.social-pill.tele:hover i { color: #fff; }
/* Discord — indigo */
.social-pill.discord   { border-color: rgba(88,101,242,0.25); }
.social-pill.discord i { color: #5865f2; }
.social-pill.discord:hover { background: #5865f2; color: #fff; border-color: #5865f2; }
.social-pill.discord:hover i { color: #fff; }

.quick-cards { display: flex; flex-direction: column; gap: 12px; }
.quick-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
  position: relative;
  overflow: hidden;
}
.quick-card.neon-border::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: conic-gradient(from var(--quick-card-angle), #22d3ee, #a78bfa, #f472b6, #22c55e, #22d3ee);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: quickCardNeon 4s linear infinite;
  pointer-events: none;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quick-card.neon-border:hover { box-shadow: 0 12px 34px rgba(34,211,238,0.14), var(--shadow); }
@property --quick-card-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes quickCardNeon { to { --quick-card-angle: 360deg; } }

.qc-icon {
  width: 62px; height: 62px;
  border-radius: 0;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; color: #cbd5e1;
  flex-shrink: 0;
}
.qc-icon.tg   { background: transparent; color: #38b2f0; }
.qc-icon.shop { background: transparent; color: #4ade80; }
.qc-icon .custom-icon-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 12px;
}
.key-icon-wrap .custom-icon-img, .mod-icon .custom-icon-img, .game-extra-btn .custom-icon-img, .section-label .custom-icon-img, .menu-link .custom-icon-img {
  width: 24px;
  height: 24px;
}
.key-icon-wrap .zalo-icon, .mod-icon .zalo-icon, .qc-icon .zalo-icon {
  font-size: 13px;
}
.qc-icon.vid  { background: transparent; color: #f87171; }

/* ===== GAME EXTRA BUTTONS ===== */
.game-card-wrap {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
}
.game-card-wrap:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.game-card-wrap .game-card { border: none; box-shadow: none; border-radius: 0; }
.game-card-wrap .game-card:first-child { border-radius: 18px 18px 0 0; }

.game-extra-btn {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: rgba(99,102,241,0.07);
  border: none; border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
  color: #818cf8;
  cursor: pointer; transition: 0.2s;
  font-family: inherit; text-align: left;
  text-decoration: none;
}
.game-extra-btn i { font-size: 15px; flex-shrink: 0; }
.game-extra-btn:hover { background: rgba(99,102,241,0.16); color: #a5b4fc; }
.game-extra-btn.note-btn { color: #fb923c; background: rgba(251,146,60,0.07); }
.game-extra-btn.note-btn:hover { background: rgba(251,146,60,0.16); color: #fcd34d; }

.qc-text { flex: 1; }
.qc-text strong { display: block; font-weight: 700; font-size: 15px; }
.qc-text span { font-size: 13px; color: var(--text2); font-weight: 500; line-height: 1.35; }
.qc-arrow { color: var(--text3); font-size: 18px; }

/* =============================================
   CONTENT SECTIONS (GAMES / KEYS / IPA)
   ============================================= */
.content-section {
  padding: 32px 20px 48px;
  background: var(--bg2);
}
.content-section:first-of-type { border-radius: 32px 32px 0 0; margin-top: 0; }
.content-section.alt { background: var(--bg); }

[data-theme="dark"] .content-section { background: #111318; }
[data-theme="dark"] .content-section.alt { background: #0e0f11; }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: #5aabf5;
  background: rgba(26,111,191,0.10);
  border: 1px solid rgba(26,111,191,0.22);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 26px; font-weight: 800;
  margin-bottom: 18px;
}

/* ===== GAME GRID ===== */
.game-grid {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 520px; margin: 0 auto;
}

.game-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
  cursor: pointer;
}
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(154,165,180,0.35); }

.game-thumb {
  width: 54px; height: 54px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.game-info { flex: 1; min-width: 0; }
.game-name {
  font-weight: 700; font-size: 14px;
  white-space: normal; word-break: break-word;
  line-height: 1.35;
  margin-bottom: 3px;
}
.game-meta {
  font-size: 12px; color: var(--text2);
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 6px;
}
.game-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #5aabf5; flex-shrink: 0; }

/* Hàng ngang: badge platform + nút preview */
.game-row-badges {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}

/* Platform badge */
.platform-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  flex-shrink: 0;
}
.platform-badge.ios {
  background: rgba(26,111,191,0.13);
  color: #5aabf5;
  border: 1px solid rgba(26,111,191,0.25);
}
.platform-badge.android {
  background: rgba(61,220,132,0.12);
  color: #3ddc84;
  border: 1px solid rgba(61,220,132,0.22);
}

/* Preview button — nhỏ pill, cạnh badge */
.game-preview-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; height: 22px;
  border-radius: 99px;
  background: rgba(90,171,245,0.12);
  border: 1px solid rgba(90,171,245,0.30);
  font-size: 10px; font-weight: 700;
  color: #5aabf5; white-space: nowrap;
  transition: 0.2s; cursor: pointer;
}
.game-preview-btn i { font-size: 11px; color: #5aabf5; }
.game-preview-btn:hover {
  background: rgba(90,171,245,0.22);
  border-color: rgba(90,171,245,0.55);
  color: #7dc8ff;
}
.game-preview-btn:hover i { color: #7dc8ff; }
.preview-count {
  background: rgba(90,171,245,0.25); color: #5aabf5;
  border-radius: 99px; padding: 0 4px;
  font-size: 9px; font-weight: 800;
}

/* Download button — far right */
.game-dl-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff;
  flex-shrink: 0; transition: 0.2s;
}
.game-dl-btn.ios {
  background: linear-gradient(135deg, #0a3a6e, #1a6fbf);
  box-shadow: 0 4px 14px rgba(26,111,191,0.40);
}
.game-dl-btn.android {
  background: linear-gradient(135deg, #143320, #1e7a3a);
  box-shadow: 0 4px 14px rgba(61,220,132,0.35);
}
.game-card:hover .game-dl-btn { transform: scale(1.07); }


/* ===== IMAGE PREVIEW MODAL ===== */
#imgPreviewModal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  z-index: 9500;
  padding: 20px;
}
#imgPreviewModal.show { display: flex; }

.img-preview-box {
  position: relative;
  max-width: 340px; width: 100%;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  animation: popIn 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.img-preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.img-preview-title {
  font-weight: 700; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 240px;
}
.img-preview-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text3);
  flex-shrink: 0; cursor: pointer;
  transition: 0.2s;
}
.img-preview-close:hover { background: rgba(248,113,113,0.15); color: var(--danger); }

.img-preview-slider {
  position: relative; overflow: hidden;
  background: #000;
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.img-preview-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  width: 100%;
}
.img-preview-track img {
  width: 100%; flex-shrink: 0;
  object-fit: contain;
  max-height: 440px;
  display: block;
}
.img-preview-track .preview-placeholder {
  width: 100%; flex-shrink: 0;
  height: 240px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text3); font-size: 14px; gap: 8px;
}
.img-preview-track .preview-placeholder i { font-size: 40px; opacity: 0.4; }

/* Dots */
.img-preview-dots {
  display: flex; justify-content: center; gap: 6px;
  padding: 10px;
}
.img-dot {
  width: 6px; height: 6px; border-radius: 99px;
  background: var(--border);
  transition: 0.2s; cursor: pointer;
}
.img-dot.active { background: #5aabf5; width: 18px; }

/* Prev / Next arrows — to hơn, rõ hơn */
.img-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff;
  cursor: pointer; z-index: 2;
  transition: background 0.2s, transform 0.15s;
  border: 1.5px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
}
.img-nav-btn:hover {
  background: rgba(90,171,245,0.75);
  transform: translateY(-50%) scale(1.08);
  border-color: rgba(90,171,245,0.5);
}
.img-nav-btn.prev { left: 10px; }
.img-nav-btn.next { right: 10px; }

/* Bộ đếm ảnh hiện tại / tổng — trên ảnh */
.img-counter {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
  z-index: 2;
  pointer-events: none;
  letter-spacing: 0.5px;
}

/* Mô tả app ở footer modal */
.img-preview-desc {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  line-height: 1.55;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}

/* ===== KEY GRID ===== */
.key-grid {
  display: flex; flex-direction: column; gap: 14px;
  max-width: 520px; margin: 0 auto;
}

.key-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
}
.key-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.key-card a { color: inherit; }

.key-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
  flex-shrink: 0;
}
.key-icon-wrap.ios     { background: linear-gradient(135deg, #0a3a6e, #1a6fbf); }  /* iOS — xanh dương */
.key-icon-wrap.android { background: linear-gradient(135deg, #143320, #1e7a3a); }  /* Android — xanh lá */
.key-icon-wrap.shop    { background: linear-gradient(135deg, #10b981, #34d399); }  /* Shop — mint */
.key-icon-wrap.gold    { background: linear-gradient(135deg, #b8860b, #f5c518); }  /* Gold */

.key-info { flex: 1; }
.key-name { font-weight: 700; font-size: 15px; }
.key-desc { font-size: 12px; color: var(--text2); font-weight: 500; margin-top: 3px; }

.key-action {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #5aabf5;
  flex-shrink: 0;
  transition: 0.2s;
}
.key-card:hover .key-action { background: #1a6fbf; color: #fff; border-color: #1a6fbf; }

/* Spinning key animation */
.spin { animation: keySpin 2.5s linear infinite; display: inline-block; }
@keyframes keySpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =============================================
   HELP SECTION
   ============================================= */
.help-section {
  display: flex; justify-content: center; gap: 16px;
  padding: 36px 20px;
  flex-wrap: wrap;
}

.help-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: 0.25s;
  color: var(--text);
  font-weight: 600; font-size: 14px;
  min-width: 130px;
}
.help-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(154,165,180,0.30); }
.help-img { width: 48px; height: 48px; object-fit: contain; }
[data-theme="dark"] .help-img { filter: invert(1) brightness(1.3); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg2);
  padding: 32px 20px 48px;
  text-align: center;
}
[data-theme="dark"] .footer { background: rgba(0,0,0,0.3); }

.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.footer-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); margin-bottom: 4px; }
.footer p { font-weight: 600; font-size: 14px; color: var(--text2); }
.footer-sub { font-size: 13px; color: var(--text2); font-weight: 500; }

/* =============================================
   MOD FILES SECTION
   ============================================= */
.mod-grid {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 520px; margin: 0 auto;
}

.mod-card-wrap {
  display: flex; flex-direction: column; gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
}
.mod-card-wrap:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.mod-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  text-decoration: none;
  transition: 0.2s;
}
.mod-card:hover { background: var(--surface2); }

.mod-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e1b4b, #3730a3);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #a5b4fc;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.mod-icon.zip  { background: linear-gradient(135deg, #1e1b4b, #3730a3); color: #a5b4fc; }
.mod-icon.ios  { background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #7dd3fc; }

.mod-info { flex: 1; min-width: 0; }
.mod-name {
  font-weight: 700; font-size: 14px;
  white-space: normal; word-break: break-word;
  line-height: 1.35; margin-bottom: 3px;
}
.mod-meta {
  font-size: 12px; color: var(--text2); font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 5px;
}
.mod-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #a5b4fc; flex-shrink: 0; }
.mod-desc { font-size: 11px; color: var(--text3); margin-top: 2px; line-height: 1.4; }

.mod-dl-btn {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e1b4b, #3730a3);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff;
  flex-shrink: 0; transition: 0.2s;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.mod-card-wrap:hover .mod-dl-btn { transform: scale(1.07); }

/* Nút Fix Trận Ảo — nằm dưới card */
.mod-guide-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px;
  background: rgba(99,102,241,0.08);
  border: none;
  border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 700;
  color: #818cf8;
  cursor: pointer; transition: 0.2s;
  font-family: inherit;
}
.mod-guide-btn i { font-size: 15px; }
.mod-guide-btn:hover { background: rgba(99,102,241,0.16); color: #a5b4fc; }

/* Guide modal */
.guide-modal-box {
  max-width: 420px !important;
  padding: 0 !important;
  overflow: hidden;
  max-height: 85vh;
  display: flex; flex-direction: column;
}
.guide-modal-box .img-preview-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.guide-modal-body {
  overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.guide-step {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.guide-step-heading {
  font-size: 13px; font-weight: 800;
  color: #818cf8;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.guide-step-body {
  font-size: 13px; font-weight: 500;
  color: var(--text2);
  line-height: 1.55;
}

/* =============================================
   VIDEO GUIDE SECTION
   ============================================= */
.vid-grid {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 520px; margin: 0 auto;
}

/* Wrapper khi có note bên dưới */
.vid-card-wrap {
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
}
.vid-card-wrap:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.vid-card-wrap .vid-card { border: none; box-shadow: none; border-radius: 0; }

/* Note dưới vid card */
.vid-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px;
  background: rgba(251,191,36,0.08);
  border-top: 1px solid rgba(251,191,36,0.20);
  font-size: 12px; font-weight: 500;
  color: #d97706; line-height: 1.5;
}
.vid-note i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
[data-theme="dark"] .vid-note { color: #fbbf24; }

.vid-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: 0.25s;
  cursor: pointer;
}
.vid-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(239,68,68,0.35); }

.vid-thumb-wrap {
  width: 80px; height: 54px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: #000;
}
.vid-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.vid-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e1b4b, #3730a3);
  font-size: 28px; color: #a5b4fc;
}
.vid-thumb-fallback {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}
.vid-play-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  font-size: 22px; color: #fff;
  transition: background 0.2s;
}
.vid-card:hover .vid-play-icon { background: rgba(239,68,68,0.65); }
.vid-play-icon.external { background: rgba(41,182,246,0.5); }
.vid-card:hover .vid-play-icon.external { background: rgba(0,136,204,0.75); }

.vid-info { flex: 1; min-width: 0; }
.vid-name {
  font-weight: 700; font-size: 14px;
  white-space: normal; word-break: break-word;
  line-height: 1.35; margin-bottom: 3px;
}
.vid-meta { font-size: 12px; color: var(--text2); font-weight: 500; }

/* Video modal */
.video-modal-box {
  max-width: 480px !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 24px;
}
.video-modal-box .img-preview-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.video-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  /* height set dynamically, but keep aspect ratio */
  aspect-ratio: 16 / 9;
}
.video-container iframe,
.video-container video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; display: block;
  background: #000;
}

/* Custom video overlay — nút play lớn, YouTube-style */
.vid-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.vid-overlay:hover { background: rgba(0,0,0,0.15); }
.vid-overlay.hidden { display: none; }

.vid-play-big {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
  transition: transform 0.15s;
}
.vid-play-big i { font-size: 28px; color: #111; margin-left: 4px; }
.vid-overlay:hover .vid-play-big { transform: scale(1.1); }

/* Poster / thumbnail shown before play */
.vid-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.vid-poster-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0f0f1a, #1a1a3e);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; z-index: 1;
}
.vid-poster-placeholder i { font-size: 42px; color: #4f46e5; opacity: 0.7; }
.vid-poster-placeholder span { font-size: 13px; color: #94a3b8; font-weight: 600; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 600px) {
  .hero-name { font-size: 38px; }
  .game-grid, .key-grid, .ipa-grid { max-width: 560px; }
}

@media (min-width: 900px) {
  .game-grid, .key-grid, .ipa-grid { max-width: 680px; }
}

/* =============================================
   CLOCK WIDGET — góc trên trái
   Màu thay đổi theo buổi: sáng/trưa/chiều/tối/khuya
   ============================================= */
.clock-widget {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 6100;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 99px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 1.2s ease, border-color 1.2s ease, box-shadow 1.2s ease;
  cursor: default;
  overflow: hidden;
}

/* Greeting text — hiện lúc vừa vào, rồi ẩn */
.clock-greeting {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  transition: max-width 0.8s ease, opacity 0.8s ease, margin 0.8s ease;
  opacity: 1;
}
.clock-greeting.hide {
  max-width: 0;
  opacity: 0;
  margin: 0;
}

/* Giờ thật */
.clock-time {
  font-size: 13px; font-weight: 800;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Icon buổi — Bootstrap Icons */
.clock-period-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.clock-period-icon i { font-size: 16px; line-height: 1; }

/* ===== CLOCK — icon màu theo buổi ===== */
.clock-widget.period-midnight  .clock-period-icon i { color: #94a3b8; }
.clock-widget.period-dawn      .clock-period-icon i { color: #60a5fa; }
.clock-widget.period-morning   .clock-period-icon i { color: #d97706; }
.clock-widget.period-noon      .clock-period-icon i { color: #ea580c; }
.clock-widget.period-afternoon .clock-period-icon i { color: #059669; }
.clock-widget.period-evening   .clock-period-icon i { color: #7c3aed; }
.clock-widget.period-night     .clock-period-icon i { color: #6366f1; }

/* Nền + chữ dùng CSS var — tự đổi theo dark/light, không hardcode màu chữ */
.clock-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.clock-greeting { color: var(--text2); }
.clock-time     { color: var(--text);  }

/* Chỉ tô viền + glow nhẹ theo buổi */
.clock-widget.period-dawn      { border-color: rgba(96,165,250,0.45);  box-shadow: 0 4px 16px rgba(96,165,250,0.18);  }
.clock-widget.period-morning   { border-color: rgba(217,119,6,0.45);   box-shadow: 0 4px 16px rgba(217,119,6,0.18);   }
.clock-widget.period-noon      { border-color: rgba(234,88,12,0.45);   box-shadow: 0 4px 16px rgba(234,88,12,0.18);   }
.clock-widget.period-afternoon { border-color: rgba(5,150,105,0.45);   box-shadow: 0 4px 16px rgba(5,150,105,0.18);   }
.clock-widget.period-evening   { border-color: rgba(124,58,237,0.45);  box-shadow: 0 4px 16px rgba(124,58,237,0.18);  }
.clock-widget.period-night     { border-color: rgba(99,102,241,0.45);  box-shadow: 0 4px 16px rgba(99,102,241,0.18);  }
.clock-widget.period-midnight  { border-color: rgba(148,163,184,0.30); box-shadow: 0 4px 16px rgba(0,0,0,0.18);       }

/* Music toggle, shown after first user interaction */
.music-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 6990;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.music-fab i { font-size: 17px; color: var(--accent2); }
.music-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent); }
.music-fab.playing { border-color: rgba(52,211,153,0.45); box-shadow: 0 6px 18px rgba(52,211,153,0.18); }
.music-fab.playing i { color: var(--success); }
