/* ==========================================================================
   Ugeen Loadout — design system
   Dark editorial, single amber accent, asymmetric layout, generous whitespace.
   ========================================================================== */

:root {
  --bg: #0e0f11;
  --bg-2: #121316;
  --surface: #16171b;
  --surface-2: #1b1c21;
  --text: #ece9e3;
  --text-2: #a3a7ae;
  --text-3: #686d76;
  --accent: #e0a13c;
  --accent-strong: #c98d2a;
  --accent-soft: rgba(224, 161, 60, 0.13);
  --line: rgba(255, 255, 255, 0.07);
  --line-soft: rgba(255, 255, 255, 0.045);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --pad: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 17, 0.82);
  backdrop-filter: saturate(120%) blur(12px);
  -webkit-backdrop-filter: saturate(120%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.brand-name { font-size: 17px; }

.game-nav {
  display: flex;
  gap: 4px;
}

.game-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.game-nav a:hover { color: var(--text); }

.game-nav a.active {
  color: var(--text);
  background: var(--surface);
}

.game-nav a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.02;
  max-width: 15ch;
}

.lede {
  margin: 22px 0 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
}

/* ------------------------------------------------------------- stats card */

.stats {
  justify-self: end;
  margin-top: clamp(20px, 4vw, 56px);
  width: 100%;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 24px;
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
}

.stat + .stat { border-top: 1px solid var(--line-soft); }

.stat-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: right;
}

.stat-updated {
  display: block;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line-soft);
}

.stat-updated .stat-label { display: block; margin-bottom: 3px; }

.stat-updated time {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- filters */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
}

.search-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 220px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-wrap input::placeholder { color: var(--text-3); }

.search-wrap input:focus {
  border-color: var(--accent);
  background: var(--surface-2);
}

.select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.select-wrap label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-left: 2px;
}

.select-wrap select {
  height: 46px;
  padding: 0 38px 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23686d76' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s ease;
}

.select-wrap select:hover,
.select-wrap select:focus { border-color: var(--text-3); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
}

.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.chip:hover { color: var(--text); border-color: var(--text-3); }

.chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ------------------------------------------------------------ tier groups */

.weapon-list { padding: 32px 0 8px; }

.tier {
  margin-top: clamp(40px, 6vw, 64px);
}

.tier-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}

.tier-badge {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.tier-badge.tier-s { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.tier-label {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.tier-count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}

.tier-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-4px);
}

/* ------------------------------------------------------- tier stats bar */

.tier-stats {
  margin-top: 10px;
  padding: 22px 0 6px;
}

.tier-bar {
  display: flex;
  height: 28px;
  gap: 3px;
  border-radius: 8px;
  overflow: hidden;
}

.tier-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
  transition: filter 0.15s ease;
}

.tier-seg:hover { filter: brightness(1.08); }

.seg-s { background: var(--accent); color: #171208; }
.seg-a { background: #d6d9de; color: #171208; }
.seg-b { background: #a9aeb6; color: #171208; }
.seg-c { background: #787e87; color: #fff; }
.seg-d { background: #4e545d; color: #fff; }
.seg-e { background: #33383f; color: #fff; }

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

.legend-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
}

.dot-s { background: var(--accent); }
.dot-a { background: #d6d9de; }
.dot-b { background: #a9aeb6; }
.dot-c { background: #787e87; }
.dot-d { background: #4e545d; }
.dot-e { background: #33383f; }

/* ------------------------------------------------------------- weapon list */

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ------------------------------------------------------------ weapon card */

.weapon {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.weapon:hover { border-color: var(--line); background: var(--surface-2); }

.weapon-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.weapon-head:disabled { cursor: default; }

.weapon-rank {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
}

.meta-rank {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-3);
}

.meta-rank.top {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.class-tag {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text-3);
  white-space: nowrap;
}

.class-tag.first {
  color: var(--text-2);
  border-color: var(--line);
  background: var(--surface-2);
}

.class-tag.plain { border-color: transparent; background: transparent; }

.weapon-main { flex: 1; min-width: 0; }

.weapon-name {
  display: block;
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.weapon-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-3);
}

.weapon-meta .cat { color: var(--text-2); }
.weapon-meta .sep { opacity: 0.5; }

.change-badge {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.change-badge.up { color: #7ec98f; border: 1px solid rgba(126, 201, 143, 0.35); background: rgba(126, 201, 143, 0.10); }
.change-badge.down { color: #e08a8a; border: 1px solid rgba(224, 138, 138, 0.35); background: rgba(224, 138, 138, 0.10); }
.change-badge.new { color: var(--accent); border: 1px solid var(--accent); background: var(--accent-soft); }

.weapon-img {
  flex: none;
  display: flex;
  align-items: center;
}

.weapon-img img {
  height: 44px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.weapon-count {
  flex: none;
  width: 88px;
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
  white-space: nowrap;
}

.weapon-count b { color: var(--text-2); font-weight: 600; }

.chevron {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  color: var(--text-3);
  transition: transform 0.2s ease, color 0.2s ease;
}

.weapon.open .chevron { transform: rotate(45deg); color: var(--accent); }

/* ----------------------------------------------------------- weapon body */

.weapon-body {
  border-top: 1px solid var(--line-soft);
  padding: 16px 18px 18px;
}

.weapon-body[hidden] { display: none; }

.loadout-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tab {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tab .count {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.loadout-panel[hidden] { display: none; }

.loadout-title {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}

.attachments li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}

.attachments .slot {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  flex: none;
}

.attachments .att { text-align: right; font-weight: 520; }

/* ------------------------------------------------------------ no results */

.empty {
  padding: 48px 0;
  color: var(--text-3);
  font-size: 15px;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.footer-note {
  margin: 0;
  max-width: 60ch;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .stats { justify-self: start; max-width: none; }
  .weapon-img img { max-width: 120px; height: 38px; }
}

@media (max-width: 640px) {
  .weapon-img { display: none; }
  .weapon-count { display: none; }
  .weapon-rank { min-width: 60px; }
  .attachments { grid-template-columns: 1fr; }
  .game-nav a { padding: 8px 10px; font-size: 13px; }
}
