:root {
  --bg: #0d0f0c;
  --surface: #171a15;
  --surface-2: #20231c;
  --line: #34392d;
  --text: #f4f1e7;
  --muted: #9da18f;
  --orange: #ed8d2d;
  --orange-soft: #ffb15c;
  --green: #62ca77;
  --red: #e45d52;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 70% -10%, rgba(237,141,45,.13), transparent 35%), var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.grid-bg { position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.site-header { position: relative; z-index: 2; min-height: 76px; padding: 0 clamp(20px, 5vw, 80px); display: flex; align-items: center; gap: 36px; border-bottom: 1px solid var(--line); background: rgba(13,15,12,.86); backdrop-filter: blur(14px); }
.logo { display: flex; align-items: center; gap: 11px; letter-spacing: .08em; }
.logo span { width: 34px; height: 34px; display: grid; place-items: center; color: #1c1208; background: var(--orange); border-radius: 3px; font-weight: 950; box-shadow: 4px 4px 0 #593617; }
.site-header nav { margin-left: auto; display: flex; gap: 25px; }
.site-header nav a { padding: 27px 0 23px; color: var(--muted); border-bottom: 3px solid transparent; font-size: 13px; font-weight: 750; }
.site-header nav a:hover, .site-header nav a.active { color: white; border-color: var(--orange); }
.admin-link { padding: 9px 13px; border: 1px solid #505643; color: #d3d4ca; border-radius: 3px; font-size: 12px; font-weight: 750; }
main { position: relative; z-index: 1; min-height: calc(100vh - 170px); }
.page { display: none; }
.page.active { display: block; }
.hero { min-height: 660px; padding: 92px clamp(24px, 8vw, 130px); display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(50px, 8vw, 130px); align-items: center; }
.eyebrow { margin: 0 0 14px; color: var(--orange-soft); font-size: 11px; letter-spacing: .2em; font-weight: 850; }
.hero h1, .page-head h1 { margin: 0; letter-spacing: -.055em; line-height: .94; }
.hero h1 { max-width: 760px; font-size: clamp(52px, 7.3vw, 108px); }
.hero h1 em { color: var(--orange); font-style: normal; }
.lead { max-width: 660px; margin: 29px 0; color: #b9bcac; font-size: clamp(17px, 2vw, 21px); line-height: 1.65; }
.join-box { max-width: 590px; padding: 14px 14px 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #171a14; border: 1px solid #3c4134; border-left: 4px solid var(--orange); }
.join-box span, .join-box strong { display: block; }
.join-box span { margin-bottom: 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.join-box strong { font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(14px, 2vw, 19px); }
.join-box button { padding: 11px 14px; color: #211508; background: var(--orange); border: 0; border-radius: 2px; font-weight: 850; }
.address-note { margin: 9px 0 0; color: #727667; font-size: 11px; }
.card { background: linear-gradient(145deg, #1a1d17, #151713); border: 1px solid var(--line); box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.hero-status { padding: 28px; border-top: 3px solid var(--orange); }
.status-head { display: flex; align-items: center; gap: 10px; color: #c9cbbf; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #d2a846; }
.dot.online { background: var(--green); box-shadow: 0 0 13px rgba(98,202,119,.6); }
.dot.offline { background: var(--red); }
.hero-number { padding: 35px 0 24px; display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line); }
.hero-number strong { font-size: 66px; letter-spacing: -.06em; }
.hero-number span { color: var(--muted); }
.hero-status dl { margin: 10px 0 22px; }
.hero-status dl div { padding: 10px 0; display: flex; justify-content: space-between; border-bottom: 1px solid #2d3128; }
.hero-status dt { color: var(--muted); }
.hero-status dd { margin: 0; font-weight: 750; }
.hero-status > a { color: var(--orange-soft); font-weight: 750; }
.feature-strip { padding: 0 clamp(24px, 8vw, 130px) 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
.feature-strip article { padding: 31px; background: var(--surface); border: 1px solid var(--line); }
.feature-strip span { color: var(--orange); font-family: monospace; }
.feature-strip h2 { margin: 30px 0 9px; font-size: 20px; }
.feature-strip p { margin: 0; color: var(--muted); line-height: 1.6; }
.section, .page:not(#page-home) { padding: 80px clamp(24px, 8vw, 130px) 110px; }
.section-title { margin-bottom: 30px; }
.section-title h2 { margin: 0; font-size: 36px; }
.page-head { max-width: 860px; margin-bottom: 52px; }
.page-head h1 { font-size: clamp(55px, 9vw, 105px); }
.page-head > p:last-child { max-width: 700px; color: var(--muted); font-size: 18px; line-height: 1.6; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }
.player-card { padding: 20px; display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); }
.player-card i { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(98,202,119,.5); }
.player-card span { font-weight: 800; }
.empty-state { padding: 45px; color: var(--muted); border: 1px dashed #414638; text-align: center; grid-column: 1 / -1; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.stat-card { min-height: 170px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); }
.stat-card span { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.stat-card strong { font-size: clamp(25px, 3vw, 38px); }
.note-card { margin-top: 14px; padding: 24px; color: var(--muted); }
.history-toolbar { margin: 48px 0 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.history-toolbar h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); text-transform: uppercase; }
.history-toolbar > span { color: var(--muted); font: 11px/1.4 monospace; }
.chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.chart-card { min-width: 0; padding: 22px; }
.chart-head { margin-bottom: 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.chart-head span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.chart-head strong { color: var(--orange-soft); font-size: 20px; }
.chart-card canvas { display: block; width: 100%; height: 190px; }
.history-empty { padding: 25px; color: var(--muted); border: 1px dashed var(--line); text-align: center; }
.rules-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.rules-list li { padding: 26px 0; display: grid; grid-template-columns: 80px 1fr; border-bottom: 1px solid var(--line); }
.rules-list > li > span { color: var(--orange); font-family: monospace; }
.rules-list h2 { margin: 0 0 8px; font-size: 21px; }
.rules-list p { margin: 0; color: var(--muted); line-height: 1.6; }
.mods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 13px; }
.mod-card { padding: 23px; background: var(--surface); border: 1px solid var(--line); }
.mod-card h2 { margin: 0 0 24px; font-size: 20px; }
.mod-card span { padding: 5px 9px; color: #aeeabb; background: #1b3822; border-radius: 13px; font-size: 11px; }
.service-list { padding: 9px 28px; }
.service-list > div { padding: 22px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.service-list > div:last-child { border-bottom: 0; }
.service-list span { display: flex; align-items: center; gap: 12px; }
.updated { color: var(--muted); font-size: 12px; }
.map-placeholder { min-height: 370px; padding: 50px; display: grid; place-items: center; align-content: center; text-align: center; }
.map-placeholder p { max-width: 600px; color: var(--muted); line-height: 1.6; }
.map-icon { color: var(--orange); font-size: 64px; }
.map-button { margin-top: 16px; padding: 11px 15px; color: #211508; background: var(--orange); border-radius: 2px; font-weight: 850; }
footer { position: relative; z-index: 1; padding: 28px clamp(24px, 5vw, 80px); display: flex; align-items: center; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer p { margin: 0 auto 0 0; }
footer a { color: var(--orange-soft); }
.visit-counter { color: #6f7065; font: 10px/1.2 monospace; letter-spacing: .04em; white-space: nowrap; }
.visit-counter strong { color: #858679; font-weight: 500; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; padding: 13px 17px; color: #181108; background: var(--orange); font-weight: 800; transform: translateY(150%); transition: .2s; }
.toast.show { transform: translateY(0); }
@media (max-width: 930px) {
  .site-header nav { display: none; }
  .admin-link { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 65px; }
  .hero-status { max-width: 570px; }
  .feature-strip { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .site-header { min-height: 64px; }
  .hero { padding: 50px 18px 65px; gap: 45px; }
  .hero h1 { font-size: 48px; }
  .join-box { align-items: stretch; flex-direction: column; }
  .feature-strip, .section, .page:not(#page-home) { padding-left: 18px; padding-right: 18px; }
  .stats-grid { grid-template-columns: 1fr; }
  .rules-list li { grid-template-columns: 50px 1fr; }
  footer { align-items: flex-start; flex-direction: column; }
}

/* Industrial factory skin */
:root {
  --bg: #090a08;
  --surface: #171713;
  --surface-2: #24231c;
  --line: #4a4638;
  --text: #f2ead9;
  --muted: #aaa48f;
  --orange: #f08b25;
  --orange-soft: #ffc16b;
  --steel: #777466;
}
body {
  background:
    radial-gradient(circle at 20% 0, rgba(239, 139, 37, .1), transparent 27%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 1px, transparent 1px 7px),
    #0a0b09;
  font-family: "Arial Narrow", "Roboto Condensed", Inter, ui-sans-serif, system-ui, sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .12;
  background-image: url("/assets/factory-hero-v1.png");
  background-size: cover;
  background-position: center;
  filter: grayscale(.5);
}
.hazard-rail {
  height: 8px;
  background: repeating-linear-gradient(135deg, #d87b20 0 15px, #171713 15px 30px);
  box-shadow: 0 1px 0 #000, 0 2px 10px #000;
}
.grid-bg {
  opacity: .18;
  background-image:
    linear-gradient(rgba(239,139,37,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,139,37,.06) 1px, transparent 1px);
  background-size: 64px 64px;
}
.site-header {
  position: sticky;
  top: 0;
  min-height: 72px;
  background: linear-gradient(180deg, rgba(31,31,25,.97), rgba(12,13,10,.96));
  border-bottom: 1px solid #5a5545;
  box-shadow: 0 8px 30px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.06);
}
.logo { gap: 12px; }
.logo-gear {
  width: 42px !important;
  height: 42px !important;
  color: #211408 !important;
  font-size: 24px;
  background: linear-gradient(145deg, #ffb04c, #c96712) !important;
  border: 2px solid #19130d;
  border-radius: 50% !important;
  box-shadow: 0 0 0 2px #6d4825, 4px 4px 0 #080806 !important;
}
.logo-copy {
  min-width: 142px;
  padding: 7px 11px 6px;
  display: grid;
  line-height: 1;
  background: rgba(0,0,0,.3);
  border-left: 2px solid var(--orange);
}
.logo-copy strong {
  color: #fff5df;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: .1em;
  text-shadow: 0 2px 3px #000;
}
.logo-copy small {
  margin-top: 6px;
  padding: 4px 6px;
  color: #fff8e8;
  background: #9b4f16;
  font: 900 11px/1 "Arial Narrow", sans-serif;
  letter-spacing: .11em;
  text-shadow: 0 1px 1px #3a1904;
  box-shadow: inset 0 1px rgba(255,255,255,.18);
}
.site-header nav { gap: 8px; }
.site-header nav a {
  position: relative;
  padding: 28px 12px 23px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.site-header nav a:hover, .site-header nav a.active {
  color: var(--orange-soft);
  background: linear-gradient(to top, rgba(240,139,37,.12), transparent 65%);
}
.admin-link {
  padding: 10px 14px;
  border: 1px solid #6b6552;
  background: linear-gradient(#302f27, #1a1a16);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 2px 2px 0 #060605;
}
.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/assets/factory-hero-v1.png");
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,6,5,.98) 0%, rgba(7,8,6,.88) 30%, rgba(8,8,6,.3) 66%, rgba(6,6,5,.18)),
    linear-gradient(0deg, #0a0b09 0%, transparent 22%, rgba(0,0,0,.15));
}
.hero-copy { max-width: 790px; text-shadow: 0 2px 15px #000; }
.hero-badge {
  width: max-content;
  margin-bottom: 24px;
  padding: 8px 11px;
  color: #c9c7b8;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(12,13,10,.72);
  font: 700 10px/1 monospace;
  letter-spacing: .16em;
  box-shadow: inset 3px 0 var(--green);
}
.hero-badge .dot { margin-right: 7px; width: 7px; height: 7px; }
.hero h1 {
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: -.065em;
  filter: drop-shadow(4px 5px 0 rgba(0,0,0,.65));
}
.hero h1 em {
  color: var(--orange-soft);
  background: linear-gradient(#ffc274, #db751d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.eyebrow { font-family: monospace; }
.join-box {
  background: linear-gradient(100deg, rgba(33,32,26,.96), rgba(18,19,15,.94));
  border: 1px solid #6b624e;
  border-left: 5px solid var(--orange);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 8px 8px 0 rgba(0,0,0,.36);
}
.join-box button, .map-button {
  position: relative;
  color: #201207;
  background: linear-gradient(#ffad4c, #d96f17);
  border: 1px solid #ffbd69;
  box-shadow: inset 0 -2px rgba(78,35,4,.3), 3px 3px 0 #090805;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .04em;
}
.card, .feature-strip article, .player-card, .stat-card, .mod-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), transparent 26%),
    linear-gradient(145deg, #26251f, #141511);
  border: 1px solid #514d3e;
  box-shadow: inset 0 1px rgba(255,255,255,.06), 8px 10px 25px rgba(0,0,0,.3);
}
.card::before, .feature-strip article::before, .stat-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.035);
}
.hero-status {
  background: rgba(20,21,17,.92);
  backdrop-filter: blur(12px);
  border-top: 4px solid var(--orange);
}
.panel-label {
  margin: -15px -14px 26px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #817c6c;
  font: 700 9px/1 monospace;
  letter-spacing: .15em;
}
.panel-label i { height: 1px; flex: 1; background: #474338; }
.panel-label b { color: var(--orange); }
.hero-number strong {
  color: var(--orange-soft);
  font-family: Impact, "Arial Narrow", sans-serif;
  font-weight: 400;
}
.feature-strip { gap: 12px; }
.feature-strip article {
  min-height: 260px;
  overflow: hidden;
}
.feature-strip article::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -25px;
  width: 100px;
  height: 100px;
  border: 18px dotted rgba(240,139,37,.08);
  border-radius: 50%;
}
.feature-strip span { font-size: 10px; letter-spacing: .15em; }
.feature-icon {
  width: 54px;
  height: 54px;
  margin-top: 30px;
  display: grid;
  place-items: center;
  color: var(--orange-soft);
  background: #11120f;
  border: 1px solid #5c5645;
  font-size: 28px;
  box-shadow: inset 0 0 0 4px #1f1f1a;
}
.feature-strip h2 { margin-top: 18px; text-transform: uppercase; letter-spacing: -.02em; }
.section, .page:not(#page-home) {
  background: linear-gradient(rgba(9,10,8,.93), rgba(9,10,8,.97));
}
.page-head h1, .section-title h2 { text-transform: uppercase; font-weight: 950; }
.page-head h1 { text-shadow: 4px 4px 0 #302015; }
.rules-list li { background: linear-gradient(90deg, rgba(240,139,37,.045), transparent 40%); }
.rules-list > li > span { font-weight: 900; }
.map-placeholder {
  background:
    linear-gradient(rgba(17,18,15,.88), rgba(17,18,15,.96)),
    url("/assets/factory-hero-v1.png") center/cover;
}
.map-icon { filter: drop-shadow(0 0 16px rgba(240,139,37,.45)); }
footer {
  background: #0d0e0b;
  border-top: 5px solid transparent;
  border-image: repeating-linear-gradient(135deg, #d87b20 0 12px, #171713 12px 24px) 5;
}
@media (max-width: 1100px) {
  .site-header { gap: 18px; padding-inline: 22px; }
  .site-header nav a { padding-inline: 6px; font-size: 11px; }
  .hero { grid-template-columns: 1.1fr .9fr; gap: 35px; padding-inline: 5vw; }
}
@media (max-width: 930px) {
  .hero { grid-template-columns: 1fr; }
  .hero::after { background: linear-gradient(90deg, rgba(5,6,5,.95), rgba(7,8,6,.62)), linear-gradient(0deg, #0a0b09, transparent 30%); }
}
@media (max-width: 560px) {
  .hazard-rail { height: 5px; }
  .logo-copy { min-width: 124px; padding-inline: 8px; }
  .logo-copy strong { font-size: 14px; }
  .logo-copy small { display: block; padding: 3px 4px; font-size: 9px; letter-spacing: .07em; }
  .hero { min-height: auto; }
  .hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .hero-badge { font-size: 8px; }
  .hero-status { padding: 22px; }
  .feature-strip article { min-height: 230px; }
}
