/* 8386 homepage visual override v1
 * Load AFTER /includes/css/styles.css.  This file only changes presentation;
 * it deliberately preserves existing PHP routes, data attributes, and JS classes.
 */

:root {
  --v2-page: #0b0e16;
  --v2-panel: #161b29;
  --v2-panel-2: #20283a;
  --v2-line: rgba(202, 214, 255, .16);
  --v2-text: #f5f7ff;
  --v2-muted: #aeb8d1;
  --v2-primary: #5b6df8;
  --v2-primary-2: #3f50d7;
  --v2-register: #e9587d;
  --v2-register-2: #c83c62;
  --v2-gold: #ffd56a;
  --v2-radius: 14px;
  --v2-shadow: 0 18px 45px rgba(0, 0, 0, .32);
}

body {
  background: radial-gradient(circle at 50% -10%, #283874 0, #11182b 31%, var(--v2-page) 70%) fixed !important;
  color: var(--v2-text);
}

.box {
  /* This is a mobile-first landing page; on desktop it remains an intentional, centered campaign column. */
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

/* Brand and language are one calm utility area; it never overlays buttons. */
.topLogo {
  position: relative;
  width: min(310px, 62vw);
  margin: 0 auto 18px;
  text-align: center;
  z-index: 10;
}
.topLogo .logo-pc { width: 100%; max-height: 190px; object-fit: contain; animation: none !important; }
.topLogo .navbar-lan {
  position: absolute;
  right: -104px;
  top: 4px;
  min-width: 92px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--v2-line);
  border-radius: 999px;
  background: rgba(18, 24, 39, .82);
  color: var(--v2-text);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.topLogo .navbar-lan::after { display: none; }
.topLogo .navbar-lan .current-language { display: inline-block; color: var(--v2-text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.topLogo .navbar-lan:hover { border-color: rgba(153, 173, 255, .72); }
.topLogo #lanBox { position: absolute; right: -104px; top: 48px; min-width: 124px; z-index: 30; }
.topLogo .lanShow { margin: 0; padding: 6px; list-style: none; border: 1px solid var(--v2-line); border-radius: 12px; background: #171d2c; box-shadow: var(--v2-shadow); }
.topLogo .lanShow li { padding: 9px 11px; border-radius: 8px; color: var(--v2-muted); font-size: 13px; }
.topLogo .lanShow li:hover, .topLogo .lanShow li.active { background: rgba(91,109,248,.23); color: #fff; }

.logo-figure, .blingbling-box, .imgAd-box-pc { display: none !important; }

/* One clear mobile-first flow on every screen: actions, downloads, recharge, then games.
 * The previous three-column desktop layout is intentionally not used. */
.box-info {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "left" "right" "center";
  align-items: start;
  gap: 14px;
  margin: 0;
}
.box-L, .box-R, .box-C { max-width: none !important; width: auto !important; margin: 0 !important; }
.box-L { grid-area: left; position: static !important; display: block !important; order: initial !important; padding: 0 !important; }
.box-R { grid-area: right; position: static !important; display: block !important; order: initial !important; padding: 0 !important; }
.box-C { grid-area: center; order: initial !important; min-width: 0; }

.player_infoBox, .load-box, .VIP-area, .main-box {
  border: 1px solid var(--v2-line) !important;
  border-radius: var(--v2-radius) !important;
  background: linear-gradient(145deg, rgba(31, 39, 58, .96), rgba(15, 19, 30, .96)) !important;
  box-shadow: var(--v2-shadow) !important;
}
.player_infoBox { position: static !important; display: grid !important; grid-template-columns: 1fr 1.25fr; gap: 10px; width: 100% !important; margin: 0 !important; padding: 12px !important; }
.player_info_btnIn, .register_homeBtn_M {
  min-height: 46px;
  border: 0 !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-decoration: none !important;
  transition: transform .16s ease, filter .16s ease;
}
.player_info_btnIn { width: 100% !important; margin: 0 !important; background: linear-gradient(135deg, var(--v2-primary), var(--v2-primary-2)) !important; color: #fff !important; }
.register_homeBtn { position: static !important; display: block !important; width: 100%; height: auto !important; margin: 0 !important; background: transparent !important; }
.register_homeBtn_L, .register_homeBtn_R { display: none !important; }
.register_homeBtn_M { width: 100%; background: linear-gradient(135deg, var(--v2-register), var(--v2-register-2)) !important; color: #fff !important; cursor: pointer; box-shadow: 0 9px 22px rgba(222, 69, 109, .25); }
.player_info_btnIn:hover, .register_homeBtn_M:hover { color: #fff !important; filter: brightness(1.08); transform: translateY(-1px); }

.media-box { position: static !important; width: auto !important; margin-top: 12px; border: 0 !important; background: transparent !important; }
.media-box ul { display: flex !important; justify-content: center; margin: 0; padding: 0; list-style: none; }
.media-box ul li { flex: 0 0 auto !important; max-width: none !important; padding: 0 !important; }
.media-box img { width: 42px; border: 0 !important; border-radius: 10px !important; }

.load-box { position: static !important; width: 100% !important; margin: 0 !important; padding: 12px !important; }
.load-box ul { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.load-box ul li { max-width: none !important; padding: 0 !important; }
.load-box ul li img { display: block; width: 100%; border: 1px solid rgba(255,255,255,.14) !important; border-radius: 9px !important; }

.VIP-area { margin-top: 12px; padding: 14px !important; }
.VIP-area .row { display: grid !important; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.VIP-title { grid-column: 1 / -1; color: var(--v2-gold); font-size: 14px; font-weight: 800; text-align: left; }
.VIP-area .col-md-12 { display: contents; }
.VIP-area .mb-3 { width: auto !important; margin: 0 !important; }
.VIP-area .form-control { min-height: 40px; border: 1px solid rgba(166,181,255,.18) !important; border-radius: 9px; background: #293249 !important; color: #fff !important; }
.VIP-area .btn-warning { min-width: 72px; min-height: 40px; border: 0; border-radius: 9px; background: var(--v2-primary) !important; color: #fff !important; }

/* The central content becomes the visual focus. */
.main-box { margin: 0 !important; overflow: hidden; }
.tabSet { display: grid !important; grid-auto-flow: column; grid-auto-columns: 1fr; overflow-x: auto; border: 0 !important; background: rgba(255,255,255,.025); scrollbar-width: none; }
.tabSet::-webkit-scrollbar { display: none; }
.tabSet .nav-item { min-width: 118px; }
.tabSet .nav-link, .tabSet li:nth-child(2) .nav-link { min-height: 54px; border: 0 !important; border-bottom: 2px solid transparent !important; background: transparent !important; color: var(--v2-muted) !important; font-size: 14px; font-weight: 700; }
.tabSet .nav-link.active, .tabSet li:nth-child(2) .nav-link.active, .tabSet .nav-link:hover { border-bottom-color: var(--v2-primary) !important; background: rgba(91,109,248,.13) !important; color: #fff !important; }
.main-tab-info { padding: 18px; }

.title-boxSet { width: 100%; margin: 0 auto 18px !important; color: var(--v2-text); font-size: clamp(16px, 1.35vw, 20px); font-weight: 700; line-height: 1.6; text-align: center; }
ul.gameImg { width: 100% !important; gap: 14px; justify-content: stretch !important; }
.gameImg li { flex: 0 0 calc(50% - 7px) !important; max-width: calc(50% - 7px) !important; padding: 0 !important; overflow: visible !important; border: 1px solid var(--v2-line); border-radius: 12px; background: #1a2030; }
.gameImg li > a { display: block; overflow: hidden; border-radius: 11px 11px 0 0; }
.gameImg li > a img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .22s ease; }
.gameImg li:hover > a img { transform: scale(1.035); }
.gameNam { min-height: 45px; display: flex; align-items: center; justify-content: center; padding: 8px 34px 8px 10px !important; color: var(--v2-text) !important; font-size: 14px !important; }
.gameNam a { color: inherit !important; text-decoration: none !important; }
.icon-hot { top: 9px !important; right: 8px !important; width: auto !important; }
.icon-hot img { width: 42px !important; }
.gameTxt { display: none !important; }

.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: flex; justify-content: space-between; gap: 14px; padding: 13px 12px; border-bottom: 1px solid var(--v2-line); color: var(--v2-muted); cursor: pointer; }
.news-list li:hover { background: rgba(91,109,248,.09); color: #fff; }
.news-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-date { flex: 0 0 auto; font-size: 12px; opacity: .75; }

.copyright { margin-top: 26px; border-top: 1px solid var(--v2-line); background: transparent !important; color: var(--v2-muted); }

@media (max-width: 915px) {
  .box { width: min(560px, calc(100% - 24px)); padding-top: 14px; }
  .topLogo { width: min(190px, 52vw); margin-bottom: 12px; }
  .topLogo .logo-pc { max-height: 122px; }
  .topLogo .navbar-lan { right: -86px; top: 0; min-width: 82px; padding: 9px 10px; }
  .topLogo .navbar-lan .current-language { font-size: 12px; }
  .topLogo #lanBox { right: -78px; top: 44px; }
  .box-info { grid-template-columns: 1fr; grid-template-areas: "left" "right" "center"; gap: 12px; }
  .box-L { display: block !important; }
  .media-box { margin-top: 0; }
  .media-box img { width: 38px; }
  .load-box ul { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .VIP-area .row { grid-template-columns: 1fr 1fr auto; }
  .main-tab-info { padding: 14px 10px; }
  ul.gameImg { gap: 10px; }
  .gameImg li { flex-basis: calc(50% - 5px) !important; max-width: calc(50% - 5px) !important; }
}

@media (max-width: 460px) {
  .box { width: calc(100% - 16px); }
  .box-L { display: block !important; }
  .player_infoBox { grid-template-columns: 1fr 1.18fr; padding: 10px !important; }
  .player_info_btnIn, .register_homeBtn_M { min-height: 41px; font-size: 14px; }
  .VIP-area { padding: 10px !important; }
  .VIP-area .row { grid-template-columns: 1fr 1fr 64px; gap: 6px; }
  .VIP-area .form-control { min-width: 0; padding: 7px !important; font-size: 12px !important; }
  .VIP-area .btn-warning { min-width: 0; padding: 0 6px; font-size: 13px; }
  .tabSet .nav-item { min-width: 105px; }
  .tabSet .nav-link { min-height: 48px; padding: 6px !important; font-size: 13px !important; }
  .title-boxSet { margin-bottom: 12px !important; font-size: 15px; }
  .gameNam { min-height: 40px; font-size: 13px !important; }
}

/* --------------------------------------------------------------------------
   V3 structural layout: top.php / main.php / middle.php / home_footer.php
   Desktop-first at 1024px, then tablet and phone. Load this file LAST.
   -------------------------------------------------------------------------- */
.home-v3 { width: min(560px, calc(100% - 24px)) !important; max-width: none !important; padding-top: 18px !important; }
.home-v3 .imgAd-box-pc, .home-v3 .blingbling-box, .home-v3 .logo-figure { display: none !important; }
.home-header { display: grid; grid-template-areas: "logo language" "actions actions"; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.home-header .topLogo { grid-area: logo; position: static; width: min(180px, 48vw); margin: 0; text-align: left; }
.home-header .topLogo .logo-pc { display: block; width: 100%; max-height: 105px; object-fit: contain; }
.home-header .navbar-lan { grid-area: language; position: relative; right: auto; top: auto; min-width: 104px; padding: 9px 11px; }
.home-header #lanBox { right: 0; top: calc(100% + 8px); }
.home-header-actions { grid-area: actions; }
.home-header-actions .player_infoBox { position: static !important; display: grid !important; grid-template-columns: 1fr 1.2fr; gap: 10px; width: 100% !important; margin: 0 !important; padding: 11px !important; }
.home-header-actions .register_homeBtn { position: static !important; margin: 0 !important; }
.home-header-actions .player_info_btnIn, .home-header-actions .register_homeBtn_M { min-height: 46px; }
.home-download-recharge { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
.home-download-recharge .load-box { width: 100% !important; margin: 0 !important; padding: 10px !important; }
.home-download-recharge .load-box ul { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.home-download-recharge .load-box li { width: auto !important; margin: 0 !important; }
.home-download-recharge .load-box img { width: 100% !important; height: auto !important; }
.home-download-recharge .VIP-area { width: 100%; margin: 0; }
.home-download-recharge .VIP-area .row { display: grid !important; grid-template-columns: 1fr 1fr 72px; gap: 7px; }
.home-download-recharge .VIP-title { grid-column: 1 / -1; }
.home-download-recharge .VIP-area .col-md-12 { display: contents; }
.home-download-recharge .VIP-area .mb-3 { width: auto !important; margin: 0 !important; }
.home-social { display: none !important; }
.home-v3 .main-box { width: 100%; margin: 0 !important; }
.home-v3 .main-tab-info { padding: 16px 10px; }
.home-v3 .title-boxSet { display: none; }
.home-game-heading { width: 100%; margin: 6px 0 16px; color: #fff; font-size: 23px; font-weight: 800; text-align: center; }
.home-v3 ul.gameImg { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100% !important; margin: 0 !important; padding: 0 !important; }
.home-v3 .gameImg li { display: flex !important; flex: none !important; flex-direction: column; max-width: none !important; min-width: 0; padding: 0 0 10px !important; overflow: hidden !important; border: 1px solid var(--v2-line); border-radius: 12px; background: #1a2030; }
.home-v3 .gameImg li > a:first-of-type { display: block; }
.home-v3 .gameImg li > a:first-of-type img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.home-v3 .gameNam { min-height: 36px; padding: 8px 8px 4px !important; font-size: 13px !important; }
.home-v3 .game-play-btn { display: flex; align-items: center; justify-content: center; width: calc(100% - 18px); min-height: 32px; margin: auto auto 0; border-radius: 8px; background: linear-gradient(135deg, #397cff, #2360d6); color: #fff !important; font-size: 12px; font-weight: 700; text-decoration: none !important; }
.home-v3 .icon-hot { right: 5px !important; top: 5px !important; z-index: 3; }
.home-v3 .icon-hot img { width: 34px !important; }
.copyright { width: min(560px, calc(100% - 24px)); margin: 20px auto 0; border: 0 !important; background: transparent !important; }
.copyright .counter { display: none !important; }
.trust-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 14px; background: var(--v2-line); }
.trust-item { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 64px; padding: 9px 10px; background: #141b2b; color: #fff; }
.trust-item i { grid-row: 1 / 3; color: #78e8ff; font-size: 22px; text-align: center; }
.trust-item span { font-size: 12px; font-weight: 800; }
.trust-item small { color: var(--v2-muted); font-size: 11px; }

@media (min-width: 768px) {
  .home-v3 { width: min(760px, calc(100% - 48px)) !important; }
  .home-v3 ul.gameImg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .home-download-recharge { grid-template-columns: 1.08fr .92fr; align-items: stretch; }
  .home-download-recharge .load-box { display: flex; align-items: center; }
  .home-download-recharge .load-box ul { width: 100%; }
  .copyright { width: min(760px, calc(100% - 48px)); }
  .trust-bar { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .home-v3 { width: min(1180px, calc(100% - 64px)) !important; padding-top: 28px !important; }
  .home-header { grid-template-areas: "logo actions language"; grid-template-columns: 1fr auto auto; min-height: 90px; margin-bottom: 18px; }
  .home-header .topLogo { width: 190px; }
  .home-header .topLogo .logo-pc { max-height: 120px; }
  .home-header-actions .player_infoBox { width: 400px !important; grid-template-columns: 155px 1fr; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .home-header .navbar-lan { min-width: 132px; margin-left: 16px; }
  .home-download-recharge { grid-template-columns: 1.22fr .9fr; gap: 28px; margin-bottom: 20px; }
  .home-download-recharge .load-box { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  .home-download-recharge .load-box ul { gap: 16px; }
  .home-download-recharge .VIP-area { padding: 16px !important; }
  .home-download-recharge .VIP-area .row { grid-template-columns: 1fr 1fr 90px; gap: 9px; }
  .home-v3 .main-tab-info { padding: 24px 18px; }
  .home-v3 .tabSet .nav-link { min-height: 58px; font-size: 16px; }
  .home-game-heading { margin: 8px 0 22px; font-size: 32px; }
  .home-v3 ul.gameImg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .home-v3 .gameImg li { padding-bottom: 12px !important; }
  .home-v3 .gameNam { min-height: 42px; font-size: 15px !important; }
  .home-v3 .game-play-btn { min-height: 36px; font-size: 13px; }
  .home-v3 .icon-hot img { width: 40px !important; }
  .copyright { width: min(1180px, calc(100% - 64px)); margin-top: 28px; }
  .trust-item { grid-template-columns: 40px 1fr; min-height: 86px; padding: 14px 18px; }
  .trust-item i { font-size: 29px; }
  .trust-item span { font-size: 15px; }
  .trust-item small { font-size: 13px; }
}
