/* Shared header/footer layer. Keep this file loaded after page-local styles. */
.top-bar {
  box-sizing: border-box !important;
  max-width: 100vw !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 20px !important;
  background: rgba(34,34,34,0.85) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.top-bar .logo {
  height: 42px !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}

.top-bar .nav {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.top-bar .top-btn {
  min-width: 70px !important;
  height: 35px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
  border-radius: 50px !important;
  background: rgba(255,255,255,0.25) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  color: #bfbfbf !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  transition: color .22s ease, background .22s ease, border .22s ease, box-shadow .22s ease, transform .22s ease !important;
}

.top-bar .top-btn:hover,
.top-bar .top-btn.home,
.top-bar .top-btn.shop,
.top-bar .top-btn.rules,
.top-bar .top-btn.faq,
.top-bar .top-btn.forum,
.top-bar .top-btn.mods {
  color: #fff !important;
  background: rgba(255,255,255,0.32) !important;
  border-color: rgba(255,255,255,0.45) !important;
}

.hamburger {
  display: none !important;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 70px;
  right: 12px;
  left: 12px;
  z-index: 1000;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(20,20,20,0.98);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.mobile-menu .menu-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mobile-menu .menu-btn + .menu-btn {
  margin-top: 8px;
}

.mobile-menu .menu-btn:hover {
  background: rgba(255,255,255,0.12);
}

#top-right-actions {
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

#user-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

body:not(.user-logged-in) #notif-btn {
  display: none !important;
}

body.user-logged-in #notif-btn {
  display: inline-flex !important;
}

#notif-btn {
  position: relative !important;
}

.notif-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  border-radius: 12px;
  background: #ff4d4f;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  padding: 0 6px;
  margin-left: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.notif-badge.visible {
  display: inline-block;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 200px;
  background: rgba(20,20,20,0.98);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  z-index: 120;
}

.user-dropdown .menu-item {
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.user-dropdown .menu-item:hover {
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}

#logout-btn,
#logout-btn i {
  color: #ff4d4f !important;
}

#logout-btn:hover {
  background: rgba(255,77,79,0.15) !important;
}

.bottom-bar {
  box-sizing: border-box !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  min-height: 90px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 15px 40px !important;
  background: rgba(34,34,34,0.85) !important;
}

.bottom-bar button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 50px !important;
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #fff !important;
  cursor: pointer !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  transition: background .3s ease, transform .18s ease !important;
}

.bottom-bar button:hover {
  background: rgba(255,255,255,0.22) !important;
  transform: translateY(-1px) !important;
}

.animate-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease-out, transform .6s ease-out;
  will-change: opacity, transform;
}

.animate-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus,
.menu-btn:focus,
.top-btn:focus,
.menu-item:focus {
  outline: 3px solid rgba(255,255,255,0.18) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 4px 10px rgba(0,0,0,0.25) !important;
}

@media (max-width: 700px) {
  .top-bar {
    height: 60px !important;
    padding: 0 14px !important;
  }

  .top-bar .logo {
    height: 34px !important;
  }

  .top-bar .nav,
  .top-bar button:not(.hamburger):not(#notif-btn):not(#auth-btn) {
    display: none !important;
  }

  .top-bar #top-right-actions {
    margin-left: 0 !important;
  }

  .top-bar #top-right-actions .top-btn {
    min-width: 40px !important;
    padding: 0 8px !important;
  }

  #auth-name {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #auth-btn .caret {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
    margin-left: auto !important;
  }

  .mobile-menu {
    top: 60px !important;
    max-height: calc(100vh - 110px) !important;
    overflow: auto !important;
  }

  #user-dropdown {
    position: fixed !important;
    top: 70px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    padding: 12px !important;
    z-index: 2147483647 !important;
    max-height: calc(100vh - 110px) !important;
    overflow-y: auto !important;
  }

  #user-dropdown .menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.04) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-scroll,
  .animate-scroll.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .top-bar .top-btn,
  .bottom-bar button,
  .user-dropdown .menu-item {
    transition: none !important;
  }
}
