@font-face {
  font-family: "TF2";
  src: url("assets/fonts/TF2.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "TF2 Build";
  src: url("assets/fonts/TF2Build.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "TF2 Secondary";
  src: url("assets/fonts/TF2Secondary.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg-wood: #5a4333;
  --bg-wood-dark: #35271d;
  --bg-concrete: #3f352d;
  --paper: #efe2c8;
  --paper-2: #f7efd8;
  --paper-line: rgba(72, 48, 24, 0.2);
  --ink: #2b1f14;
  --ink-soft: #564535;
  --cream: #fff7eb;
  --muted: #7f6b56;
  --panel-shadow: 0 18px 38px rgba(22, 13, 7, 0.28);
  --red: #9b4f3e;
  --red-bright: #d2744f;
  --blue: #587d98;
  --blue-bright: #7eabc6;
  --gold: #af7b17;
  --gold-bright: #daa849;
  --green: #839a41;
  --green-deep: #617c30;
  --yellow: #d8ab44;
  --yellow-deep: #a57319;
  --border: #61452f;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "TF2 Secondary", "Trebuchet MS", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(25, 17, 11, 0.36), rgba(25, 17, 11, 0.62)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    url("assets/tf2-classified/wood.jpg") center top / 420px 420px repeat,
    url("assets/tf2-classified/concrete.jpg") center top / 540px 540px repeat fixed,
    linear-gradient(180deg, var(--bg-wood), var(--bg-concrete) 40%, var(--bg-wood-dark));
  background-size: auto, 56px 56px, 56px 56px, 420px 420px, 540px 540px, auto;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  opacity: 0.08;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px 100%),
    linear-gradient(90deg, transparent 0 49%, rgba(255, 255, 255, 0.7) 49.5%, transparent 50% 100%),
    linear-gradient(transparent 0 49%, rgba(255, 255, 255, 0.7) 49.5%, transparent 50% 100%);
  background-size: 140px 140px, 140px 140px, 140px 140px;
}

body::after {
  opacity: 0.07;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.6) 0.8px, transparent 0.8px),
    radial-gradient(rgba(255, 255, 255, 0.4) 0.8px, transparent 0.8px);
  background-position: 0 0, 25px 25px;
  background-size: 50px 50px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

code {
  font-family: "Courier New", monospace;
  padding: 0.18rem 0.44rem;
  border-radius: 10px;
  background: rgba(73, 47, 22, 0.08);
  border: 1px solid rgba(73, 47, 22, 0.14);
}

.hidden {
  display: none !important;
}

.container {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page {
  padding: 22px 0 40px;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(180deg, rgba(43, 30, 20, 0.92), rgba(35, 24, 16, 0.8));
  border-bottom: 2px solid rgba(255, 233, 205, 0.12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.topbar__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 247, 233, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.brand__textWrap {
  display: grid;
  gap: 3px;
}

.brand__title,
.brand__text {
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.28);
}

.brand__sub {
  font-family: "TF2";
  font-size: 0.8rem;
  color: rgba(255, 238, 214, 0.76);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn,
.ghost,
.authMenu__trigger,
.notifBtn,
.notifMarkAll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 3px solid var(--border);
  cursor: pointer;
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover,
.ghost:hover,
.authMenu__trigger:hover,
.notifBtn:hover,
.notifMarkAll:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.btn {
  color: #fff9f0;
  background:
    linear-gradient(180deg, var(--gold-bright), var(--red-bright));
  box-shadow:
    0 6px 0 #463224,
    0 10px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--secondary {
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
}

.btn--warn {
  background: linear-gradient(180deg, #c35b4b, #994233);
}

.ghost,
.authMenu__trigger,
.notifBtn,
.notifMarkAll {
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(43, 31, 21, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.8rem;
}

#adminDashboardBtn {
  border-color: #7a5744;
}

.card,
.panelSurface {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 4px solid var(--border);
  background:
    linear-gradient(180deg, rgba(246, 236, 214, 0.96), rgba(231, 214, 182, 0.98));
  box-shadow: var(--panel-shadow);
}

.card::before,
.panelSurface::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background:
    repeating-linear-gradient(-45deg, rgba(61, 41, 22, 0.36) 0 12px, transparent 12px 24px);
  pointer-events: none;
}

.card::after,
.panelSurface::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08));
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
  opacity: 0.46;
  pointer-events: none;
}

.sectionRibbon,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff7ee;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: 2px solid rgba(73, 47, 22, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.theme-forum .sectionRibbon,
.theme-forum .eyebrow {
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
}

.theme-status .sectionRibbon,
.theme-status .eyebrow,
.theme-profile .sectionRibbon,
.theme-progress .sectionRibbon {
  background: linear-gradient(180deg, #cab15b, #9f7d27);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
  color: var(--ink);
  font-family: "TF2 Build", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
}

.lead {
  font-size: 1.06rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

.muted {
  color: var(--muted);
}

.pill,
.chip,
.badge,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 2px solid rgba(73, 47, 22, 0.14);
  background: rgba(255, 247, 233, 0.78);
}

.tag--off {
  color: #7d2f23;
  background: rgba(177, 79, 55, 0.14);
}

.state {
  padding: 18px;
  border-radius: 16px;
  border: 2px dashed rgba(73, 47, 22, 0.22);
  background: rgba(255, 250, 242, 0.72);
  color: var(--ink-soft);
}

.state--error,
.hint.is-error {
  color: #8f2e24;
}

.hint.is-ok {
  color: #4c6e26;
}

.tableWrap {
  overflow: auto;
}

.table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(73, 47, 22, 0.14);
  text-align: left;
}

.table thead th {
  color: var(--muted);
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.34);
}

.center {
  text-align: center;
}

.pageFooter {
  margin-top: 28px;
  color: rgba(255, 239, 214, 0.88);
}

.pageFooter__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  padding: 18px 0 28px;
}

.pageFooter__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pageFooter__nav a {
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 239, 214, 0.14);
  background: rgba(255, 239, 214, 0.06);
  font-family: "TF2 Build", Impact, sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.authMenu {
  position: relative;
}

.authMenu__avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 999px;
}

.authMenu__dropdown,
.notifDropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, 88vw);
  padding: 10px;
  border-radius: 16px;
  border: 3px solid var(--border);
  background: linear-gradient(180deg, rgba(247, 239, 220, 0.98), rgba(234, 217, 185, 0.98));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  z-index: 90;
}

.authMenu__header,
.notifHead {
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(73, 47, 22, 0.14);
}

.authMenu__name,
.notifTitle {
  font-family: "TF2 Build", Impact, sans-serif;
  text-transform: uppercase;
}

.authMenu__steamid,
.notifMeta,
.notifEmpty {
  color: var(--muted);
  font-size: 0.82rem;
}

.authMenu__item,
.notifItem {
  display: block;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: 12px;
  border: 2px solid rgba(73, 47, 22, 0.12);
  background: rgba(255, 255, 255, 0.4);
}

.authMenu__item:hover,
.notifItem:hover {
  background: rgba(255, 255, 255, 0.72);
}

.authMenu__item--danger {
  color: #8f2e24;
}

.notifWrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifBtn {
  width: 42px;
  padding: 0;
}

.notifBtn .bellSvg {
  width: 18px;
  height: 18px;
}

.notifBadge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  color: #fff;
  font-size: 11px;
  font-family: "TF2 Build", Impact, sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.notifList {
  max-height: 380px;
  overflow: auto;
}

.notifItem.is-unread {
  background: rgba(126, 171, 198, 0.24);
}

.notifBody {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.authorLink {
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-color: rgba(73, 47, 22, 0.2);
}

.bg,
.overlay,
.vignette {
  display: none;
}

@media (max-width: 920px) {
  .topbar__inner {
    grid-template-columns: 1fr;
  }

  .topbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100%, calc(100% - 16px));
  }

  .page {
    padding-top: 16px;
  }

  .btn,
  .ghost,
  .authMenu__trigger {
    width: 100%;
  }

  .topbar__actions > * {
    flex: 1 1 100%;
  }

  .brand__logo {
    width: 52px;
    height: 52px;
  }
}
