/* games.masterz.com.ua: one dark theme, HEV orange as the accent. */
:root {
  --bg: #101214;
  --panel: #181b1f;
  --panel-2: #1f2328;
  --line: #2b3036;
  --text: #d9dde1;
  --muted: #8a939c;
  --accent: #ff8c1a;
  --accent-dim: #b8640f;
  --ok: #4cc26b;
  --bad: #e0524a;
  --gold: #f2c94c;
  --silver: #c3ccd5;
  --bronze: #d08b55;
  --radius: 8px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 24px; padding-bottom: 48px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; margin-top: 20px; }
h4 { font-size: 14px; font-weight: 600; }
section { margin-bottom: 32px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.strong { font-weight: 600; }
.notice {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: var(--radius);
}

/* Header and footer */
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 56px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: .02em; }
.logo:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: var(--text); padding: 6px 10px; border-radius: 6px; }
.nav a:hover, .nav a.active { background: var(--panel-2); color: var(--accent); text-decoration: none; }
.lang { display: flex; gap: 2px; }
.lang button {
  background: none; border: 1px solid transparent; color: var(--muted);
  font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 4px; cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button.active { color: var(--accent); border-color: var(--line); }
@media (max-width: 600px) {
  .header-row { gap: 4px 12px; padding: 8px 16px; justify-content: space-between; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -10px; }
}
.site-footer { border-top: 1px solid var(--line); padding: 16px 0; font-size: 13px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Buttons and forms */
.button {
  display: inline-block; background: var(--accent); color: #111; border: 1px solid var(--accent);
  font: inherit; font-weight: 600; padding: 6px 14px; border-radius: 6px; cursor: pointer;
}
.button:hover { background: #ffa042; text-decoration: none; }
.button.ghost { background: none; color: var(--text); border-color: var(--line); font-weight: 400; font-family: var(--mono); font-size: 13px; }
.button.ghost:hover { border-color: var(--accent); }
.search { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search input {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font: inherit; padding: 6px 10px; border-radius: 6px; min-width: 260px;
}
.search input:focus { outline: 2px solid var(--accent-dim); border-color: var(--accent-dim); }

/* Server cards */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.server { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.server-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.server-head h3 { margin: 0; flex: 1; font-size: 17px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }
.server.offline .dot { background: var(--bad); box-shadow: none; }
.server.offline { opacity: .75; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.server-info { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.server-info dt { font-size: 12px; color: var(--muted); }
.server-info dd { margin: 0; font-weight: 600; font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.server-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Layout of the main page and the profile */
.columns { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 900px) { .columns { grid-template-columns: minmax(0, 1fr); } }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--panel); text-transform: uppercase; letter-spacing: .03em; }
tbody tr:hover { background-image: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .05)); }
tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.top .rank { color: var(--muted); width: 3em; }
.top .rank-1 { color: var(--gold); font-weight: 700; }
.top .rank-2 { color: var(--silver); font-weight: 700; }
.top .rank-3 { color: var(--bronze); font-weight: 700; }
/* Places 1-3, 4-5 and 6-10 (by place, so a tie on the border shares the colour) */
.tier-3 { --tier: var(--gold); --tier-bg: rgba(242, 201, 76, .13); }
.tier-5 { --tier: var(--silver); --tier-bg: rgba(195, 204, 213, .09); }
.tier-10 { --tier: var(--bronze); --tier-bg: rgba(208, 139, 85, .08); }
.top tr.tier-3, .top tr.tier-5, .top tr.tier-10 { background-color: var(--tier-bg); }
.top tr.tier-3 td:first-child, .top tr.tier-5 td:first-child, .top tr.tier-10 td:first-child { box-shadow: inset 3px 0 0 var(--tier); }
.tier-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: -4px 0 12px; color: var(--muted); }
.tier-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--tier-bg); box-shadow: inset 3px 0 0 var(--tier); }
.player-cell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.player-cell a { color: var(--text); }
.player-cell a:hover { color: var(--accent); }
.flag { vertical-align: -1px; margin-right: 6px; border-radius: 1px; }
.flag.big { vertical-align: 0; margin-right: 10px; }
table.plain td { padding: 6px 8px; }

/* Pagination */
.pagination { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 16px; }

/* Profile */
.player-head { margin-bottom: 20px; }
.player-head h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.ids { font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; }
.tile span { font-size: 12px; color: var(--muted); }
.tile strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.tile strong.small { font-size: 15px; }
.tile strong small { font-size: 13px; color: var(--muted); font-weight: 400; }
.tile > small { font-size: 12px; color: var(--muted); }
.tile.accent strong { color: var(--accent); }
.tile.vip { border-color: var(--gold); }
.tile.vip span, .tile.vip strong { color: var(--gold); }
.game-section + .game-section { border-top: 1px solid var(--line); padding-top: 24px; }

.quest-period { margin-bottom: 16px; }
.quest-period h4 { display: flex; justify-content: space-between; gap: 8px; }
.quest-period h4 .muted { font-weight: 400; }
.quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.quests li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.quests li.done { border-color: var(--ok); }
.quest-line { display: flex; justify-content: space-between; gap: 8px; }
.bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.bar span { display: block; height: 100%; background: var(--accent); }
.quests li.done .bar span { background: var(--ok); }
.points { color: var(--ok); font-weight: 600; }
.weapons .share { width: 100%; min-width: 48px; }
.weapons th, .weapons td { padding: 6px 8px; }
.weapons .bar { margin: 0; }
.countries { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* News */
.post { margin-bottom: 20px; }
.post h3 { margin: 0 0 2px; }
.post.full .text { margin-top: 12px; max-width: 760px; }
.post .text p { margin: 0 0 12px; }
