/* =========================================================
   DROPPED DEAD DATES — UNIFIED HEADER
   Makes all page headers match The Laboratory
   Load this LAST after page-specific CSS files.
========================================================= */

header.site-header,
header.app-header,
body > header.site-header,
body > header.app-header,
.page-wrapper > header.site-header,
.page-wrapper > header.app-header {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 72px !important;
  box-sizing: border-box !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;

  padding: 10px 22px !important;
  margin: 0 !important;

  background: rgba(6, 6, 6, 0.96) !important;
  border-bottom: 1px solid rgba(21, 251, 0, 0.22) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;

  position: relative !important;
  overflow: visible !important;
  z-index: 50000 !important;
}

/* Logo image like The Laboratory */
header.site-header .logo-link,
header.app-header .logo-link {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-decoration: none !important;
  min-width: 0 !important;
}

header.site-header .site-logo,
header.app-header .site-logo {
  height: 48px !important;
  width: auto !important;
  max-width: 220px !important;
  display: block !important;
  object-fit: contain !important;
}

/* Fallback for pages you have not swapped to image logo yet */
header.site-header .logo,
header.app-header .logo {
  flex: 0 0 auto !important;
  font-family: 'CreepsterLocal', 'Creepster', cursive !important;
  font-size: 1.35rem !important;
  color: #00ff00 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

header.site-header .logo a,
header.app-header .logo a {
  color: #00ff00 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Main nav */
header.site-header .main-nav,
header.app-header .main-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;

  margin: 0 !important;
  padding: 0 !important;
}

header.site-header .main-nav a,
header.app-header .main-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 7px 12px !important;

  color: #00ff00 !important;
  background: #0f0f0f !important;
  border: 1px solid rgba(21, 251, 0, 0.38) !important;
  border-radius: 10px !important;

  text-decoration: none !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;

  box-shadow: none !important;
  text-shadow: none !important;
}

header.site-header .main-nav a:hover,
header.site-header .main-nav a.active,
header.app-header .main-nav a:hover,
header.app-header .main-nav a.active {
  color: #ffffff !important;
  background: rgba(21, 251, 0, 0.12) !important;
  border-color: rgba(21, 251, 0, 0.75) !important;
}

/* Right side */
header.site-header .header-right,
header.app-header .header-right {
  flex: 0 0 auto !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;

  margin: 0 !important;
  padding: 0 !important;

  position: relative !important;
  overflow: visible !important;
  z-index: 50001 !important;
}

/* Notification button */
header.site-header .notif-btn,
header.app-header .notif-btn {
  width: 42px !important;
  height: 42px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  border: 1px solid rgba(21, 251, 0, 0.30) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.35) !important;

  color: #00ff00 !important;
  font-size: 1.25rem !important;
  cursor: pointer !important;

  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Avatar */
header.site-header .user-menu,
header.app-header .user-menu {
  position: relative !important;
  overflow: visible !important;
  z-index: 50002 !important;
}

header.site-header .avatar-btn,
header.app-header .avatar-btn {
  width: 46px !important;
  height: 46px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 2px solid #00ff00 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.35) !important;

  overflow: hidden !important;
  cursor: pointer !important;
}

header.site-header .avatar-btn img,
header.app-header .avatar-btn img,
header.site-header .user-menu img,
header.app-header .user-menu img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 999px !important;
  border: 0 !important;
}

/* Dropdowns */
header.site-header #userDropdown,
header.app-header #userDropdown,
header.site-header #notifDropdown,
header.app-header #notifDropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;

  width: 230px !important;
  max-width: min(92vw, 360px) !important;
  max-height: min(70vh, 460px) !important;
  overflow: auto !important;

  background: rgba(7, 7, 7, 0.98) !important;
  border: 1px solid rgba(21, 251, 0, 0.42) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.70) !important;

  padding: 8px !important;
  z-index: 100000 !important;
}

header.site-header #notifDropdown,
header.app-header #notifDropdown {
  right: 58px !important;
  width: min(340px, 92vw) !important;
}

/* User dropdown hidden/open states */
header.site-header .dropdown,
header.app-header .dropdown {
  display: none !important;
}

header.site-header .user-menu.open .dropdown,
header.site-header .dropdown.open,
header.app-header .user-menu.open .dropdown,
header.app-header .dropdown.open {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  pointer-events: auto !important;
}

/* Dropdown links */
header.site-header .dropdown a,
header.app-header .dropdown a {
  display: block !important;
  margin: 0 !important;
  padding: 10px 12px !important;

  color: #00ff00 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 9px !important;

  text-decoration: none !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

header.site-header .dropdown a:hover,
header.app-header .dropdown a:hover {
  background: rgba(21, 251, 0, 0.12) !important;
  color: #ffffff !important;
}

/* Mobile */
@media (max-width: 820px) {
  header.site-header,
  header.app-header,
  body > header.site-header,
  body > header.app-header,
  .page-wrapper > header.site-header,
  .page-wrapper > header.app-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    min-height: 0 !important;
  }

  header.site-header .logo-link,
  header.app-header .logo-link {
    order: 1 !important;
    justify-content: center !important;
    width: 100% !important;
  }

  header.site-header .site-logo,
  header.app-header .site-logo {
    height: 42px !important;
    max-width: min(78vw, 240px) !important;
  }

  header.site-header .main-nav,
  header.app-header .main-nav {
    order: 2 !important;
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  header.site-header .main-nav a,
  header.app-header .main-nav a {
    width: 100% !important;
    padding: 11px 8px !important;
    font-size: 0.92rem !important;
  }

  header.site-header .header-right,
  header.app-header .header-right {
    order: 3 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  header.site-header #userDropdown,
  header.app-header #userDropdown,
  header.site-header #notifDropdown,
  header.app-header #notifDropdown {
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(94vw, 360px) !important;
  }
}

@media (max-width: 380px) {
  header.site-header .main-nav,
  header.app-header .main-nav {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   MATCHES PAGE FINAL HEADER CLEANUP
   Matches.css uses broad body/header/nav/avatar rules.
   This forces Matches to match The Laboratory header.
========================================================= */

body.matches-page > header.site-header,
body.matches-page header.site-header {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  text-shadow: none !important;
  color: #00ff00 !important;
  line-height: 1.45 !important;

  width: 100% !important;
  max-width: 100% !important;
  min-height: 72px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;

  padding: 10px 22px !important;
  margin: 0 !important;

  background: rgba(6, 6, 6, 0.96) !important;
  border-bottom: 1px solid rgba(21, 251, 0, 0.22) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;

  position: relative !important;
  overflow: visible !important;
  z-index: 50000 !important;
}

body.matches-page header.site-header *,
body.matches-page header.site-header *::before,
body.matches-page header.site-header *::after {
  text-shadow: none !important;
  box-sizing: border-box !important;
}

body.matches-page header.site-header .logo-link {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-decoration: none !important;
}

body.matches-page header.site-header .site-logo {
  height: 48px !important;
  width: auto !important;
  max-width: 220px !important;
  display: block !important;
  object-fit: contain !important;
}

body.matches-page header.site-header .main-nav {
  flex: 1 1 auto !important;
  min-width: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;

  margin: 0 !important;
  padding: 0 !important;
}

body.matches-page header.site-header .main-nav a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 7px 12px !important;

  color: #00ff00 !important;
  background: #0f0f0f !important;
  border: 1px solid rgba(21, 251, 0, 0.38) !important;
  border-radius: 10px !important;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;

  text-decoration: none !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

body.matches-page header.site-header .main-nav a:hover,
body.matches-page header.site-header .main-nav a.active {
  color: #ffffff !important;
  background: rgba(21, 251, 0, 0.12) !important;
  border-color: rgba(21, 251, 0, 0.75) !important;
}

body.matches-page header.site-header .header-right {
  flex: 0 0 auto !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;

  margin: 0 !important;
  padding: 0 !important;

  position: relative !important;
  overflow: visible !important;
  z-index: 50001 !important;
}

body.matches-page header.site-header .notif-btn {
  width: 42px !important;
  height: 42px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 1px solid rgba(21, 251, 0, 0.30) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.35) !important;

  color: #00ff00 !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 1.25rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.matches-page header.site-header .user-menu {
  position: relative !important;
  overflow: visible !important;
  z-index: 50002 !important;
  cursor: default !important;
}

body.matches-page header.site-header .avatar-btn {
  width: 46px !important;
  height: 46px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  border: 2px solid #00ff00 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.35) !important;

  overflow: hidden !important;
  cursor: pointer !important;
}

body.matches-page header.site-header .avatar-btn img,
body.matches-page header.site-header .user-menu img {
  width: 100% !important;
  height: 100% !important;

  display: block !important;
  object-fit: cover !important;

  border: 0 !important;
  border-radius: 999px !important;
}

body.matches-page header.site-header #userDropdown,
body.matches-page header.site-header #notifDropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;

  width: 230px !important;
  max-width: min(92vw, 360px) !important;
  max-height: min(70vh, 460px) !important;
  overflow: auto !important;

  background: rgba(7, 7, 7, 0.98) !important;
  border: 1px solid rgba(21, 251, 0, 0.42) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.70) !important;

  padding: 8px !important;
  z-index: 999999 !important;
}

body.matches-page header.site-header #notifDropdown {
  right: 58px !important;
  width: min(340px, 92vw) !important;
}

body.matches-page header.site-header .dropdown {
  display: none !important;
}

body.matches-page header.site-header .user-menu.open .dropdown,
body.matches-page header.site-header .dropdown.open {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  pointer-events: auto !important;
}

body.matches-page header.site-header .dropdown a {
  display: block !important;
  margin: 0 !important;
  padding: 10px 12px !important;

  color: #00ff00 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 9px !important;

  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;

  text-decoration: none !important;
}

body.matches-page header.site-header .dropdown a:hover {
  background: rgba(21, 251, 0, 0.12) !important;
  color: #ffffff !important;
}

/* Keep the Blood / Grave / Gold buttons from visually looking like part of the header */
body.matches-page .skin-toggle {
  position: relative !important;
  z-index: 2 !important;
  margin: 14px auto 0 !important;
  padding: 0 12px !important;

  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
}

/* Mobile: match the same stacked Lab header behavior */
@media (max-width: 820px) {
  body.matches-page > header.site-header,
  body.matches-page header.site-header {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    min-height: 0 !important;
  }

  body.matches-page header.site-header .logo-link {
    order: 1 !important;
    justify-content: center !important;
    width: 100% !important;
  }

  body.matches-page header.site-header .site-logo {
    height: 42px !important;
    max-width: min(78vw, 240px) !important;
  }

  body.matches-page header.site-header .main-nav {
    order: 2 !important;
    width: 100% !important;

    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  body.matches-page header.site-header .main-nav a {
    width: 100% !important;
    padding: 11px 8px !important;
    font-size: 0.92rem !important;
  }

  body.matches-page header.site-header .header-right {
    order: 3 !important;
    width: 100% !important;
    justify-content: center !important;
  }

  body.matches-page header.site-header #userDropdown,
  body.matches-page header.site-header #notifDropdown {
    top: calc(100% + 10px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(94vw, 360px) !important;
  }
}

@media (max-width: 380px) {
  body.matches-page header.site-header .main-nav {
    grid-template-columns: 1fr !important;
  }
}