/* Bet With Net Mobile App Experience v3.0 */
.mobile-bottom strong{font:inherit;font-weight:750}.mobile-bottom .nav-icon{display:block}

@media (max-width:820px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  html{scroll-behavior:smooth}
  body.betwithnet-app{min-height:100dvh;padding-bottom:calc(74px + env(safe-area-inset-bottom));overscroll-behavior-y:contain;-webkit-tap-highlight-color:transparent}
  body.mobile-overlay-open{overflow:hidden;touch-action:none}
  a,button,.odd-btn,.btn{touch-action:manipulation}

  .topbar{height:56px;min-height:56px;padding:0 10px;gap:8px;position:sticky;top:0;z-index:75;background:rgba(7,16,24,.96);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .mobile-menu-toggle{width:40px;height:40px;min-width:40px;border-radius:12px;font-size:20px}
  .topbar .brand{flex:1;justify-content:center;min-width:0;overflow:hidden}
  .topbar .brand small{display:none}
  .topbar .brand-logo{max-width:120px;max-height:34px}
  .topbar .brand-mark{width:34px;height:34px;min-width:34px}
  .topbar .brand span:nth-child(2){display:block;max-width:128px;overflow:hidden;text-overflow:ellipsis}
  .top-actions{margin-left:0;min-width:40px;justify-content:flex-end}
  .top-actions .profile-mini{width:38px;height:38px;font-size:13px}
  .top-actions .btn.primary{min-height:38px;padding:8px 11px;font-size:12px}

  .search-panel{top:56px;padding:10px 12px;z-index:90;background:rgba(7,16,24,.98)}
  .search-inner input{min-height:46px;font-size:16px}
  .search-result{padding:12px 8px}
  .demo-notice{min-height:28px;padding:6px 10px;font-size:9px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .site-grid{display:block;min-height:calc(100dvh - 84px);width:100%}
  .main-content{width:100%;max-width:100%;padding:12px 12px 22px;margin:0}
  .main-content>*{max-width:100%}
  .section-head{align-items:flex-start;margin:3px 0 10px}
  .section-head h1,.section-head h2{font-size:19px;line-height:1.2}
  .section-head p{font-size:12px;line-height:1.45}

  .hero{min-height:0;padding:18px 16px;border-radius:17px;margin-bottom:14px;box-shadow:0 12px 30px rgba(0,0,0,.18)}
  .hero:after{width:190px;height:190px;border-width:42px;right:-65px;top:-70px}
  .hero h1{font-size:30px;line-height:1.02;margin:8px 0 9px}
  .hero p{font-size:13px;line-height:1.5;margin:0}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
  .hero-actions .btn{min-height:44px;padding:10px 8px;width:100%}

  .sport-pills{margin:0 -12px 10px;padding:2px 12px 8px;gap:7px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  .sport-pill{padding:8px 12px;min-height:38px;display:inline-flex;align-items:center;scroll-snap-align:start}

  .banner-deck{margin-left:-12px;margin-right:-12px;padding:0 12px 3px;gap:9px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
  .banner-deck{grid-auto-columns:minmax(86vw,1fr)}
  .promo-banner{border-radius:15px;scroll-snap-align:center}
  .promo-banner img{height:118px}

  .event-list{gap:8px}
  .event-card{display:grid;grid-template-columns:1fr;gap:9px;padding:11px;border-radius:15px;background:linear-gradient(180deg,#0f1c28,#0b1620);box-shadow:0 7px 18px rgba(0,0,0,.12)}
  .event-meta{margin-bottom:4px;gap:6px;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .event-teams{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px}
  .team{font-size:12px;line-height:1.25;min-width:0;overflow-wrap:anywhere}
  .score{min-width:52px;font-size:17px}
  .score small{font-size:8px}
  .odds-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .odd-btn{min-width:0;min-height:50px;padding:7px 7px;border-radius:10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px}
  .odd-btn span{font-size:9px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .odd-btn b{font-size:13px;line-height:1.1}
  .odd-btn:active{transform:scale(.98)}

  .card-grid{gap:9px}
  .mini-card,.promo-card,.game-card,.stat-card,.panel{border-radius:14px}
  .panel{padding:14px;margin-bottom:10px}
  .game-thumb{height:105px}
  .game-body{padding:10px}
  .form-group{margin-bottom:11px}
  .input,select.input,textarea.input{min-height:46px;padding:11px 12px;font-size:16px}
  textarea.input{min-height:110px}
  .btn{min-height:42px}

  .account-grid{display:block}
  .account-nav{display:flex;gap:5px;overflow-x:auto;margin:0 -12px 11px;padding:7px 12px;border-left:0;border-right:0;border-radius:0;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .account-nav::-webkit-scrollbar{display:none}
  .account-nav a{white-space:nowrap;min-height:38px;display:inline-flex;align-items:center;padding:8px 11px}
  .stats-grid{gap:8px}
  .stat-card{padding:12px}
  .stat-card b{font-size:18px}
  .wallet-summary{border-radius:14px}
  .wallet-summary>div{padding:13px}

  .table-wrap{width:100%;max-width:100%;-webkit-overflow-scrolling:touch}
  .table{font-size:12px}
  .table th,.table td{padding:9px}

  .auth-shell{margin:16px auto 8px}
  .auth-card{border-radius:17px;padding:17px}

  .footer{display:none!important}

  .mobile-bottom{height:calc(66px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:5px 5px max(5px,env(safe-area-inset-bottom));z-index:100;background:rgba(8,18,27,.97);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);box-shadow:0 -10px 28px rgba(0,0,0,.25)}
  .mobile-bottom a,.mobile-bottom button{min-width:0;height:56px;padding:5px 1px 4px;display:grid;grid-template-rows:24px 15px;align-content:center;place-items:center;gap:1px;border-radius:12px;color:#8198ab;font-size:9px;font-weight:750;line-height:1.1;position:relative}
  .mobile-bottom .nav-icon{font-size:20px;line-height:22px;transition:transform .16s ease,color .16s ease}
  .mobile-bottom strong{font-size:9px;line-height:13px;white-space:nowrap}
  .mobile-bottom a.active,.mobile-bottom button.active{color:var(--accent-green);background:color-mix(in srgb,var(--accent-green) 10%,transparent)}
  .mobile-bottom a.active .nav-icon,.mobile-bottom button.active .nav-icon{transform:translateY(-1px)}
  .mobile-bottom a.active:before,.mobile-bottom button.active:before{content:"";position:absolute;top:0;width:24px;height:3px;border-radius:0 0 4px 4px;background:var(--accent-green)}
  .mobile-bottom em{top:2px;right:17%;min-width:16px;height:16px;display:grid;place-items:center;padding:0 4px;font-size:8px;border-radius:999px}

  .mobile-menu-drawer{z-index:120}
  .mobile-menu-panel{width:min(88vw,350px);padding:calc(12px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));border-radius:0 18px 18px 0;box-shadow:22px 0 50px rgba(0,0,0,.34)}
  .mobile-menu-head{min-height:44px}
  .mobile-menu-close{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--bg-elevated)}
  .mobile-menu-search{min-height:44px}
  .mobile-menu-panel>a,.mobile-menu-sports a{min-height:42px;display:flex;align-items:center}

  .mobile-slip-drawer{z-index:130}
  .drawer-backdrop{z-index:130}
  .drawer-sheet{z-index:131;max-height:86dvh;padding:12px 14px calc(18px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;box-shadow:0 -24px 60px rgba(0,0,0,.4)}
  .drawer-handle{margin-bottom:12px}
  .drawer-close{width:38px;height:38px;display:grid;place-items:center;right:10px;top:8px}
  #mobileSlipContent{padding-top:2px}
  #mobileSlipContent h3{margin:0 42px 12px 0}

  html[data-theme="light"] .topbar{background:rgba(255,255,255,.96)}
  html[data-theme="light"] .mobile-bottom{background:rgba(255,255,255,.97)}
}

@media (max-width:480px){
  .hero-actions{grid-template-columns:1fr}
  .hero h1{font-size:27px}
  .main-content{padding-left:10px;padding-right:10px}
  .sport-pills{margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px}
  .banner-deck{margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px}
  .account-nav{margin-left:-10px;margin-right:-10px;padding-left:10px;padding-right:10px}
}

@media (max-width:360px){
  .mobile-bottom strong{font-size:8px}
  .mobile-bottom .nav-icon{font-size:18px}
  .team{font-size:11px}
  .odd-btn{padding-left:5px;padding-right:5px}
}

@media (display-mode:standalone) and (max-width:820px){
  .topbar{padding-top:env(safe-area-inset-top);height:calc(56px + env(safe-area-inset-top))}
  .search-panel{top:calc(56px + env(safe-area-inset-top))}
}

/* Bet With Net mobile hardening v4.0 */
@media (max-width:820px){
  body.betwithnet-app{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  .topbar{display:grid;grid-template-columns:40px minmax(0,1fr) auto}
  .topbar .brand{justify-self:center;width:100%}
  .top-actions{justify-self:end}
  .main-content{overflow:hidden}
  .panel,.auth-card,.event-card,.promo-card,.game-card,.mini-card,.stat-card{max-width:100%;overflow-wrap:anywhere}
  img,svg,video,iframe{max-width:100%;height:auto}
  .section-head{flex-wrap:wrap}
  .footer{display:none!important;padding:0!important;margin:0!important;border:0!important}
}
@media (max-width:480px){
  .card-grid{grid-template-columns:1fr}
  .topbar .brand span:nth-child(2){max-width:112px;font-size:14px}
  .top-actions .btn.primary{padding-left:9px;padding-right:9px}
  .section-head h1,.section-head h2{max-width:100%}
}
@media (max-width:360px){
  .topbar .brand span:nth-child(2){max-width:88px;font-size:13px}
  .top-actions .btn.primary{font-size:11px;padding-left:7px;padding-right:7px}
}

/* Responsive + scroll hardening v5.1 */
html,body{min-height:100%;height:auto}
body.betwithnet-app{overflow-x:hidden}
img,svg,video,iframe{max-width:100%;height:auto}
.site-grid,.main-content{min-width:0}

@media (min-width:1181px) and (max-width:1360px){
  .site-grid{grid-template-columns:190px minmax(0,1fr) 290px;width:100%}
  .left-sidebar,.bet-sidebar{padding-left:11px;padding-right:11px}
  .main-content{padding:16px}
  .card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (min-width:821px) and (max-width:1180px){
  .site-grid{width:100%;grid-template-columns:minmax(0,1fr) minmax(270px,300px)}
  .main-content{min-width:0;overflow:visible}
  .event-card{grid-template-columns:minmax(170px,.9fr) minmax(250px,1.25fr)}
  .footer{width:100%}
}

@media (max-width:820px){
  html{overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth}
  body.betwithnet-app{
    width:100%;max-width:100%;min-height:100svh;height:auto;
    overflow-x:hidden;overflow-y:auto;
    overscroll-behavior-y:auto;
    touch-action:pan-y;
    -webkit-overflow-scrolling:touch;
    padding-bottom:calc(72px + env(safe-area-inset-bottom));
  }
  body.betwithnet-app.mobile-overlay-open{overflow:hidden;touch-action:none}
  .site-grid{display:block;width:100%;min-height:auto;height:auto;overflow:visible}
  .main-content{width:100%;max-width:100%;min-height:0;height:auto;overflow:visible!important;padding-bottom:24px}
  .main-content>*{min-width:0;max-width:100%}
  .event-list,.card-grid,.account-grid,.stats-grid,.form-grid{min-width:0;max-width:100%}
  .table-wrap{display:block;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}
  .mobile-menu-panel,.drawer-sheet{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .mobile-menu-panel{max-height:100dvh}
  .drawer-sheet{max-height:min(86dvh,760px)}
  .footer{
    display:flex!important;flex-direction:column;align-items:flex-start;gap:12px;
    width:100%;max-width:100%;margin:0 auto;
    padding:18px 12px calc(92px + env(safe-area-inset-bottom))!important;
    border-top:1px solid var(--border-glass)!important;
  }
  .footer-links{width:100%;gap:8px 16px}
  .footer-links a{min-height:38px;align-items:center}
  .promo-card,.game-card,.panel,.auth-card,.event-card{min-width:0}
  .section-head>*{min-width:0}
}

@media (max-width:560px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wallet-summary{grid-template-columns:1fr 1fr}
  .table{min-width:620px}
  .footer-links{display:grid;grid-template-columns:1fr 1fr}
}

@media (max-width:380px){
  .main-content{padding-left:9px;padding-right:9px}
  .stats-grid{grid-template-columns:1fr 1fr}
  .stat-card{padding:10px}
  .footer{padding-left:10px!important;padding-right:10px!important}
}


/* Navigation + frontend responsiveness hardening v5.2 */
@media (min-width:821px) and (max-width:1180px){
  .site-grid{grid-template-columns:minmax(180px,205px) minmax(0,1fr);width:100%}
  .left-sidebar{display:block;position:sticky;top:97px;height:calc(100vh - 97px);overflow-y:auto;overflow-x:hidden}
  .bet-sidebar{display:none}
  .main-content{min-width:0;overflow:visible;padding:16px}
  .event-card{grid-template-columns:minmax(160px,.9fr) minmax(230px,1.2fr)}
  .card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:820px){
  .mobile-menu-drawer{visibility:hidden;pointer-events:none}
  .mobile-menu-drawer.open{visibility:visible;pointer-events:auto}
  .mobile-menu-backdrop{z-index:0;pointer-events:auto}
  .mobile-menu-panel{z-index:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .mobile-menu-panel form{margin:4px 0 12px}
  .mobile-menu-panel .btn{width:100%}
  .mobile-menu-sports{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mobile-menu-sports a,.mobile-menu-panel>a{overflow-wrap:anywhere}
  .main-content{overflow:visible!important}
}

@media (max-width:420px){
  .mobile-menu-panel{width:min(92vw,350px)}
  .mobile-menu-sports{grid-template-columns:1fr}
}
