@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

@font-face {
  font-family: 'Clash';
  src: url('/assets/fonts/Clash_Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* Global box-sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

@font-face {
  font-family: 'Clash';
  src: url('/assets/fonts/Clash_Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'ClashBold';
  src: url('/assets/fonts/Clash_Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'ClashRegular';
  src: url('/assets/fonts/Clash_Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'Clash_Bold';
  src: url('/assets/fonts/Clash_Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'Clash_Regular';
  src: url('/assets/fonts/Clash_Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

:root { --panel-width: 920px; --panel-max: 920px; }

body {
  font-family: 'Clash_Regular', Arial, sans-serif;
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  color: #000000;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  z-index: 200;
}
.topbar {
  pointer-events: auto;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 6px auto 0 auto;
  min-height: 50px;
  height: auto;
  padding: 6px 12px;
  border-radius: 16px 16px 24px 24px;
  background: linear-gradient(180deg, #e4effa 0%, #d0deee 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2), inset 0 -2px 0 rgba(255,255,255,0.7);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  transform: translateY(0);
  transition: transform 0.3s ease;
}
.topbar.hidden { transform: translateY(-110%); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-title { font-family: 'Clash_Bold', Arial, sans-serif; font-size: 1rem; color: #0b1a2b; text-decoration: none; }
.topbar-home { display: inline-flex; align-items: center; gap: 8px; color: #0b1a2b; text-decoration: none; font-family: 'Clash_Bold', Arial, sans-serif; }
.topbar-home:hover { opacity: 0.85; }
.topbar-nav { display: flex; align-items: center; gap: 8px; }
.topbar-link { color: #0b1a2b; text-decoration: none; font-family: 'Clash_Bold', Arial, sans-serif; font-size: 0.92rem; padding: 5px 8px; border-radius: 10px; }
.topbar-link:hover { background: rgba(255,255,255,0.5); }
.topbar-link.active { background: rgba(255,255,255,0.8); border: 2px solid #a5b4cf; }
.topbar-user { display: inline-flex; align-items: center; gap: 10px; color: #0b1a2b; text-decoration: none; font-family: 'Clash_Bold', Arial, sans-serif; cursor: pointer; position: relative; z-index: 201; }
.topbar-user:focus, .topbar-user:hover { outline: none; filter: brightness(0.95); }
.topbar-user-avatar { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #a4b6cc 0%, #7186a3 70%); box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 2px 8px rgba(0,0,0,0.2); display: inline-flex; align-items: center; justify-content: center; }
.topbar-user-avatar svg { width: 18px; height: 18px; fill: #f2f6fb; }
.topbar-user-text { font-size: 0.95rem; white-space: nowrap; }
.topbar-user.logged-in .topbar-user-text { display: flex; flex-direction: column; align-items: flex-start; white-space: normal; }
.topbar-user-text .user-name { font-size: 0.95rem; line-height: 1.1; }
.topbar-user-text .user-tag { font-size: 0.8rem; line-height: 1.1; color: #475569; font-family: 'ClashRegular', Arial, sans-serif; }

/* Language switcher */
.lang-switch { position: relative; margin-right: 6px; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 6px 10px; border-radius: 10px; border: 1px solid #b8c2d6; background: #fff; cursor: pointer; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset; }
.lang-flag { font-size: 18px; line-height: 1; }
.lang-code { font-family:'Clash_Bold', Arial, sans-serif; color:#0b1a2b; font-size:.9rem; }
.lang-menu { position: absolute; top: 100%; right: 0; background: #fff; border:1px solid #c7cfde; border-radius: 10px; margin-top: 8px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.25); min-width: 120px; display: none; z-index: 300; overflow: hidden; }
.lang-switch.open .lang-menu { display: block; }
.lang-opt { display:flex; align-items:center; gap:8px; padding:8px 12px; width: 100%; background: none; border: none; cursor: pointer; text-align: left; font-family:'Clash_Bold', Arial, sans-serif; color:#0b1a2b; }
.lang-opt:hover { background:#f5f7fb; }
.lang-opt[aria-selected="true"] { background:#eef3ff; }

/* ID Popup */
.id-popup { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 1200; backdrop-filter: blur(4px); }
.id-popup[aria-hidden="false"] { display: flex; }
.id-popup-card { width: 90%; max-width: 400px; background: linear-gradient(165deg, #1a2332 0%, #0f1923 100%); border-radius: 18px; box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06); padding: 24px 20px 20px; }
.id-popup-title { font-family: 'ClashBold', Arial, sans-serif; color: #fff; font-size: 1.2rem; margin-bottom: 6px; }
.id-popup-desc { color: rgba(200,215,235,0.7); font-size: 0.9rem; margin-bottom: 14px; }
.id-popup-input { width: 100%; box-sizing: border-box; border: 2px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 12px 14px; font-size: 1rem; outline: none; background: rgba(255,255,255,0.06); color: #fff; font-family: 'ClashBold', Arial, sans-serif; letter-spacing: 0.5px; transition: border-color .2s, box-shadow .2s; }
.id-popup-input::placeholder { color: rgba(200,215,235,0.35); }
.id-popup-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
.id-popup-actions { margin-top: 14px; display: flex; justify-content: flex-end; gap: 8px; }
.id-btn { padding: 10px 18px; border-radius: 12px; border: none; cursor: pointer; font-family: 'ClashBold', Arial, sans-serif; font-size: 0.9rem; transition: transform .15s, filter .15s; }
.id-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.id-btn:active { transform: translateY(0); }
.id-cancel { background: rgba(255,255,255,0.08); color: rgba(200,215,235,0.8); }
.id-cancel:hover { background: rgba(255,255,255,0.12); }
.id-login { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
.id-logout { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.id-logout:hover { background: rgba(239,68,68,0.25); }
.id-profile { background: transparent; border: none; border-radius: 0; padding: 0; }
.id-profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.id-profile-level { width: 56px; height: 56px; background: url('/assets/images/experience.webp') center/contain no-repeat; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.id-profile-level-num { font-family: 'ClashBold', Arial, sans-serif; font-size: 1.15rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.id-profile-identity { min-width: 0; }
.id-profile-name { font-family: 'ClashBold', Arial, sans-serif; color: #fff; font-size: 1.15rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-profile-tag { font-size: 0.8rem; color: rgba(200,215,235,0.5); font-family: monospace; letter-spacing: 0.5px; }
.id-profile-stats { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
.id-profile-stat { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 10px 12px; width: 100%; min-width: 0; }
.id-profile-stat-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.id-profile-stat-svg { width: 22px; height: 22px; flex-shrink: 0; color: rgba(200,215,235,0.5); }
.id-profile-stat-info { display: flex; flex-direction: column; min-width: 0; }
.id-profile-stat-value { font-family: 'ClashBold', Arial, sans-serif; color: #fff; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-profile-stat-label { font-size: 0.72rem; color: rgba(200,215,235,0.45); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hide arena stat in profile popup */
.id-profile-stats > .id-profile-stat:nth-child(4) { display: none; }

.id-profile-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.id-view-profile { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; text-decoration: none; text-align: center; box-shadow: 0 4px 12px rgba(59,130,246,0.3); }
.id-profile-loading { display: flex; justify-content: center; padding: 8px 0; }
.id-profile-spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.1); border-top-color: #3b82f6; border-radius: 50%; animation: id-spin 0.6s linear infinite; }
@keyframes id-spin { to { transform: rotate(360deg); } }

.main-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; background-image: url('/assets/images/background.png'); background-repeat: repeat; background-size: 128px 127px; z-index: -1; pointer-events: none; }
.main-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(8,30,70,.78) 2.35%,rgba(10,40,90,.35) 80.22%),radial-gradient(88.72% 35% at 30.72%,rgba(3,46,156,0) 0,rgba(3,46,156,.5) 100%),radial-gradient(71% 50%,rgba(0,0,0,0) 56%,rgba(0,10,40,.75) 100%); pointer-events: none; }

/* SEO summary headings */
.seo-summary { max-width: 980px; margin: 32px auto 8px auto; padding: 0 18px; color: rgba(255,255,255,0.55); text-align: left; font-size: 0.7rem; line-height: 1.35; }
.seo-summary h1 { font-family: 'ClashBold', Arial, sans-serif; font-size: 0.9rem; margin: 0 0 6px 0; color: rgba(255,255,255,0.68); }
.seo-summary h2 { font-family: 'ClashBold', Arial, sans-serif; font-size: 0.75rem; margin: 4px 0; color: rgba(255,255,255,0.62); }
.seo-summary p { font-family: 'ClashRegular', Arial, sans-serif; font-size: 0.7rem; line-height: 1.35; margin: 0 0 6px 0; color: rgba(255,255,255,0.56); }
.error { color: #ff4c4c; text-align: center; margin-top: 16px; }

.main-footer {
  background: #1a0a1a;
  color: #ccc;
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 20px;
  text-align: left;
  margin-top: auto;
  border-top: 1px solid #444;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 3;
}
.footer-content {
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  text-align: left;
}
.main-footer a { color: #fff; text-decoration: underline; }

/* Loading Overlay */
.loading-overlay { position: fixed; inset: 0; background: rgba(15,15,25,0.72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.loading-overlay[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.loading-content { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px 38px 34px; background: linear-gradient(160deg,#eef5ff 0%,#d2e1f3 100%); border: 2px solid #b6c9dd; border-radius: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.7); min-width: 320px; }
.loading-spinner { width: 56px; height: 56px; border-radius: 50%; border: 6px solid #ffffff; border-top-color: #ff9800; animation: spin 0.9s linear infinite; box-shadow: 0 0 0 2px #ffcc80 inset, 0 2px 6px rgba(0,0,0,0.25); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-family: 'ClashBold', Arial, sans-serif; font-size: 1.05rem; color: #0b1a2b; text-align: center; letter-spacing: 0.5px; }

/* Inline loading state for autocomplete suggestion boxes */
.rp-suggest-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  color: #475569;
  font-size: 0.9rem;
  font-family: 'ClashRegular', Arial, sans-serif;
}

.rp-suggest-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(71, 85, 105, 0.25);
  border-top-color: #3b82f6;
  animation: rpSuggestSpin 0.7s linear infinite;
}

@keyframes rpSuggestSpin {
  to { transform: rotate(360deg); }
}

/* Mobile Menu */
.mobile-menu-btn { display: none; align-items: center; justify-content: center; color: #0b1a2b; }
.mobile-menu-drawer { position: fixed; inset: 0; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.mobile-menu-drawer.open { pointer-events: auto; opacity: 1; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.mobile-menu-content { position: absolute; top: 0; left: 0; bottom: 0; width: 280px; background: #fff; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; box-shadow: 4px 0 16px rgba(0,0,0,0.2); }
.mobile-menu-drawer.open .mobile-menu-content { transform: translateX(0); }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; background: #f8f9fa; }
.mobile-menu-title { font-family: 'ClashBold', Arial, sans-serif; font-size: 1.2rem; color: #0b1a2b; }
.mobile-menu-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #555; padding: 4px; }
.mobile-menu-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.mobile-menu-nav a, .mobile-menu-nav span { text-decoration: none; color: #0b1a2b; font-family: 'ClashBold', Arial, sans-serif; display: block; padding: 12px 20px; border-bottom: 1px solid #f0f0f0; }
.mobile-menu-nav a:hover { background: #f0f4f8; color: #0a5ec9; }

/* Desktop only class */
.desktop-only { display: block; }

/* Mobile Topbar */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(180deg, #3d5a80 0%, #2c3e50 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  z-index: 100;
  padding: 0 10px;
  align-items: center;
  justify-content: space-between;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mobile-topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-topbar-lang {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: 'ClashBold', Arial, sans-serif;
  font-size: 0.72rem;
  padding: 3px 18px 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 14px;
  transition: background 0.2s;
}

.mobile-topbar-lang:focus {
  background-color: rgba(255,255,255,0.22);
}

.mobile-topbar-lang option {
  background: #2c3e50;
  color: #fff;
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.mobile-menu-btn:active {
  background: rgba(255,255,255,0.15);
}

.mobile-menu-btn svg {
  width: 26px;
  height: 26px;
}

.mobile-user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'ClashBold', Arial, sans-serif;
  font-size: 0.82rem;
  max-width: 140px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, transform 0.15s;
}

.mobile-user-btn:active {
  background: rgba(255,255,255,0.22);
  transform: scale(0.96);
}

.mobile-user-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-user-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-sidebar[aria-hidden="false"] {
  pointer-events: auto;
}

.mobile-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mobile-sidebar[aria-hidden="false"] .mobile-sidebar-overlay {
  opacity: 1;
}

.mobile-sidebar-content {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 28px rgba(0,0,0,0.35);
}

.mobile-sidebar[aria-hidden="false"] .mobile-sidebar-content {
  transform: translateX(0);
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #d1d5db;
  background: linear-gradient(180deg, #3d5a80 0%, #2c3e50 100%);
}

.mobile-sidebar-title {
  font-family: 'ClashBold', Arial, sans-serif;
  font-size: 1.3rem;
  color: #fff;
  margin: 0;
}

.mobile-sidebar-close {
  background: rgba(255,255,255,0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.mobile-sidebar-close svg {
  width: 24px;
  height: 24px;
}

.mobile-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  color: #1e293b;
  text-decoration: none;
  font-family: 'ClashBold', Arial, sans-serif;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
  border-left: 4px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.mobile-nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border-left-color: #2563eb;
}

.mobile-nav-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sidebar-img-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  object-fit: contain;
  filter: grayscale(1) brightness(0.75);
}

.mobile-nav-item.active .sidebar-img-icon {
  filter: grayscale(0.3) brightness(1);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.5);
  z-index: 100;
  padding: 0 0 env(safe-area-inset-bottom, 0px) 0;
  justify-content: space-around;
  align-items: stretch;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255,255,255,0.5);
  padding: 6px 4px 4px;
  transition: color 0.25s ease, transform 0.15s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bottom-nav-item.active {
  color: #fff;
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: #f59e0b;
  border-radius: 0 0 4px 4px;
}

.bottom-nav-item:active {
  color: #60a5fa;
  transform: scale(0.92);
}

.bottom-nav-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-1px);
}

.bottom-nav-icon svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-label {
  font-size: 0.65rem;
  font-family: 'ClashBold', Arial, sans-serif;
  margin-top: 2px;
  letter-spacing: 0.3px;
  transition: opacity 0.2s;
}

/* Mobile responsive */
@media (max-width: 900px) {
  .topbar-nav { display: none; }
  .topbar { padding: 0 12px; height: 52px; }
  .topbar-user-text { display: none; }
  .topbar-user.logged-in .topbar-user-text { display: none; }
  .lang-code { display: none; }
}

@media (max-width: 900px) {
  /* Hide desktop topbar, show mobile */
  .desktop-only { display: none !important; }
  .mobile-topbar { display: flex; }
  .mobile-bottom-nav { display: flex; }
  
  /* Adjust body padding for mobile bars */
  body { 
    padding-top: 52px !important; 
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
    overflow-x: hidden;
  }
  
  /* Prevent horizontal scroll */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  /* Keep footer text style consistent with home page on all non-legal pages */
  body:not(.legal-page) .main-footer {
    margin-bottom: 0;
    padding: 12px 14px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  /* All pages - consistent main content padding */
  main {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Mobile info popups must stay above all content layers */
@media (max-width: 900px) {
  .rp-info-popup,
  .info-popup,
  [class$="-info-popup"],
  [class*=" info-popup"] {
    z-index: 2147483000 !important;
  }
}

