/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.icon-huge-3fe3) is a descendant of
   .over_2e18 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.complex-9477 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".mask_yellow_83b1" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.picture-blue-01a9 so it can't cause
   horizontal overflow anyway. */
.element_cool_e807,
.notice_4cea,
.tiny-3f88,
.in-9aff,
.element_gas_7b31,
.module_1910,
.info-be97,
.caption_gas_8874,
.dropdown_prev_6cd1,
.module_active_26ad,
.iron-a0f6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .label_liquid_ffd4 {
    padding: 8px 0;
  }
  
  .badge_0424 img {
    height: 28px;
    width: auto;
  }
  
  .backdrop-c521 {
    display: none !important;
  }
  
  .video_d274 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .video_d274 svg {
    width: 14px;
    height: 14px;
  }
  
  .section-87bc {
    padding: 6px;
  }
  
  .container_bea6 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tiny-3f88,
  .notice_4cea,
  .in-9aff,
  .element_gas_7b31,
  .right_1026,
  .narrow-90f1,
  .hidden_medium_9aea,
  .preview-eb8b,
  .sort_282f,
  .tooltip-dad3,
  .hidden_e9b9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .heading-3939,
  .popup_new_ee2d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hard-3200,
  .label_4d28,
  .logo_8605,
  .header_ff5f,
  .basic-c870,
  .list-1930,
  .hidden_white_1dce {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .tooltip_0ae8,
  .title-f399,
  .gallery_018b,
  .soft_11eb,
  .element_prev_66fe {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gradient-last-baa4,
  .paragraph_first_9d43,
  .upper-6103,
  .liquid_1478 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .container-5717,
  .clean-9d9f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .filter_1c32,
  .cold_ab82,
  .box_north_6e9f,
  .card-6942 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .status_7493,
  .texture-77c3,
  .grid-basic-cbeb,
  .bronze-1ecf,
  .hard-21e5,
  .card_f7da {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tooltip_0ae8,
  .title-f399,
  .soft_11eb {
    max-width: none !important;
  }
  
  .mask_yellow_83b1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gradient-last-baa4 {
    font-size: 1.5rem !important;
  }
  
  .paragraph_first_9d43 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .inner_3a31,
  .sort_c8da {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .upper-6103 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .large-7804 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .light_2695 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tooltip_0ae8,
  .soft_11eb {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: 58fb */
.shadow-element-x6 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.2;
}
