* { box-sizing: border-box; }

:root {
  --color-primary: #ee0a24;
  --color-secondary: #1989fa;
  --color-bg: #f7f7f7;
  --color-text: #323233;
  --color-muted: #999;
  --radius-card: 8px;
  --shadow-card: 0 1px 3px rgba(0,0,0,.08);
  --font-stack: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
    "Segoe UI", Arial, Roboto, sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

a { color: var(--color-secondary); }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ebedf0;
  padding: .5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  flex: 1;
  justify-content: center;
}
.nav__link {
  color: var(--color-text);
  text-decoration: none;
  font-size: .9rem;
  padding: .25rem .35rem;
}
.nav__link:hover { color: var(--color-primary); text-decoration: none; }
.nav__link--active { color: var(--color-primary); font-weight: 600; }

/* Main */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 60vh;
}

/* Bottom tabbar (mobile, home only) */
.tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ebedf0;
  justify-content: space-around;
  padding: .4rem 0 env(safe-area-inset-bottom, 0);
  z-index: 100;
}
.tabbar__link {
  text-decoration: none;
  color: var(--color-muted);
  font-size: .75rem;
  text-align: center;
  padding: .25rem 0;
}
.tabbar__link--active { color: var(--color-primary); font-weight: 600; }

/* Footer */
.site-footer {
  text-align: center;
  color: var(--color-muted);
  font-size: .8rem;
  padding: 2rem 1rem 1rem;
}

/* Home hero placeholder */
.home-hero {
  text-align: center;
  padding: 3rem 1rem;
}
.home-hero h2 { font-size: 1.5rem; margin: 0 0 .5rem; }

/* Cards placeholder */
.item-list, .activity-feed, .user-panel {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

/* Mobile */
@media (max-width: 600px) {
  .body--home .nav { display: none; }
  .body--home .tabbar { display: flex; }
  .body--home .site-footer { padding-bottom: 4rem; }
}

/* ===== HOMEPAGE MOBILE RESPONSIVE ===== */

/* Prevent horizontal overflow globally on mobile */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important; max-width: 100vw !important;
  }
  /* Force ALL elements to respect viewport width */
  *, *::before, *::after { max-width: 100vw !important; box-sizing: border-box !important; }
  #app { width: 100% !important; overflow-x: hidden !important; }
  header, footer, section, div, nav, ul { max-width: 100% !important; }

  /* ---- HEADER TOP ---- */
  header { width: 100% !important; }
  header .header-top {
    height: auto !important; min-height: auto !important;
    padding-bottom: 4px !important;
  }
  header .header-top > div {
    height: auto !important; padding: 8px 10px !important;
    flex-wrap: wrap !important; gap: 6px !important;
    justify-content: center !important; max-width: 100% !important;
  }
  header .logomain {
    position: relative !important; top: auto !important; left: auto !important;
    transform: none !important;
  }
  header .logomain img { width: 100px !important; height: auto !important; }

  /* Auth buttons row */
  ._3OFBD2SMU4R067-Il-FmFs {
    display: flex !important; gap: 6px !important; flex-wrap: nowrap !important;
  }
  header .header-top .login,
  header .header-top .register,
  header .header-top .playtest {
    width: auto !important; min-width: 65px !important; height: 30px !important;
    font-size: 11px !important; margin: 0 !important; padding: 0 10px !important;
    white-space: nowrap !important;
  }

  /* Top links bar - hide on mobile */
  header .header-top .header-top-links { display: none !important; }

  /* Background video in header */
  header .header-top video { display: none !important; }

  /* ---- NAVIGATION BAR ---- */
  header .header-bottom {
    height: auto !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    /* Fade hint on right edge to show scrollable */
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%) !important;
    mask-image: linear-gradient(to right, #000 85%, transparent 100%) !important;
  }
  header .header-bottom::-webkit-scrollbar { display: none !important; }
  header .header-bottom > div {
    height: auto !important; max-width: none !important;
    overflow: visible !important; width: max-content !important;
    min-width: 100% !important;
  }
  header .header-bottom > div nav {
    height: auto !important; overflow: visible !important;
  }
  header .header-bottom > div ul,
  header ._4GFFQME3VxQOLaxRzBxeQ > ul {
    flex-wrap: nowrap !important; overflow: visible !important;
    justify-content: flex-start !important; padding: 0 !important;
    width: max-content !important;
  }
  header .header-bottom > div > nav > ul > li,
  header ._4GFFQME3VxQOLaxRzBxeQ > ul > li {
    padding: 0 12px !important; white-space: nowrap !important;
    flex-shrink: 0 !important; height: 38px !important;
  }
  header .header-bottom > div > nav > ul > li > a {
    font-size: 12px !important; letter-spacing: 0 !important; font-weight: 600 !important;
  }

  /* Sub-nav dropdown - hide on mobile */
  header ._2xvnAce2IF0yzYHRGAlbG8 { display: none !important; }

  /* ---- BANNER SWIPER ---- */
  /* Banner wrapper has inline style="height: 453px; overflow: hidden" */
  div[style*="height: 453px"] {
    height: 160px !important;
  }
  div[style*="height: 453px"] > section { height: 160px !important; }
  .mySwiperBanner { height: 160px !important; }
  .swiper-wrapper {
    height: 160px !important; transform: none !important;
  }
  .swiper-slide {
    width: 100% !important; height: 160px !important;
    flex-shrink: 0 !important;
  }
  .swiper-slide a { height: 160px !important; display: block !important; }
  .swiper-slide img, .slide-img {
    width: 100% !important; height: 160px !important; object-fit: cover !important;
  }
  .swiper-pagination-fraction, .swiper-pagination-custom,
  .swiper-horizontal > .swiper-pagination-bullets,
  .swiper-pagination-bullets.swiper-pagination-horizontal { bottom: 6px !important; }
  .swiper-pagination-bullet { width: 8px !important; height: 8px !important; }

  /* ---- NEWS TICKER ---- */
  .Hra33TxtHu1C-vZkxSDi7 { position: relative !important; width: 100% !important; }
  ._2f-DvVLvelwJOC7_a45SIc { width: 100% !important; padding: 0 8px !important; }
  ._1HKJOEgSu0SSPbgkWjI0rQ { font-size: 11px !important; white-space: nowrap !important; }

  /* ---- MAIN CONTENT ---- */
  section.main {
    max-width: 100% !important; width: 100% !important;
    padding: 0 12px !important; overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* ---- SECTION TITLES ---- */
  .mStjgcADwBgprsQLlvjuO {
    font-size: 16px !important; margin: 1rem 0 0.5rem !important;
    letter-spacing: 0 !important; line-height: 1.3 !important;
    word-break: break-word !important;
  }
  .mStjgcADwBgprsQLlvjuO::before {
    width: 12px !important; height: 12px !important; margin-right: 6px !important;
  }

  /* ---- FEATURES GRID (4 items → 2x2) ---- */
  ._30APJszbm3wcgZ5Oyn57ka {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 12px 8px !important; margin: 12px 0 !important;
    justify-items: center !important; height: auto !important;
    width: 100% !important;
  }
  ._30APJszbm3wcgZ5Oyn57ka > div {
    width: 100% !important; height: auto !important; gap: 4px !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    position: static !important;
  }
  ._30APJszbm3wcgZ5Oyn57ka > div img {
    width: 60px !important; height: 56px !important; object-fit: contain !important;
  }
  ._30APJszbm3wcgZ5Oyn57ka > div p {
    font-size: 11px !important; text-align: center !important;
    margin: 0 !important; line-height: 1.2 !important;
  }
  ._30APJszbm3wcgZ5Oyn57ka > div:not(:first-of-type)::after { display: none !important; }

  /* ---- INTRODUCTION SECTION (video + game grid) ---- */
  ._1uNn9YXFmLLHH4TGyPm3G- {
    display: flex !important; flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important; margin: 8px 0 16px !important;
  }
  /* Video has HTML attrs width=630 height=660, must force override */
  ._1uNn9YXFmLLHH4TGyPm3G- video {
    width: 100% !important; height: 200px !important;
    max-width: 100% !important; object-fit: cover !important;
  }
  ._1uNn9YXFmLLHH4TGyPm3G- .gameList {
    width: 100% !important; overflow: hidden !important;
  }
  /* Game list: force grid on the ul directly */
  ._13rvKZOuh2BMIJMCyjVilZ {
    display: grid !important; grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important; padding: 0 !important; margin: 0 !important;
    list-style: none !important; width: 100% !important;
  }
  ._13rvKZOuh2BMIJMCyjVilZ li {
    margin: 0 !important; width: auto !important;
    text-align: center !important;
  }
  ._13rvKZOuh2BMIJMCyjVilZ li img {
    width: 100% !important; height: auto !important;
    max-width: 100% !important;
  }

  /* ---- PROVIDERS GRID (2 columns) ---- */
  ._29Yn6iW3oJfPjz1sW6QH9q {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 8px !important; padding: 0 !important;
    list-style: none !important; width: 100% !important;
  }
  ._29Yn6iW3oJfPjz1sW6QH9q li {
    margin: 0 !important; overflow: hidden !important; width: auto !important;
  }
  ._29Yn6iW3oJfPjz1sW6QH9q li a { display: block !important; }
  ._29Yn6iW3oJfPjz1sW6QH9q li img {
    width: 100% !important; height: auto !important;
    max-width: 100% !important; display: block !important;
  }

  /* ---- FOOTER ---- */
  .HYHQ7RYC1BDlO1amTeHE9 {
    padding: 20px 0 10px !important; min-height: auto !important;
    background-size: cover !important;
  }
  .pUk9b12uOGKg24-PcmJWk {
    width: 100% !important; padding: 0 12px !important; box-sizing: border-box !important;
  }
  ._39EtgGfulqPdGss0OAWO7N {
    flex-direction: column !important; gap: 16px !important;
  }
  /* Footer info block */
  ._39EtgGfulqPdGss0OAWO7N ._30HYT2iK08KPDwm-QY5zlF {
    width: 100% !important; align-items: center !important;
  }
  ._39EtgGfulqPdGss0OAWO7N ._30HYT2iK08KPDwm-QY5zlF > img {
    min-width: auto !important; width: 140px !important; height: auto !important;
  }
  ._39EtgGfulqPdGss0OAWO7N ._30HYT2iK08KPDwm-QY5zlF > p {
    width: 100% !important; font-size: 12px !important; text-align: center !important;
  }
  /* Footer section titles */
  ._39EtgGfulqPdGss0OAWO7N section ._2nbcEJoQ-ZfT7ZkunleqMr {
    font-size: 14px !important;
  }
  /* Footer nav lists - 2 column layout */
  ._39EtgGfulqPdGss0OAWO7N section > .TXENmrLTqrPrzDpnGfan5 {
    display: grid !important; grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  ._39EtgGfulqPdGss0OAWO7N section > .TXENmrLTqrPrzDpnGfan5 li {
    width: 100% !important; font-size: 12px !important;
    height: 32px !important; line-height: 32px !important;
  }
  /* Ambassador image in footer */
  ._2FXpkV4fMnGdXwo6DsRMT7 { text-align: center !important; }
  ._2FXpkV4fMnGdXwo6DsRMT7 img {
    width: 100% !important; max-width: 160px !important; height: auto !important;
  }

  /* Footer logos row */
  ._39tyXHV-L_TQJOnqgE4ju2 {
    flex-wrap: wrap !important; justify-content: center !important;
    gap: 6px 10px !important; margin-top: 12px !important;
  }
  ._39tyXHV-L_TQJOnqgE4ju2 img { height: 22px !important; width: auto !important; }

  /* Footer text */
  ._1enrf79p8QHcZIV56f7Jck { font-size: 11px !important; padding: 0 4px !important; }
  ._1enrf79p8QHcZIV56f7Jck br { display: none !important; }
  ._1rm8EYCjCarupQKGl8wf0B { font-size: 10px !important; line-height: 1.4 !important; }

  /* ---- LOGIN/REGISTER MODALS ---- */
  ._2fMGqDLeVdueHNrY6jh1tZ .modal-dialog {
    width: 95vw !important; height: auto !important;
    margin: 10px auto !important; padding: 8px !important;
    background-size: 100% 100% !important; border-radius: 16px !important;
  }
  ._3N2lRww2b9eZP-F5fSS-Rq {
    flex-direction: column !important; padding: 16px !important;
    height: auto !important; gap: 10px !important;
  }
  ._3N2lRww2b9eZP-F5fSS-Rq section > form {
    width: 100% !important; height: auto !important; padding: 14px !important;
  }
  ._1_zP-Q6VoUbliQZKPc8BOz { display: none !important; }
  .modal-register ._1_zP-Q6VoUbliQZKPc8BOz { display: none !important; }
  .maagwmS6qLuFIDCpWszAE img { max-width: 180px !important; }
  ._1BBGAyzpmRR6hBc3fgW5CV {
    height: auto !important; margin: 10px auto !important;
    flex-wrap: wrap !important; justify-content: center !important;
  }
  ._1BBGAyzpmRR6hBc3fgW5CV p { font-size: 14px !important; }
  ._1BBGAyzpmRR6hBc3fgW5CV span { font-size: 13px !important; }

  /* ---- SMARTSUPP CHAT WIDGET ---- */
  #smartsupp-widget-container { z-index: 999 !important; }
}
