/* =====================================================================
   HỒI ỨC 9X — PORTAL KIẾM HIỆP HOÀI NIỆM (PORTAL.CSS)
   Phong cách Cổ Phong Hoàng Kim • Tối Ưu Hóa Mọi Màn Hình Mobile & PC
   ===================================================================== */

:root {
  --gold-primary: #f5cf6d;
  --gold-light: #fff2b8;
  --gold-dark: #b8860b;
  --gold-gradient: linear-gradient(135deg, #fff3b3 0%, #e6b843 50%, #9e6f12 100%);
  --crimson-gradient: linear-gradient(135deg, #ff7a66 0%, #d83228 50%, #7a1510 100%);
  --bg-deep: #07090c;
  --bg-panel: rgba(16, 21, 28, 0.85);
  --bg-panel-hover: rgba(22, 29, 39, 0.95);
  --border-gold: rgba(245, 207, 109, 0.35);
  --border-gold-glow: rgba(245, 207, 109, 0.75);
  --border-crimson-glow: rgba(230, 60, 50, 0.75);
  --text-main: #f0ebe1;
  --text-muted: #a89f91;
  --text-gold: #f7d274;
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 207, 109, 0.08);
  --font-serif: 'Cinzel', 'Playfair Display', serif;
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Nền tối kiếm hiệp với họa tiết cổ phong */
body {
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(245, 207, 109, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(216, 50, 40, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #07090c 0%, #0d1218 50%, #07090c 100%);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Canvas hiệu ứng tàn lửa / cánh hoa bay */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
}

/* Wrapper chính */
.portal-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* =====================================================================
   TOPBAR
   ===================================================================== */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(14, 18, 25, 0.75);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-crest {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(245, 207, 109, 0.6));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold-primary);
  font-weight: 700;
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(10, 14, 20, 0.8);
  border: 1px solid rgba(76, 175, 80, 0.4);
  border-radius: 30px;
  font-size: 12px;
  color: #a5d6a7;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4caf50;
  box-shadow: 0 0 10px #4caf50;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

.btn-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(245, 207, 109, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: 30px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-sound-toggle:hover {
  background: rgba(245, 207, 109, 0.25);
  border-color: var(--gold-primary);
  transform: translateY(-1px);
}

.btn-fullscreen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(229, 57, 53, 0.18);
  border: 1px solid rgba(229, 57, 53, 0.6);
  border-radius: 30px;
  color: #ff8a80;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-fullscreen-toggle:hover {
  background: rgba(229, 57, 53, 0.35);
  border-color: #ff5252;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(229, 57, 53, 0.5);
}

.btn-fullscreen-toggle.is-fullscreen {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.6);
  color: #a5d6a7;
}

/* =====================================================================
   HERO SECTION
   ===================================================================== */
.portal-hero {
  text-align: center;
  padding: 24px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-crest {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
  position: relative;
}

.title-glow {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(245, 207, 109, 0.45));
}

.hero-subtitle {
  max-width: 780px;
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-features-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(22, 28, 38, 0.6);
  border: 1px solid rgba(245, 207, 109, 0.25);
  border-radius: 20px;
  font-size: 13px;
  color: #dcd6c8;
  font-weight: 600;
}

.ft-icon {
  font-size: 14px;
}

/* =====================================================================
   2 BẢNG GIỚI THIỆU GAME (GAMES CONTAINER)
   ===================================================================== */
.games-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 10px;
}

.game-card {
  position: relative;
  background: var(--bg-panel);
  border: 1.5px solid var(--border-gold);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.8), 0 0 28px rgba(245, 207, 109, 0.18);
}

.card-idle:hover {
  border-color: var(--border-gold-glow);
}

.card-sinhton:hover {
  border-color: var(--border-crimson-glow);
}

/* Huy hiệu thẻ game */
.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.card-badge.gold {
  background: rgba(245, 207, 109, 0.18);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(245, 207, 109, 0.25);
}

.card-badge.crimson {
  background: rgba(216, 50, 40, 0.2);
  border: 1px solid #ff6e65;
  color: #ffb4af;
  box-shadow: 0 0 12px rgba(216, 50, 40, 0.35);
}

/* Khung ảnh Poster đại diện */
.card-visual {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(245, 207, 109, 0.2);
}

.poster-frame {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #0d1217;
}

.game-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.game-card:hover .game-poster {
  transform: scale(1.04);
}

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 12, 0.1) 0%, rgba(7, 9, 12, 0.8) 100%);
}

.poster-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Nội dung bài giới thiệu */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.game-type-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.chip-crimson {
  color: #ff857d;
}

.game-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  line-height: 1.2;
}

.game-tagline {
  font-size: 14px;
  color: var(--text-gold);
  font-style: italic;
  margin-top: 4px;
}

/* Danh sách tính năng nổi bật */
.game-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid rgba(245, 207, 109, 0.15);
  border-radius: 12px;
  font-size: 13.5px;
}

.game-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.hl-bullet {
  font-size: 16px;
  line-height: 1.3;
  flex-shrink: 0;
}

.game-highlights strong {
  color: var(--gold-light);
}

/* Nền tảng & Cổng nội bộ */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.platform-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  color: #d1cabe;
}

.direct-link-note {
  display: none !important;
}

/* Nút hành động */
.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.btn-play-gold {
  background: var(--gold-gradient);
  color: #1a1303;
  border: 1px solid #ffd54f;
  box-shadow: 0 6px 22px rgba(230, 184, 67, 0.35);
}

.btn-play-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(230, 184, 67, 0.55);
  filter: brightness(1.08);
}

.btn-play-crimson {
  background: var(--crimson-gradient);
  color: #ffffff;
  border: 1px solid #ff7b72;
  box-shadow: 0 6px 22px rgba(216, 50, 40, 0.4);
}

.btn-play-crimson:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(216, 50, 40, 0.65);
  filter: brightness(1.1);
}

.btn-arrow {
  transition: transform 0.25s ease;
}

.btn-play:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-detail {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 207, 109, 0.3);
  border-radius: 12px;
  color: var(--gold-light);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-detail:hover {
  background: rgba(245, 207, 109, 0.15);
  border-color: var(--gold-primary);
  color: #ffffff;
}

/* =====================================================================
   KHUNG CHIA SẺ VÀ MÃ QR TRANG CHỦ (SHARE BOX)
   ===================================================================== */
.portal-share-box {
  background: rgba(14, 19, 26, 0.88);
  border: 1.5px solid var(--border-gold);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.6), 0 0 18px rgba(245, 207, 109, 0.08);
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(245, 207, 109, 0.2);
  padding-bottom: 14px;
}

.share-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.share-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #ffffff;
}

.share-content-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.share-info-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.domain-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.domain-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.domain-link {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  word-break: break-all;
  display: inline-block;
  transition: filter 0.25s ease;
}

.domain-link:hover {
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(245, 207, 109, 0.5));
}

.share-desc {
  font-size: 14px;
  color: #d1c9b8;
  line-height: 1.6;
}

.share-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(245, 207, 109, 0.18);
  border: 1px solid var(--gold-primary);
  border-radius: 20px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-copy:hover {
  background: rgba(245, 207, 109, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 207, 109, 0.3);
}

.btn-download-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--gold-gradient);
  color: #121820;
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-download-qr:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 207, 109, 0.35);
}

/* Khung Mã QR */
.share-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-frame {
  width: 140px;
  height: 140px;
  padding: 8px;
  background: #ffffff;
  border: 2px solid var(--gold-primary);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 207, 109, 0.3);
  display: grid;
  place-items: center;
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.qr-caption {
  font-size: 11.5px;
  color: var(--gold-light);
  font-weight: 600;
  text-align: center;
}

/* =====================================================================
   BANNER TỰ ĐỘNG HỎI CÀI ĐẶT RA MÀN HÌNH CHÍNH (PWA)
   ===================================================================== */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 28px));
  background: rgba(14, 18, 25, 0.96);
  border: 1.5px solid var(--gold-primary);
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.85), 0 0 24px rgba(245, 207, 109, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  overflow: hidden;
  animation: slideBannerUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-banner[hidden] {
  display: none !important;
}

@keyframes slideBannerUp {
  from { transform: translate(-50%, 60px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-progress-bar {
  height: 3px;
  background: var(--gold-gradient);
  width: 100%;
  transition: width 0.1s linear;
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.pwa-banner-icon {
  font-size: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(245, 207, 109, 0.5));
}

.pwa-banner-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.pwa-banner-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1.3;
}

.pwa-banner-sub {
  font-size: 12px;
  color: #ccc3b0;
  line-height: 1.4;
}

.pwa-banner-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pwa-action {
  padding: 9px 16px;
  background: var(--gold-gradient);
  color: #121820;
  border: 1px solid #ffd54f;
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(245, 207, 109, 0.35);
  transition: all 0.2s ease;
}

.btn-pwa-action:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-pwa-dismiss {
  background: none;
  border: none;
  color: #9c9383;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.btn-pwa-dismiss:hover {
  color: #ffffff;
}

/* Các bước cài đặt trên iPhone / iPad */
.ios-steps-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 16px 0;
}

.ios-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 207, 109, 0.2);
  border-radius: 10px;
  font-size: 13.5px;
}

.ios-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #121820;
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.portal-footer {
  text-align: center;
  padding: 20px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #7d7568;
  font-size: 13px;
}

.footer-dragon-divider {
  color: var(--gold-primary);
  font-size: 14px;
  letter-spacing: 6px;
  margin-bottom: 4px;
  opacity: 0.6;
}

.footer-copy strong {
  color: var(--gold-light);
}

/* =====================================================================
   MODAL POPUP
   ===================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

.modal-backdrop[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: #0f141d;
  border: 1.5px solid var(--border-gold);
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 207, 109, 0.2);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(245, 207, 109, 0.2);
  background: rgba(22, 29, 39, 0.7);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold-light);
}

.modal-close {
  background: none;
  border: none;
  color: #aaa093;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #dfd8cc;
}

.modal-section h4 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.modal-section ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(245, 207, 109, 0.2);
  background: rgba(22, 29, 39, 0.7);
}

/* Toast */
.portal-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 25, 0.95);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(245, 207, 109, 0.3);
  z-index: 99999;
  animation: fadeIn 0.2s ease;
}

.portal-toast[hidden] {
  display: none !important;
}

/* =====================================================================
   RESPONSIVE DESIGN (TỐI ƯU MOBILE & TABLET)
   ===================================================================== */
@media (max-width: 960px) {
  .games-container {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }

  .share-content-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .share-actions-row {
    justify-content: center;
  }

  .portal-hero {
    padding-top: 14px;
  }
}

@media (max-width: 600px) {
  .portal-wrapper {
    padding: 12px 14px 30px;
    gap: 20px;
  }

  .portal-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .brand-title {
    font-size: 17px;
  }

  .server-pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  .btn-sound-toggle,
  .btn-fullscreen-toggle {
    padding: 4px 10px;
    font-size: 11px;
  }

  .hero-title {
    font-size: 36px;
    letter-spacing: 2px;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .card-visual {
    height: 180px;
  }

  .game-card {
    padding: 18px 16px;
  }

  .game-title {
    font-size: 23px;
  }

  .card-actions {
    grid-template-columns: 1fr;
  }

  .btn-detail {
    text-align: center;
    padding: 10px 14px;
  }

  .btn-play {
    padding: 12px 16px;
    font-size: 14px;
  }
}

