.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: var(--header-h);
  background: rgba(11, 14, 20, 0.88);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 3px 0 0 var(--accent);
}

.header__inner {
  height: 100%;
  max-width: var(--grid-max);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
  display: flex;
  align-items: center;
  gap: var(--s-6);
}

@media (max-width: 1024px) {
  .header__inner { gap: var(--s-3); }
}

.header__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: transform var(--d-fast) var(--ease-std);
}
.header__brand:hover { transform: translateY(-1px); }

.header__brand-svg {
  height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .header__brand-svg { height: 28px; }
}

.header__nav { flex: 1; }

.header__search {
  flex: 0 1 320px;
  position: relative;
}

.header__search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-1);
  font-size: var(--t-sm);
  transition: border-color var(--d-fast) var(--ease-std), background var(--d-fast) var(--ease-std);
}
.header__search input:focus { border-color: var(--accent); background: var(--bg-1); outline: none; }
.header__search input::placeholder { color: var(--ink-3); }

.header__search::before {
  content: "";
  position: absolute;
  left: 12px; top: 50%;
  width: 14px; height: 14px;
  border: 1.5px solid var(--ink-3);
  border-radius: 50%;
  transform: translateY(-58%);
}
.header__search::after {
  content: "";
  position: absolute;
  left: 22px; top: 50%;
  width: 6px; height: 1.5px;
  background: var(--ink-3);
  transform: translateY(0) rotate(45deg);
  transform-origin: left;
}

.header__actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }

.header__balance {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-sm);
  font-weight: 600;
}
.header__balance__label { color: var(--ink-3); font-size: var(--t-xs); }
.header__balance__value { color: var(--accent); }

.header__user {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--ink-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-sm);
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid var(--bg-1);
  transition: transform var(--d-fast) var(--ease-std);
}
.header__user:hover { transform: scale(1.08); }

.header__betslip-toggle {
  position: relative;
}

.header__betslip-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  background: var(--accent);
  color: var(--ink-on-accent);
  border-radius: var(--r-pill);
  font-size: var(--t-2xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-0);
}

.header__menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  position: relative;
}
.header__menu-toggle:hover { background: var(--bg-2); }
.header__menu-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--ink-1);
  border-radius: 1px;
}
.header__menu-toggle span:nth-child(1) { top: 14px; }
.header__menu-toggle span:nth-child(2) { top: 19px; }
.header__menu-toggle span:nth-child(3) { top: 24px; }

@media (max-width: 1024px) {
  .header__nav { display: none; }
  .header__menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .header__search { display: none; }
  .header__balance__label { display: none; }
  .header__actions { gap: var(--s-1); }
  .header__balance { padding: 6px 10px; font-size: var(--t-xs); }
}

@media (max-width: 480px) {
  .header__balance { display: none; }
  .header__brand-svg { height: 26px; }
}

.compliance-strip {
  background: var(--bg-inset);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 6px var(--grid-gutter);
  text-align: center;
  font-size: var(--t-xs);
  color: var(--ink-3);
  letter-spacing: var(--tr-wide);
}

@media (max-width: 480px) {
  .compliance-strip {
    font-size: var(--t-2xs);
    line-height: 1.4;
    padding: 5px var(--grid-gutter);
  }
}

.compliance-strip__warn { color: var(--ink-2); font-weight: 600; }
.compliance-strip a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.compliance-strip a:hover { color: var(--accent); }
