/* qqwpes mobile-only layout restoration (PC untouched) */
@media (max-width: 767px) {
  :root { font-size: 16px!important; }
  *, *::before, *::after { box-sizing: border-box; }
  html { width:100%!important; max-width:100%!important; overflow-x:clip!important; scroll-behavior:auto; }
  body { width:100%!important; max-width:100%!important; min-width:0!important; overflow-x:clip!important; margin:0!important; padding:0!important; -webkit-text-size-adjust:100%; }
  #app, #global-v-app, .v-application, .v-application__wrap, main.v-main, .home-view { width:100%!important; min-width:0!important; max-width:100%!important; }
  .container, .container-1300 { max-width:100%!important; min-width:0!important; width:100%!important; }
  img, video { max-width:100%; }
  /* Compact, functional header */
  .header {width:100%!important;}
  .header>.container-1300 { width:100%!important; padding:0!important; }
  .header .header-nav {width:100%!important; max-width:100%!important; overflow-x:auto!important; background:#fff!important; scrollbar-width:none; -webkit-overflow-scrolling:touch;}
  .header .header-nav::-webkit-scrollbar {display:none}
  .header .header-nav ul { margin:0!important; padding:0 10px!important; min-width:max-content!important; height:30px!important; display:flex!important; gap:17px!important; align-items:center!important; }
  .header .header-nav li { font-size:11px!important; white-space:nowrap; display:flex!important;align-items:center;gap:2px; }
  .header .header-nav .material-icons {font-size:14px!important;}
  .header .login {padding:8px 9px 10px!important; min-height:0!important; width:100%!important; max-width:100%!important; display:flex!important; justify-content:space-between!important; align-items:center!important; flex-wrap:wrap!important; gap:7px 3px!important;}
  .header .login img.logo { max-width:118px!important; width:118px!important; min-height:0!important; height:auto!important; object-fit:contain!important; margin:0!important; flex:0 0 auto; }
  .header .login-row { width:100%!important; min-width:0!important; margin:0!important; display:flex!important; justify-content:center!important; align-items:center!important; gap:6px!important; flex-wrap:wrap!important; }
  .header .login-row .v-col { padding:0!important; margin:0!important; min-width:0!important; flex:1 1 calc(50% - 5px)!important; max-width:calc(50% - 3px)!important; }
  .header .login-row .v-input { width:100%!important; min-width:0!important; }
  .header .login-row .v-input__control { width:100%!important; }
  .header .login-row .v-field { height:34px!important; min-height:34px!important; }
  .header .login-row .v-field__input {font-size:12px!important; min-height:34px!important; padding:5px 10px!important;}
  .header .login-row .v-btn {font-size:12px!important; min-width:0!important; height:34px!important; padding:0 11px!important; white-space:nowrap!important;}
  .header .forget-pass {font-size:11px!important; white-space:nowrap!important; }
  /* Scrollable categories - touchable without page zoom */
  .qq-nav-holder {width:100%!important;}
  .category-div {width:100%!important; max-width:100%!important; overflow-x:auto!important; overflow-y:hidden!important; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding:6px 0!important;}
  .category-div::-webkit-scrollbar {display:none}
  .category-div>.cursor-row { width:max-content!important; min-width:max-content!important; display:flex!important; align-items:center!important; gap:0!important; }
  .category-div-item, .qq-nav-holder .category-div-item { min-width:72px!important; flex:0 0 72px!important; width:72px!important; padding:1px 2px!important; font-size:11px!important; text-align:center!important;}
  .category-div-item img { width:27px!important; height:27px!important; }
  .category-div-item .v-img {width:27px!important;height:27px!important;margin:1px auto!important;}
  .category-div-item span {font-size:11px!important;white-space:nowrap!important;}
  .qq-mega-panel {width:100vw!important;max-width:100vw!important;max-height:58dvh!important;overflow-y:auto!important;padding:10px!important;}
  .qq-mega-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  .qq-lottery-cols {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  /* Ticker */
  .marquee-container {width:100%!important;max-width:100%!important;min-width:0!important; overflow:hidden!important; font-size:12px!important; min-height:32px!important;}
  /* The saved desktop Swiper uses 1920px inline widths. Remove their effect. */
  .PromotionSlider,.PromotionSlider .swiper,.PromotionSlider .swiper-wrapper {width:100%!important;max-width:100%!important;min-width:0!important;}
  .PromotionSlider .swiper-wrapper {transform:none!important;}
  .PromotionSlider .swiper-slide {width:100%!important;min-width:100%!important;max-width:100%!important;flex:0 0 100%!important; height:auto!important;}
  .PromotionSlider .swiper-slide .v-img {height:auto!important;width:100%!important; aspect-ratio: 1.85/1!important; overflow:hidden!important; position:relative!important;}
  .PromotionSlider .swiper-slide .v-responsive__sizer {display:none!important;}
  .PromotionSlider .swiper-slide img.v-img__img {display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important;}
  .PromotionSlider .swiper-pagination {padding:6px!important;}
  /* Game section: hero becomes modest, category chips horizontal, 2-col game list */
  .home-view,.hot-games-container { width:100%!important;max-width:100%!important;min-width:0!important;}
  .hot-games-container {padding:12px 10px!important;margin:0 auto!important;overflow:visible!important;}
  .hot-games-container .tabs-header {width:100%!important; max-width:100%!important;display:flex!important;gap:7px!important;overflow-x:auto!important;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding:0 0 7px!important;}
  .hot-games-container .tabs-header::-webkit-scrollbar{display:none}
  .hot-games-container .tabs-header>* {flex:0 0 auto!important;}
  .hot-games-container .hot-game-tab { min-height:35px!important;height:35px!important; width:auto!important; min-width:98px!important; padding:5px 8px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;border-radius:7px!important;}
  .hot-games-container .hot-game-tab .tab-icon,.hot-games-container .hot-game-tab .lottery-tab-icon {width:20px!important;height:20px!important;flex:0 0 20px!important;margin:0!important;}
  .hot-games-container .hot-game-tab .tab-name {font-size:12px!important;white-space:nowrap!important;}
  .hot-games-container .content-body {width:100%!important;max-width:100%!important;min-width:0!important;min-height:0!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:2px!important;margin:0!important;padding:0!important;}
  .hot-games-container .category-main-img,.hot-games-container .qq-hot-hero {width:100%!important;max-width:100%!important;height:155px!important;max-height:155px!important;flex:none!important;overflow:hidden!important;position:relative!important;margin:0 auto!important;}
  .hot-games-container .category-main-img .v-responsive__sizer {display:none!important;}
  .hot-games-container .category-main-img img,.hot-games-container .qq-hot-hero img {width:100%!important;height:100%!important;max-height:155px!important;object-fit:contain!important;object-position:center!important;}
  .hot-games-container .qq-hot-details,.hot-games-container .details-wrapper { width:100%!important;max-width:100%!important;min-width:0!important; padding:5px 0 14px!important;margin:0!important;flex:none!important;}
  .hot-games-container .category-title {display:block!important; font-size:23px!important;line-height:1.25!important;text-align:center!important;margin:3px 0 7px!important;}
  .hot-games-container .category-desc {display:block!important;font-size:12px!important;line-height:1.55!important;text-align:left!important; max-height:none!important;overflow:visible!important;}
  .hot-games-container .qq-hot-grid,.hot-games-container .games-grid {width:100%!important;max-width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin:12px 0 0!important;padding:0!important;}
  .hot-games-container .qq-hot-item,.hot-games-container .game-item {width:100%!important;max-width:100%!important;min-width:0!important; height:56px!important; display:flex!important;flex-direction:row!important;align-items:center!important;overflow:hidden!important;border-radius:6px!important;background:#00a5f5!important;}
  .hot-games-container .qq-hot-item img,.hot-games-container .game-item img.game-ims {width:56px!important;height:56px!important;flex:0 0 56px!important;object-fit:cover!important;}
  .hot-games-container .qq-hot-item .game-name-label,.hot-games-container .game-item .game-name-label {color:#fff!important;font-size:11px!important;font-weight:600!important;line-height:1.3!important; padding:3px 5px!important;white-space:normal!important;overflow-wrap:anywhere!important;min-width:0!important;text-align:center!important;flex:1!important;}
  .hot-games-container .game-item img.status-badge {display:none!important;}
  /* Event and live video: vertically stacked, video readable full width */
  .home-view .container {width:100%!important;max-width:100%!important;min-width:0!important;padding:0 10px!important;margin:0 auto!important;}
  .home-view .container .row {max-width:100%!important;min-width:0!important;}
  .home-view .container .khoang_trong {width:100%!important;margin:7px 0!important;padding:0!important;display:block!important;height:auto!important;}
  .home-view .container .khoang_trong img {width:100%!important;height:auto!important;max-height:65px!important;object-fit:contain!important;display:block!important;margin:auto!important;}
  .home-view .container .div-cqu {display:flex!important;flex-direction:column-reverse!important;align-items:stretch!important;gap:12px!important;width:100%!important;margin:0!important;padding:0!important;height:auto!important;}
  .home-view .container .video-wrap {position:relative!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:16/9!important;flex:none!important;padding:0!important;margin:0!important;overflow:hidden!important;border:4px solid #1586e9!important;border-radius:12px!important;background:#121212!important;}
  .home-view .container .video-wrap img.img-frame {display:none!important;}
  .home-view .container .video-wrap video {position:static!important;display:block!important;width:100%!important;height:100%!important;aspect-ratio:16/9!important;max-width:100%!important;object-fit:contain!important;transform:none!important;margin:0!important;}
  .home-view .container .dic-cqu-con {width:100%!important;max-width:100%!important;min-height:0!important;flex:none!important;height:auto!important;margin:0!important;padding:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important;flex-wrap:wrap!important;border-radius:10px!important;}
  .home-view .container .dic-cqu-con canvas {width:96px!important;height:96px!important;margin:0!important;max-width:30%!important;}
  .home-view .container .dic-cqu-con img {max-width:43%!important;width:auto!important;height:auto!important;max-height:47px!important;object-fit:contain!important;margin:0!important;}
  .home-view .dic-desc {width:100%!important;max-width:100%!important;min-width:0!important;padding:12px 10px!important;overflow:hidden!important;}
  .home-view .dic-desc>img {width:100%!important;max-width:100%!important;height:auto!important;object-fit:contain!important;}
  .home-view .dic-desc ul.adventage {width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:5px 0!important;padding:0!important;}
  .home-view .dic-desc ul.adventage li {width:100%!important;min-width:0!important;margin:0!important;list-style:none!important;}
  .home-view .dic-desc ul.adventage img {display:block!important;width:100%!important;max-width:160px!important;height:auto!important;margin:auto!important;}
  .home-view .dic-desc ul.guaranty {width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:12px!important;padding:0!important;margin:10px 0!important;}
  .home-view .dic-desc ul.guaranty li {width:100%!important;display:flex!important;align-items:flex-start!important;gap:10px!important;margin:0!important;}
  .home-view .dic-desc ul.guaranty img {width:65px!important;max-width:65px!important;height:auto!important;flex:0 0 65px!important;}
  .home-view .dic-desc ul.guaranty p {font-size:12px!important;line-height:1.5!important;}
  /* Floating controls no longer cover a quarter of a phone screen */
  .side-bar {position:fixed!important;z-index:98!important;right:5px!important;left:auto!important;top:auto!important;bottom:76px!important;width:44px!important;max-width:44px!important;padding:3px!important;border-radius:10px!important;opacity:.92!important;}
  .side-bar>div {height:47px!important;min-height:0!important;padding:3px 0!important;}
  .side-bar img {width:21px!important;height:21px!important;object-fit:contain!important;}
  .side-bar span {font-size:9px!important;line-height:1.1!important;white-space:nowrap!important;}
  .home-float {display:none!important;}
  /* Footer readable in a phone, no forced desktop columns */
  footer.footer {width:100%!important;max-width:100%!important;overflow:hidden!important;}
  footer.footer .contact-bar {width:100%!important;max-width:100%!important;}
  footer.footer .contact-inner {width:100%!important;max-width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:4px!important;padding:12px 9px!important;}
  footer.footer .info-line {width:100%!important;min-width:0!important;min-height:40px!important;display:flex!important;align-items:center!important;gap:6px!important;overflow:hidden!important;}
  footer.footer .info-line img {width:30px!important;height:30px!important;flex:0 0 30px!important;object-fit:contain!important;}
  footer.footer .info-line p {font-size:10px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important;}
  footer.footer .bank-bar,footer.footer .bank-padding {width:100%!important;max-width:100%!important; padding:10px!important;}
  footer.footer .bank-img {display:block!important;max-width:100%!important;width:100%!important;height:auto!important;object-fit:contain!important;}
}
@media (max-width: 380px){
  .header .login img.logo {width:105px!important;max-width:105px!important}
  .hot-games-container .qq-hot-item img,.hot-games-container .game-item img.game-ims {width:48px!important;height:48px!important;flex-basis:48px!important}
  .hot-games-container .qq-hot-item,.hot-games-container .game-item {height:48px!important}
  .hot-games-container .qq-hot-item .game-name-label,.hot-games-container .game-item .game-name-label {font-size:10px!important}
}

@media (max-width:767px){
  .header .login-row>.v-col.captcha-field:empty {display:none!important;}
  .header .login-row>.v-col:last-child {flex:0 0 100%!important;max-width:100%!important;width:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;flex-wrap:wrap!important;padding-top:2px!important;}
  .header .login-row>.v-col:last-child .v-btn {margin:0!important;}
}


/* --- Mobile UI upgrade v4: app-like game categories and larger readable content --- */
@media (max-width: 767px) {
  body { background:#eef5fd!important; }

  /* extra safety: remove floating clutter on phone */
  .side-bar, .home-float, .redPack-container, .red-pack { display:none!important; }

  /* top category icons more tappable */
  .category-div { padding:8px 0 6px!important; background:#fff!important; }
  .category-div>.cursor-row { gap:4px!important; padding:0 6px!important; }
  .category-div-item, .qq-nav-holder .category-div-item {
    min-width:76px!important; flex:0 0 76px!important; width:76px!important;
    padding:4px 4px 6px!important; border-radius:10px!important;
  }
  .category-div-item img, .category-div-item .v-img,
  .qq-nav-holder .category-div-item img, .qq-nav-holder .category-div-item .v-img {
    width:30px!important; height:30px!important; margin:0 auto 2px!important;
  }
  .category-div-item span { font-size:12px!important; font-weight:600!important; }

  /* app-like hot game block */
  .hot-games-container {
    padding:10px 8px 18px!important;
    background:transparent!important;
  }
  .hot-games-container .tabs-header {
    position:relative!important;
    background:#e8f4ff!important;
    border-radius:14px!important;
    padding:8px 6px 10px!important;
    box-shadow:0 4px 14px rgba(0,100,220,.10)!important;
    margin-bottom:10px!important;
  }
  .hot-games-container .hot-game-tab {
    min-width:102px!important;
    height:40px!important;
    min-height:40px!important;
    border-radius:10px!important;
    padding:6px 10px!important;
    background:linear-gradient(180deg,#1fb1ff 0%,#0f92f2 100%)!important;
    box-shadow:0 3px 8px rgba(0,120,220,.18)!important;
  }
  .hot-games-container .hot-game-tab.active,
  .hot-games-container .hot-game-tab.is-active,
  .hot-games-container .hot-game-tab[aria-selected="true"] {
    background:linear-gradient(180deg,#7d7d7d 0%,#5e5e5e 100%)!important;
  }
  .hot-games-container .hot-game-tab .tab-icon,
  .hot-games-container .hot-game-tab .lottery-tab-icon { width:22px!important; height:22px!important; flex:0 0 22px!important; }
  .hot-games-container .hot-game-tab .tab-name { font-size:13px!important; font-weight:700!important; }

  .hot-games-container .content-body {
    background:#fff!important;
    border-radius:16px!important;
    box-shadow:0 6px 18px rgba(0,60,120,.10)!important;
    padding:12px!important;
    gap:8px!important;
  }
  .hot-games-container .category-main-img,
  .hot-games-container .qq-hot-hero {
    height:168px!important;
    max-height:168px!important;
    border-radius:14px!important;
    background:linear-gradient(180deg,#f5fbff 0%,#e7f3ff 100%)!important;
  }
  .hot-games-container .qq-hot-details,
  .hot-games-container .details-wrapper { padding:2px 0 8px!important; }
  .hot-games-container .category-title {
    font-size:22px!important;
    font-weight:800!important;
    color:#118ae9!important;
    text-align:left!important;
    margin:2px 0 6px!important;
  }
  .hot-games-container .category-desc {
    font-size:13px!important;
    line-height:1.5!important;
    color:#48637b!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    margin-bottom:8px!important;
  }
  .hot-games-container .qq-hot-grid,
  .hot-games-container .games-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    margin-top:10px!important;
  }
  .hot-games-container .qq-hot-item,
  .hot-games-container .game-item {
    height:72px!important;
    border-radius:12px!important;
    background:linear-gradient(90deg,#11abf6 0%,#0f96ef 100%)!important;
    box-shadow:0 4px 10px rgba(0,115,210,.16)!important;
  }
  .hot-games-container .qq-hot-item img,
  .hot-games-container .game-item img.game-ims {
    width:72px!important; height:72px!important; flex:0 0 72px!important;
    border-top-left-radius:12px!important; border-bottom-left-radius:12px!important;
  }
  .hot-games-container .qq-hot-item .game-name-label,
  .hot-games-container .game-item .game-name-label {
    font-size:12px!important;
    font-weight:700!important;
    line-height:1.3!important;
    text-align:center!important;
    padding:4px 7px!important;
  }

  /* featured event/video cleaner on phone */
  .home-view .container { padding:0 8px!important; }
  .home-view .container .khoang_trong img { max-height:58px!important; }
  .home-view .container .div-cqu { gap:10px!important; }
  .home-view .container .video-wrap {
    border-width:3px!important;
    border-radius:14px!important;
    box-shadow:0 6px 18px rgba(0,60,120,.14)!important;
  }
  .home-view .container .dic-cqu-con {
    padding:10px!important;
    border-radius:12px!important;
    background:linear-gradient(180deg,#eff7ff 0%,#dfefff 100%)!important;
  }
  .home-view .container .dic-cqu-con img { max-height:42px!important; }
  .home-view .dic-desc {
    background:#fff!important;
    border-radius:16px!important;
    box-shadow:0 6px 18px rgba(0,60,120,.10)!important;
    margin-top:10px!important;
  }
  .home-view .dic-desc ul.adventage img { max-width:145px!important; }

  /* general text blocks easier to read */
  .home-view .dic-desc ul.guaranty p,
  .home-view .dic-desc p,
  .home-view .dic-desc li { font-size:13px!important; line-height:1.55!important; }
}

@media (max-width: 380px) {
  .hot-games-container .hot-game-tab { min-width:96px!important; }
  .hot-games-container .qq-hot-item,
  .hot-games-container .game-item { height:66px!important; }
  .hot-games-container .qq-hot-item img,
  .hot-games-container .game-item img.game-ims { width:66px!important; height:66px!important; flex-basis:66px!important; }
}
