/* TITAN Header 2.0 — Floating Command Dock
   Loaded after the legacy header rules to keep the redesign isolated. */

:root {
  --header-h: 78px;
  --th2-shell: rgba(11, 15, 29, .84);
  --th2-shell-strong: rgba(12, 17, 33, .97);
  --th2-line: rgba(151, 173, 216, .13);
  --th2-line-strong: rgba(112, 151, 235, .28);
  --th2-blue: #4d8dff;
  --th2-cyan: #67e8f9;
  --th2-shadow: 0 18px 55px rgba(0, 0, 0, .30);
}

.site-header.titan-header {
  height: var(--header-h);
  padding: 7px 16px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.titan-header__ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.titan-header__ambient::before {
  position: absolute;
  top: -65px;
  left: 50%;
  width: min(720px, 56vw);
  height: 115px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(59,130,246,.09), transparent 72%);
  filter: blur(4px);
  transform: translateX(-50%);
  content: "";
}

.titan-header .titan-header__inner {
  position: relative;
  max-width: 1240px;
  height: 64px;
  gap: 16px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--th2-line);
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 48%),
    var(--th2-shell);
  box-shadow:
    var(--th2-shadow),
    inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(22px) saturate(125%);
}

.titan-header .titan-header__inner::after {
  position: absolute;
  right: 22%;
  bottom: -1px;
  left: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77,141,255,.45), transparent);
  content: "";
  pointer-events: none;
}

/* Brand */
.titan-header .titan-brand {
  align-items: center;
  gap: 10px;
  min-width: 166px;
  color: var(--text);
}

.titan-brand__mark {
  position: relative;
  isolation: isolate;
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(100, 150, 255, .34);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(71,127,255,.24), rgba(15,22,43,.80)),
    #11182a;
  box-shadow:
    0 9px 22px rgba(19, 64, 154, .24),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.titan-brand__mark::before,
.titan-brand__mark::after,
.titan-brand__mark i {
  position: absolute;
  width: 7px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--th2-cyan), var(--th2-blue));
  content: "";
  opacity: .82;
  transform: rotate(34deg);
}

.titan-brand__mark::before { left: 1px; top: -7px; }
.titan-brand__mark i { left: 10px; top: -9px; }
.titan-brand__mark::after { right: 1px; bottom: -8px; opacity: .35; }

.titan-brand__mark b {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: -.06em;
  text-shadow: 0 2px 7px rgba(0,0,0,.8);
}

.titan-brand__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.titan-brand__copy > span {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}

.titan-brand__copy strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -.055em;
}

.titan-brand__copy em {
  color: var(--th2-blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .11em;
}

.titan-brand__copy small {
  color: #53617f;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .19em;
  white-space: nowrap;
}

/* Segmented navigation rail */
.titan-header .titan-nav-rail {
  width: max-content;
  max-width: 100%;
  flex: 0 1 auto;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 12px;
  background: rgba(2, 5, 13, .38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}

.titan-header .titan-nav-link {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #74809c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.titan-header .titan-nav-link::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
  content: "";
  opacity: 0;
  transition: opacity .18s ease;
}

.titan-header .titan-nav-link:hover {
  border-color: rgba(255,255,255,.075);
  background: rgba(255,255,255,.035);
  color: #d9e2f6;
  transform: translateY(-1px);
}

.titan-header .titan-nav-link:hover::before,
.titan-header .titan-nav-link.nav-active::before {
  opacity: 1;
}

.titan-header .titan-nav-link.nav-active {
  border-color: rgba(86,136,242,.25);
  background:
    linear-gradient(180deg, rgba(74,128,245,.14), rgba(37,71,142,.07));
  color: #fff;
  box-shadow:
    0 9px 22px rgba(16, 58, 142, .14),
    inset 0 0 0 1px rgba(255,255,255,.015);
}

.titan-nav-link__icon {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
}

.titan-nav-link__icon svg,
.mobile-nav-link__icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.titan-nav-link__label {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.titan-nav-link__indicator {
  position: absolute;
  right: 14px;
  bottom: 2px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--th2-blue), var(--th2-cyan));
  box-shadow: 0 0 13px rgba(77,141,255,.65);
  opacity: 0;
  transform: scaleX(.35);
  transition: opacity .18s ease, transform .18s ease;
}

.titan-nav-link.nav-active .titan-nav-link__indicator {
  opacity: 1;
  transform: scaleX(1);
}

/* Utility dock */
.titan-header .titan-header-tools {
  gap: 7px;
}

.titan-header .titan-language-switcher > summary,
.titan-header .titan-header-search,
.titan-header .titan-logout {
  height: 42px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}

.titan-header .titan-language-switcher > summary {
  min-width: 52px;
  padding: 0 9px;
}

.titan-header .titan-language-switcher > summary:hover,
.titan-header .titan-language-switcher[open] > summary,
.titan-header .titan-header-search:hover,
.titan-header .titan-logout:hover {
  border-color: var(--th2-line-strong);
  background: rgba(65,104,190,.09);
  color: #fff;
}

.titan-header .titan-language-menu {
  top: calc(100% + 12px);
  border-color: rgba(108,142,211,.22);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), transparent),
    var(--th2-shell-strong);
  box-shadow: 0 25px 70px rgba(0,0,0,.48);
}

.titan-header .titan-header-search {
  min-width: 126px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  color: #74809b;
  cursor: pointer;
  transition:
    border-color .18s ease,
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.titan-header .titan-header-search:hover {
  transform: translateY(-1px);
}

.titan-header-search__icon {
  width: 16px;
  height: 16px;
  display: grid;
  flex: 0 0 16px;
  place-items: center;
}

.titan-header-search__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.titan-header-search__label {
  min-width: 0;
  flex: 1;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.titan-header .titan-header-search kbd {
  min-width: 35px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(255,255,255,.07);
  border-bottom-color: rgba(255,255,255,.13);
  border-radius: 6px;
  background: rgba(0,0,0,.22);
  color: #596784;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .03em;
}

.titan-header .titan-user-pill {
  min-width: 146px;
  height: 46px;
  gap: 9px;
  padding: 4px 9px 4px 5px;
  border-color: rgba(255,255,255,.075);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.032), transparent),
    rgba(35, 46, 70, .50);
}

.titan-header .titan-user-pill:hover,
.titan-header .titan-user-pill.nav-active {
  border-color: rgba(92,143,255,.42);
  background:
    linear-gradient(180deg, rgba(91,140,255,.10), transparent),
    rgba(36, 48, 74, .72);
  box-shadow: 0 10px 25px rgba(13,46,112,.18);
  transform: translateY(-1px);
}

.titan-user-pill__avatar {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.titan-user-pill__avatar img {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px !important;
  object-fit: cover;
}

.titan-user-pill__avatar i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #182036;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74,222,128,.55);
}

.titan-user-pill__copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0;
}

.titan-user-pill__copy strong,
.titan-user-pill__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titan-user-pill__copy strong {
  color: #f5f7ff;
  font-size: 10px;
  font-weight: 900;
}

.titan-user-pill__copy small {
  color: #65718e;
  font-size: 7px;
  font-weight: 800;
}

.titan-user-pill__arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: #53617e;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.titan-header .titan-logout {
  width: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #8d6671;
  opacity: 1;
}

.titan-header .titan-logout svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.titan-header .titan-logout span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Mobile drawer */
.mobile-nav {
  padding-top: 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(59,130,246,.12), transparent 34%),
    rgba(5,8,18,.985);
}

.mobile-nav__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
  padding: 0 4px 9px;
  color: #61708d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mobile-nav__eyebrow small {
  color: var(--th2-blue);
  font-size: 8px;
}

.mobile-nav-link {
  min-height: 54px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  gap: 11px;
  padding: 8px 12px;
  border-color: rgba(255,255,255,.055);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
  font-size: 13px;
}

.mobile-nav-link__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: #7382a1;
}

.mobile-nav-link > i {
  color: #4c5873;
  font-style: normal;
}

.mobile-nav-link:hover,
.mobile-nav-link.nav-active {
  border-color: rgba(80,133,246,.30);
  background:
    linear-gradient(90deg, rgba(59,130,246,.11), rgba(255,255,255,.018));
}

.mobile-nav-link.nav-active .mobile-nav-link__icon {
  border-color: rgba(103,232,249,.24);
  background: rgba(59,130,246,.12);
  color: #8ddcf3;
  box-shadow: 0 7px 18px rgba(29,78,180,.13);
}

/* Desktop compression */
@media (max-width: 1180px) {
  .titan-header .titan-brand {
    min-width: auto;
  }

  .titan-brand__copy small {
    display: none;
  }

  .titan-header .titan-nav-link {
    padding-inline: 10px;
  }

  .titan-header .titan-user-pill {
    min-width: 126px;
  }

  .titan-user-pill__copy small {
    display: none;
  }
}

@media (max-width: 1040px) {
  .titan-header .titan-header__inner {
    gap: 10px;
  }

  .titan-header .titan-brand {
    min-width: 42px;
  }

  .titan-brand__copy {
    display: none;
  }

  .titan-header .titan-nav-link {
    gap: 6px;
    padding-inline: 9px;
  }

  .titan-header .titan-header-search {
    min-width: 42px;
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .titan-header-search__label,
  .titan-header .titan-header-search kbd {
    display: none;
  }

  .titan-header .titan-user-pill {
    min-width: 46px;
    width: 46px;
    padding: 5px;
  }

  .titan-user-pill__copy,
  .titan-user-pill__arrow {
    display: none;
  }
}

/* Tablet switches to the rich mobile drawer before space gets cramped. */
@media (max-width: 900px) {
  .titan-header .primary-nav {
    display: none;
  }

  .titan-header .hamburger {
    display: flex;
    width: 42px;
    height: 42px;
    margin-left: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.025);
  }

  .titan-header .titan-logout {
    display: none;
  }

  .titan-header .titan-user-pill {
    display: flex !important;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 70px;
  }

  .site-header.titan-header {
    height: var(--header-h);
    padding: 5px 8px;
  }

  .titan-header .titan-header__inner {
    height: 60px;
    gap: 7px;
    padding: 0 7px 0 9px;
    border-radius: 14px;
  }

  .titan-header .titan-brand {
    min-width: 0;
    flex: 1;
  }

  .titan-header .titan-brand__mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .titan-header .titan-brand__copy {
    display: grid;
  }

  .titan-header .titan-brand__copy small {
    display: none;
  }

  .titan-header .titan-brand__copy strong {
    font-size: 15px;
  }

  .titan-header .titan-brand__copy em {
    font-size: 9px;
  }

  .titan-header .titan-user-pill {
    display: none !important;
  }

  .titan-header .titan-header-search {
    display: flex;
    width: 39px;
    min-width: 39px;
    height: 39px;
  }

  .titan-header .hamburger {
    width: 39px;
    height: 39px;
  }

  .mobile-nav {
    top: var(--header-h);
    padding: 15px 12px 30px;
  }
}

@media (max-width: 390px) {
  .titan-header .titan-brand__copy em {
    display: none;
  }

  .titan-header .titan-brand__copy strong {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .titan-header .titan-nav-link,
  .titan-header .titan-header-search,
  .titan-header .titan-user-pill,
  .titan-header .titan-language-switcher > summary,
  .mobile-nav-link {
    transition: none;
  }
}

/* Header 2.1 — Steam-only authentication */
.titan-header .titan-steam-login {
  position: relative;
  isolation: isolate;
  min-width: 176px;
  height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(100,168,255,.30);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(33,101,184,.92), rgba(30,73,126,.92) 55%, rgba(20,48,80,.96));
  color: #fff;
  box-shadow:
    0 12px 28px rgba(9,49,112,.24),
    inset 0 1px 0 rgba(255,255,255,.13);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease,
    filter .18s ease;
}

.titan-header .titan-steam-login::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 0, rgba(255,255,255,.17), transparent 35%),
    linear-gradient(110deg, transparent 25%, rgba(255,255,255,.06) 48%, transparent 70%);
  content: "";
  transform: translateX(-45%);
  transition: transform .32s ease;
}

.titan-header .titan-steam-login:hover,
.titan-header .titan-steam-login:focus-visible {
  border-color: rgba(132,197,255,.58);
  box-shadow:
    0 16px 36px rgba(8,60,142,.34),
    inset 0 1px 0 rgba(255,255,255,.17);
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-1px);
}

.titan-header .titan-steam-login:hover::before,
.titan-header .titan-steam-login:focus-visible::before {
  transform: translateX(42%);
}

.titan-steam-login__icon,
.mobile-steam-login__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: rgba(5,18,34,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.titan-steam-login__icon svg,
.mobile-steam-login__icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.titan-steam-login__copy,
.mobile-steam-login__copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.titan-steam-login__copy strong,
.mobile-steam-login__copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titan-steam-login__copy small,
.mobile-steam-login__copy small {
  color: rgba(225,239,255,.62);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .04em;
  white-space: nowrap;
}

.titan-steam-login__arrow,
.mobile-steam-login__arrow {
  color: rgba(232,244,255,.72);
  font-size: 14px;
  transition: transform .18s ease;
}

.titan-steam-login:hover .titan-steam-login__arrow,
.mobile-steam-login:hover .mobile-steam-login__arrow {
  transform: translateX(2px);
}

.mobile-steam-login {
  min-height: 60px;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 4px;
  padding: 9px 12px 9px 9px;
  border: 1px solid rgba(100,168,255,.30);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(135deg, rgba(34,105,191,.90), rgba(23,58,99,.96));
  color: #fff;
  box-shadow:
    0 14px 32px rgba(5,35,82,.25),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.mobile-steam-login__icon {
  width: 40px;
  height: 40px;
}

.mobile-steam-login__icon svg {
  width: 24px;
  height: 24px;
}

.mobile-steam-login__copy strong {
  font-size: 12px;
}

.mobile-steam-login__copy small {
  font-size: 8px;
}

@media (max-width: 1180px) {
  .titan-header .titan-steam-login {
    min-width: 154px;
  }

  .titan-steam-login__copy small {
    display: none;
  }
}

@media (max-width: 1040px) {
  .titan-header .titan-steam-login {
    min-width: 46px;
    width: 46px;
    grid-template-columns: 1fr;
    padding: 5px;
  }

  .titan-steam-login__copy,
  .titan-steam-login__arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .titan-header .titan-steam-login {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .titan-header .titan-steam-login,
  .titan-header .titan-steam-login::before,
  .titan-steam-login__arrow,
  .mobile-steam-login__arrow {
    transition: none;
  }
}

