/* Keep the mobile layout stable when iOS focuses form/search controls. */
@media (max-width: 768px) {
  html,
  body,
  #usbahis-root {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  input,
  select,
  textarea,
  [contenteditable="true"] {
    font-size: 16px !important;
    min-width: 0;
    max-width: 100%;
  }

  .usbahis-slot-workspace,
  .usbahis-slot-content,
  .casino-workspace,
  .casino-main,
  .usbahis-auth,
  .usbahis-support-panel {
    max-width: 100%;
    overflow-x: hidden;
  }

  .usbahis-featured-game img {
    cursor: pointer;
  }
}

.usbahis-featured-game > p {
  display: none !important;
}

/* Mobile all-providers view: keep the exact Sugar Rush catalog card first. */
@media (max-width: 768px) {
  .usbahis-slot-page
    .usbahis-slot-workspace:has(
      .usbahis-slot-provider-list > button:first-child.active[aria-label="Tüm Sağlayıcılar"]
    )
    .casino-grid
    > article:has(.catalog-game-media > img[alt="Sugar Rush"]) {
    order: -100;
  }
}


/* Mobile registration bonus notice: keep the one-time auth notification prominent. */
@media (max-width: 768px) {
  .welcome-toast.notification-toast {
    top: calc(72px + env(safe-area-inset-top)) !important;
    right: 12px !important;
    left: 12px !important;
    z-index: 2147483000 !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 76px;
    display: flex !important;
    visibility: visible !important;
    opacity: 1;
  }

  .welcome-toast.notification-toast small {
    font-size: 13px;
    line-height: 1.45;
  }
}

/* Alt gezinme cubugu: desktop gizli, mobil sabit bar (mobilenav18) */
nav.usbahis-mobile-nav { display: none; }
@media (max-width: 768px) {
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  nav.usbahis-mobile-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: 60px; padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #35131c; background: #10070bfa;
    box-shadow: 0 -8px 24px #00000066;
  }
  nav.usbahis-mobile-nav .usbahis-mobile-nav-item { display: flex; min-width: 0; }
  nav.usbahis-mobile-nav .usbahis-mobile-nav-item > a,
  nav.usbahis-mobile-nav .usbahis-mobile-nav-item > button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-width: 0; padding: 0 2px; border: 0; background: transparent;
    color: #c9ced6; font: 600 9.5px/1.1 inherit; text-decoration: none; cursor: pointer;
  }
  nav.usbahis-mobile-nav svg { width: 19px; height: 19px; flex: none; }
  nav.usbahis-mobile-nav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  nav.usbahis-mobile-nav a.active, nav.usbahis-mobile-nav button.active { color: #ff4438; }
}
@media (max-width: 768px) {
  nav.usbahis-mobile-nav a.mobile-nav-mascot { padding: 4px 0; }
  nav.usbahis-mobile-nav a.mobile-nav-mascot img { max-height: 46px; width: auto; object-fit: contain; }
}
/* Desktop: mobil header ve alt bar kesin gizli (app.css id-scope kurallarini ezer) */
@media (min-width: 769px) {
  nav.usbahis-mobile-nav,
  #usbahis-root nav.usbahis-mobile-nav { display: none !important; }
  header.usbahis-mobile-header a.mobile-brand { font-size: 0; color: transparent; text-decoration: none; }
}

/* Slider: gorselin kendi oraninda, kenardan kenara tam, kirpmasiz (slides10x3) */
@media (min-width: 641px) {
  #usbahis-root .usbahis-hero, .usbahis-hero { height: auto !important; aspect-ratio: 10 / 3; }
  #usbahis-root .usbahis-hero img, .usbahis-hero img { object-fit: cover; }
}

/* Desktop: hero alti mavi kisayol kartlari (bluecards1) */
@media (min-width: 641px) {
  #usbahis-root .usbahis-mobile-quick-actions, .usbahis-mobile-quick-actions {
    display: grid !important; grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px; max-width: 1500px; margin: 16px auto 6px; padding: 0 14px; background: transparent;
  }
  #usbahis-root .usbahis-mobile-quick-actions a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    aspect-ratio: auto; height: 112px; overflow: hidden;
    border: 1px solid #3e5eae; border-radius: 14px;
    background: linear-gradient(180deg, #33549e, #152252) !important;
    box-shadow: 0 6px 18px #00000059; color: #fff; text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
  }
  #usbahis-root .usbahis-mobile-quick-actions a:hover { transform: translateY(-2px); border-color: #6d8fe0; }
  #usbahis-root .usbahis-mobile-quick-actions a > span,
  #usbahis-root .usbahis-mobile-quick-actions a > b { visibility: visible; }
  #usbahis-root .usbahis-mobile-quick-actions span {
    width: 46px; height: 46px; background: transparent; box-shadow: none; color: #fff;
  }
  #usbahis-root .usbahis-mobile-quick-actions svg { width: 30px; height: 30px; }
  #usbahis-root .usbahis-mobile-quick-actions b {
    max-width: 100%; padding-inline: 6px; font-size: 12.5px; font-weight: 700;
    letter-spacing: .4px; text-transform: uppercase; text-align: center; line-height: 1.2;
  }
}
@media (min-width: 641px) and (max-width: 1280px) {
  #usbahis-root .usbahis-mobile-quick-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Kayit/Giris modali: solda kampanya, sagda pill form (authsplit1) */
@media (min-width: 900px) {
  .usbahis-auth .auth-card.register, .usbahis-auth .auth-card.login {
    display: grid; grid-template-columns: 42% 1fr; grid-template-rows: auto 1fr;
    column-gap: 46px; width: min(1180px, 96vw); aspect-ratio: auto; max-height: 92vh;
    padding: 40px 48px 34px;
    background-color: #161f38;
  }
  .usbahis-auth .auth-mobile-hero {
    display: flex !important; grid-area: 1 / 1 / 3 / 2;
    width: auto; height: auto; margin: 0; aspect-ratio: auto; background: none;
    flex-direction: column; justify-content: center; gap: 18px; padding-right: 8px;
  }
  .usbahis-auth .auth-mobile-hero img { display: none; }
  .usbahis-auth .auth-mobile-hero::before {
    font: 800 34px/1.25 Poppins, sans-serif; color: #ff2130; letter-spacing: .5px; white-space: pre-line;
  }
  .usbahis-auth .auth-mobile-hero::after {
    font: 600 21px/1.7 Poppins, sans-serif; color: #eef1f6; letter-spacing: 2px; white-space: pre-line;
  }
  .usbahis-auth .auth-card.register .auth-mobile-hero::before { content: "HIZLI KAYIT,\A HIZLI KAZANÇ"; }
  .usbahis-auth .auth-card.register .auth-mobile-hero::after { content: "AVANTAJLI PROMOSYONLAR\A \A YÜKSEK ORAN, YÜKSEK RTP"; }
  .usbahis-auth .auth-card.login .auth-mobile-hero::before { content: "KAZANCIN\A DOĞRU ADRESİ"; }
  .usbahis-auth .auth-card.login .auth-mobile-hero::after { content: "15 DAKİKADA ÇEKİM\A \A LİMİTLERİ ZORLAMAYA\A HAZIR MISIN?"; }
  .usbahis-auth .auth-copy { grid-area: 1 / 2; margin: 0 0 10px; }
  .usbahis-auth .auth-copy h2 { color: #fff; font-size: 27px; }
  .usbahis-auth .auth-copy h3 { color: #ff2130; font-size: 23px; }
  .usbahis-auth .auth-form { grid-area: 2 / 2; overflow: auto; min-height: 0; padding-right: 6px; }
  .usbahis-auth .auth-form input:not([type=radio]):not([type=checkbox]),
  .usbahis-auth .auth-form select {
    height: 52px; border-radius: 999px; border: 1.6px solid #98a0b2; background: transparent;
    color: #fff; padding: 0 22px; font-size: 15.5px; box-shadow: none;
  }
  .usbahis-auth .auth-form input:focus, .usbahis-auth .auth-form select:focus { border-color: #ff2130; outline: none; }
  .usbahis-auth .auth-form input::placeholder { color: #cfd5df; }
  .usbahis-auth .auth-form select option { background: #131c30; color: #fff; }
  .usbahis-auth .auth-form .auth-submit, .usbahis-auth .auth-form button[type=submit] {
    height: 54px; min-width: 220px; margin-left: auto; border-radius: 999px;
    background: #e60f16; color: #fff; font: 700 16px Poppins, sans-serif; letter-spacing: 1px;
  }
}

/* Auth sol paneller: tasarimci gorselleri (authimg1) */
@media (min-width: 900px) {
  .usbahis-auth .auth-card.register .auth-mobile-hero {
    background: url(/assets/usbahis/images/auth-left-register.webp?v=3) center / cover no-repeat;
    border-radius: 16px; min-height: 560px; justify-content: flex-end;
  }
  .usbahis-auth .auth-card.register .auth-mobile-hero::before,
  .usbahis-auth .auth-card.register .auth-mobile-hero::after { content: none; }
  .usbahis-auth .auth-card.login .auth-mobile-hero {
    background: url(/assets/usbahis/images/auth-left-login.webp?v=1) left bottom / contain no-repeat;
    justify-content: flex-start; padding-top: 26px; min-height: 520px;
  }
}

/* Canli casino buyuk kartlar + mavi zemin (livecards1) */
@media (min-width: 900px) {
  main.usbahis-home {
    background:
      radial-gradient(600px 400px at 8% 22%, #23306322, transparent 70%),
      radial-gradient(700px 500px at 92% 60%, #2a1a3a22, transparent 70%),
      linear-gradient(180deg, #0a101f, #070b16 55%, #05070e);
  }
  .usbahis-live-featured .usbahis-live-row { gap: 22px; }
  .usbahis-live-featured .usbahis-live-row a {
    display: flex; flex-direction: column; align-items: center; gap: 15px;
    padding: 18px 18px 20px; border: 1px solid #232f4d; border-radius: 16px;
    background: #101a2ecc; box-shadow: 0 10px 26px #00000059;
    transition: transform .15s ease, border-color .15s ease;
  }
  .usbahis-live-featured .usbahis-live-row a:hover { transform: translateY(-3px); border-color: #3c4f7d; }
  .usbahis-live-featured .usbahis-live-row a img { border-radius: 12px; }
  .usbahis-live-featured .usbahis-live-row a::after {
    content: "▶  Oyna"; display: flex; align-items: center; justify-content: center;
    width: 156px; height: 44px; border-radius: 10px; background: #e60f16; color: #fff;
    font: 700 15px Poppins, sans-serif; letter-spacing: .3px;
  }
  .usbahis-live-featured .usbahis-live-row a:hover::after { background: #ff2130; }
}
/* Oyna buton yazi duzeltme (livecards2) */
@media (min-width: 900px) {
  .usbahis-live-featured .usbahis-live-row a,
  .usbahis-live-featured .usbahis-live-row a:visited,
  .usbahis-live-featured .usbahis-live-row a:hover { text-decoration: none !important; color: #fff !important; }
  .usbahis-live-featured .usbahis-live-row a::after { text-decoration: none; color: #fff; }
}

/* Slider ortali cerceve + mobil kartlar CSS (frame1) */
@media (min-width: 900px) {
  #usbahis-root .usbahis-hero, .usbahis-hero {
    width: min(1760px, calc(100% - 150px)); margin: 18px auto 4px;
    border-radius: 18px; overflow: hidden;
  }
  #usbahis-root .usbahis-mobile-quick-actions { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #usbahis-root .usbahis-mobile-quick-actions a {
    background: linear-gradient(180deg, #99141f, #43070d) !important;
    border: 1px solid #c2202c; border-radius: 12px;
  }
  #usbahis-root .usbahis-mobile-quick-actions a > span,
  #usbahis-root .usbahis-mobile-quick-actions a > b { visibility: visible; }
  #usbahis-root .usbahis-mobile-quick-actions span { background: #ffffff22; box-shadow: none; color: #fff; }
  #usbahis-root .usbahis-mobile-quick-actions b { color: #fff; }
}

/* Giris modali sol panel: mockup birebir (loginpanel2) */
@media (min-width: 900px) {
  .usbahis-auth .auth-card.login .auth-mobile-hero {
    background: url(/assets/usbahis/images/auth-login-figure.webp?v=2) center bottom / 86% no-repeat;
    justify-content: flex-start; align-items: center; gap: 14px; padding: 4px 6px 0; min-height: 560px;
  }
  .usbahis-auth .auth-card.login .auth-mobile-hero img {
    display: block; content: url(/assets/usbahis/images/auth-badge.webp?v=2);
    width: 82%; height: auto; margin: 0 auto;
  }
  .usbahis-auth .auth-card.login .auth-mobile-hero::before {
    content: "KAZANCIN DOĞRU ADRESİ"; font: 800 30px/1.2 Poppins, sans-serif;
    color: #ff2130; text-align: center; letter-spacing: .5px;
  }
  .usbahis-auth .auth-card.login .auth-mobile-hero::after {
    content: "15 DAKİKADA ÇEKİM\A LİMİTLERİ ZORLAMAYA HAZIR MISIN?";
    font: 600 19px/1.65 Poppins, sans-serif; color: #eef1f6; text-align: center; white-space: pre-line;
  }
}
@media (min-width: 900px) { .usbahis-auth .auth-card.login .auth-mobile-hero img { order: -1; margin-top: 8px; } }

/* Cloudflare Turnstile gizle (turnoff1) */
.usbahis-turnstile-field, .cf-turnstile { display: none !important; }
/* Kayit sol panel yazilari biraz saga (regshift1) */
@media (min-width: 900px) {
  .usbahis-auth .auth-card.register .auth-mobile-hero { padding-left: 34px; text-align: left; }
}

/* Feature Games kaydirilabilir + ok butonlari (fgscroll1) */
@media (min-width: 900px) {
  .usbahis-feature-games { position: relative; }
  .usbahis-feature-list { scroll-behavior: smooth; scrollbar-width: none; scroll-snap-type: x proximity; }
  .usbahis-feature-list::-webkit-scrollbar { display: none; }
  .usbahis-feature-list > * { flex: 0 0 auto; min-width: 232px; scroll-snap-align: start; }
  .fg-arrow {
    position: absolute; top: 58%; transform: translateY(-50%); z-index: 5;
    width: 46px; height: 46px; display: grid; place-items: center;
    border: 0; border-radius: 50%; cursor: pointer;
    background: #e60f16; color: #fff; box-shadow: 0 6px 18px #000000073;
    transition: background .15s ease, transform .15s ease;
  }
  .fg-arrow:hover { background: #ff2130; transform: translateY(-50%) scale(1.06); }
  .fg-arrow.fg-prev { left: -6px; }
  .fg-arrow.fg-next { right: -6px; }
  .fg-arrow svg { width: 22px; height: 22px; }
  .fg-arrow[hidden] { display: none; }
}

/* Hero banner slider: slide tam genişlik (React transform çalışsın) + oklar (heroslide1) */
.usbahis-hero-track { transition: transform .5s ease; }
.usbahis-hero-track > * { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; }
.usbahis-hero, .usbahis-slot-hero, .usbahis-promotion-hero { position: relative; }
.hero-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: #e60f16cc; color: #fff; box-shadow: 0 6px 16px #00000066;
  transition: background .15s ease, transform .15s ease; opacity: .85;
}
.hero-nav:hover { background: #ff2130; opacity: 1; transform: translateY(-50%) scale(1.07); }
.hero-nav.hero-prev { left: 12px; }
.hero-nav.hero-next { right: 12px; }
.hero-nav svg { width: 22px; height: 22px; }
@media (max-width: 640px){ .hero-nav { width: 34px; height: 34px; } .hero-nav svg{ width:17px;height:17px; } }

/* Banner slider: yazilar solda kesilmesin - sola hizala (heroalign1) */
.usbahis-hero img, .usbahis-slot-hero img, .usbahis-promotion-hero img {
  object-fit: cover !important; object-position: left center !important;
}

/* Promosyon kartlari 4 sutun (mockup) - promo4col1 */
@media (min-width: 1000px) {
  .usbahis-promotion-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px !important; }
}
@media (min-width: 640px) and (max-width: 999px) {
  .usbahis-promotion-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
