/* Rehber + forum — tarayıcı: üstte hub sekmeleri; oyun inapp: sekmeler native */

/* Oyun içi: site header tamamen kapalı (native sekme çubuğu) */
html.inapp-embed .oynanis-hub-header {
  display: none !important;
}

.oynanis-hub-header {
  position: sticky;
  top: 0;
  z-index: 120;
  flex-shrink: 0;
  background: rgba(15, 25, 35, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.oynanis-hub-header .site-header-inner {
  gap: 12px;
  flex-wrap: wrap;
  height: auto;
  min-height: var(--header-h);
  padding-top: 8px;
  padding-bottom: 8px;
}

@media (min-width: 720px) {
  .oynanis-hub-header .site-header-inner {
    flex-wrap: nowrap;
    height: var(--header-h);
    padding-top: 0;
    padding-bottom: 0;
  }
}

.oynanis-hub-header .site-logo {
  flex-shrink: 0;
}

.oynanis-hub-header .nav-toggle {
  flex-shrink: 0;
  margin-left: auto;
}

@media (min-width: 720px) {
  .oynanis-hub-header .nav-toggle {
    margin-left: 0;
  }
}

.oynanis-hub-tabs {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  gap: 6px;
  max-width: min(100%, 400px);
  margin-left: auto;
  margin-right: auto;
  padding: 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(26, 38, 53, 0.95), rgba(15, 25, 35, 0.9));
  border: 1px solid rgba(255, 184, 0, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.oynanis-hub-tab {
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #7a90a5;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.oynanis-hub-tab:hover {
  color: #b8c8d8;
}

.oynanis-hub-tab.is-active {
  color: var(--gold);
  font-weight: 700;
  border-color: rgba(255, 184, 0, 0.4);
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.2), rgba(46, 204, 113, 0.1));
}

@media (max-width: 520px) {
  .oynanis-hub-tab {
    font-size: 0.78rem;
    padding: 8px 8px;
  }
}

/* PC tarayıcı: site header = logo + menü; Rehber/Forum header altında */
.oynanis-hub-subbar {
  display: none;
}

@media (min-width: 720px) {
  html:not(.forum-embed):not(.faq-embed) .oynanis-hub-tabs--in-header {
    display: none !important;
  }

  html:not(.forum-embed):not(.faq-embed) .oynanis-hub-header .site-header-inner {
    flex-wrap: nowrap;
    height: var(--header-h);
    padding-top: 0;
    padding-bottom: 0;
  }

  html:not(.forum-embed):not(.faq-embed) .oynanis-hub-subbar {
    display: block;
    position: static;
    top: auto;
    padding: 10px max(var(--pad-x), var(--safe-left));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 25, 35, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  html:not(.forum-embed):not(.faq-embed) .oynanis-hub-subbar-inner {
    max-width: var(--max);
    margin: 0 auto;
  }

  html:not(.forum-embed):not(.faq-embed) .oynanis-hub-tabs--subbar {
    max-width: 480px;
    margin: 0 auto;
  }
}

html.forum-embed:not(.inapp-embed) .oynanis-hub-subbar,
html.faq-embed:not(.inapp-embed) .oynanis-hub-subbar {
  display: none !important;
}

/* Oyun WebView: Rehber|Forum içerikle birlikte kayar, üstte kalmaz */
html.inapp-embed .oynanis-hub-tabs--in-header {
  display: none !important;
}

html.inapp-embed .oynanis-hub-subbar {
  display: block !important;
  position: static !important;
  top: auto !important;
  z-index: auto;
  padding: 8px max(var(--pad-x), var(--safe-left));
  padding-top: max(8px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(15, 25, 35, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html.inapp-embed .oynanis-hub-subbar-inner {
  max-width: var(--max, 720px);
  margin: 0 auto;
}

html.inapp-embed .oynanis-hub-tabs--subbar {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* Embed + tarayıcı / eski WebView (inapp değil): tek scroll alanı main içinde */
html.forum-embed:not(.inapp-embed) .oynanis-hub-header,
html.faq-embed:not(.inapp-embed) .oynanis-hub-header {
  display: block !important;
  position: relative;
  top: auto;
  flex: 0 0 auto;
}

html.forum-embed:not(.inapp-embed) .oynanis-hub-header .nav-toggle,
html.faq-embed:not(.inapp-embed) .oynanis-hub-header .nav-toggle,
html.forum-embed:not(.inapp-embed) .oynanis-hub-extra,
html.faq-embed:not(.inapp-embed) .oynanis-hub-extra {
  display: none !important;
}

html.forum-embed:not(.inapp-embed) .oynanis-hub-header .site-logo,
html.faq-embed:not(.inapp-embed) .oynanis-hub-header .site-logo {
  display: none;
}

html.forum-embed:not(.inapp-embed) .oynanis-hub-header .site-header-inner,
html.faq-embed:not(.inapp-embed) .oynanis-hub-header .site-header-inner {
  justify-content: center;
  padding-top: max(8px, env(safe-area-inset-top));
  padding-bottom: 8px;
}

html.forum-embed:not(.inapp-embed) .oynanis-hub-tabs,
html.faq-embed:not(.inapp-embed) .oynanis-hub-tabs {
  max-width: none;
  width: 100%;
  margin: 0;
}

html.forum-embed:not(.inapp-embed),
html.faq-embed:not(.inapp-embed) {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--forum-vh, 100%);
  overflow: hidden;
  overscroll-behavior: none;
}

html.forum-embed:not(.inapp-embed) body.page-forum,
html.faq-embed:not(.inapp-embed) body.page-rehber {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--forum-vh, 100%);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
}

html.forum-embed:not(.inapp-embed) .forum-main,
html.faq-embed:not(.inapp-embed) .page-legal {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

html.faq-embed:not(.inapp-embed) .page-legal {
  max-width: none;
  justify-content: flex-start;
}

/* Oyun inapp: normal sayfa kaydırması, header yok */
html.inapp-embed.forum-embed,
html.inapp-embed.faq-embed,
html.inapp-embed.forum-embed body.page-forum,
html.inapp-embed.faq-embed body.page-rehber {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  overscroll-behavior: auto;
}

html.inapp-embed.forum-embed body.page-forum,
html.inapp-embed.faq-embed body.page-rehber {
  display: block;
  min-height: 100%;
  margin: 0;
}

html.inapp-embed.forum-embed .forum-main,
html.inapp-embed.faq-embed .page-legal {
  flex: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}

html.inapp-embed .site-footer,
html.inapp-embed .rx-progress,
html.inapp-embed .rx-particles,
html.inapp-embed .rx-spotlight {
  display: none;
}
