:root {
  color-scheme: dark;
  --bg: #0b0e11;
  --surface: #14191e;
  --surface-soft: #1a242b;
  --line: rgba(218, 233, 242, .13);
  --text: #f4f6f7;
  --muted: #a6b3bc;
  --accent: #d6f05a;
  --accent-strong: #e4fa82;
  --green: #85d8ad;
  --red: #ff897b;
  --shadow: 0 28px 90px #0008;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input { touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { cursor: pointer; }
.wrap { width: min(1440px, calc(100% - 80px)); margin-inline: auto; }
.site-header { height: 84px; border-bottom: 1px solid var(--line); }
.header-inner, .header-actions, .brand { display: flex; align-items: center; }
.header-inner { height: 100%; justify-content: space-between; gap: 16px; }
.brand { gap: 13px; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .11em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--accent); color: var(--accent); font-size: 14px;
  font-weight: 900; letter-spacing: -.07em; border-radius: 6px;
}
.header-actions { gap: 24px; }
.server-mini { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #8b98a1; }
.status-dot.online { background: var(--green); box-shadow: 0 0 12px #85d8ad55; }
.status-dot.offline { background: var(--red); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 7px;
  background: var(--accent); color: #15191c; text-decoration: none; font-weight: 700;
  transition: background 160ms, border-color 160ms;
}
.button:hover { background: var(--accent-strong); }
.button.secondary { border-color: var(--line); color: var(--text); background: #ffffff05; }
.button.secondary:hover { border-color: #dce9f24d; background: #ffffff0d; }
.button.small { min-height: 38px; padding: 0 16px; font-size: 12px; }
main { min-height: 0; }
.hero {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  height: calc(100svh - 156px); min-height: 470px; max-height: 920px;
  margin-top: 24px; border: 1px solid var(--line); border-radius: 14px;
  background: #16232c; isolation: isolate;
}
.hero-image { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: 65% 50%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, #071017f2 0%, #091218de 32%, #09121838 78%),
    linear-gradient(0deg, #091116f5, #09111600 50%);
}
.hero-content { padding: clamp(30px, 4.5vw, 68px); flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.eyebrow { margin: 0 0 24px; color: var(--accent); font-size: 10px; letter-spacing: .2em; font-weight: 700; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(60px, 7.1vw, 106px); line-height: .88; letter-spacing: -.055em; font-weight: 900; }
h1 span { display: block; }
h1 span:last-child { color: #ffffffb8; }
.hero-copy { max-width: 370px; margin: 26px 0 0; color: #d6dfe5; font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.mode-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.mode-tags span { padding: 7px 10px; border: 1px solid #ffffff21; border-radius: 4px; color: #c4d0d8; font-size: 10px; letter-spacing: .06em; background: #0911164d; }
.scene-caption { position: absolute; right: 30px; top: 28px; text-align: right; text-shadow: 0 1px 8px #000; }
.scene-caption span { display: block; color: #ffffffa8; font-size: 9px; letter-spacing: .18em; }
.scene-caption strong { display: block; margin-top: 7px; font-size: 12px; letter-spacing: .1em; }
.download-dock {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 32px;
  border-top: 1px solid var(--line); background: #0e171edb; backdrop-filter: blur(18px);
}
.download-heading strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.download-heading span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.hero-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.hero-actions .button { min-width: 178px; min-height: 52px; font-size: 13px; }
.platform-icon { width: 18px; height: 18px; flex: 0 0 auto; }
.site-footer { height: 48px; }
.footer-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; color: #8b9aa4; font-size: 10px; letter-spacing: .05em; }
.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(10px);
}

.modal.open { display: grid; }

.modal-panel {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 22px;
  background: #111416;
  box-shadow: var(--shadow);
}

.modal-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 20, 22, 0.94);
  backdrop-filter: blur(12px);
}

.modal-head strong { font-size: 18px; }

.icon-button {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
}

.modal-body { padding: 24px; }

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 12px;
  background: #0a0c0d;
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.tab.active {
  color: var(--text);
  background: var(--surface-soft);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form[hidden],
.profile-view[hidden],
.auth-view[hidden] { display: none; }

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: #c7cbcd;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--text);
  background: #0b0e0f;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #d6f05a1a;
}

.form-hint {
  margin: -7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.45;
}

.auth-form .button { width: 100%; }
.button:disabled { cursor: wait; opacity: 0.62; transform: none; }

.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  color: #17120a;
  background: var(--accent);
  font-size: 20px;
  font-weight: 900;
}

.profile-identity h3 {
  margin: 0 0 4px;
  font-size: 23px;
}

.profile-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b0e0f;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: 21px;
}

.season-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.season-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.season-top span {
  color: var(--muted);
  font-size: 13px;
}

.progress {
  height: 8px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: #090b0c;
}

.progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 400ms ease;
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}


.modal-head strong { letter-spacing: -.02em; }
.modal-panel { background: var(--surface); border-radius: 14px; }
.modal-head { background: #11181df5; }
.modal-body { padding: 24px; }
.profile-identity h3 { overflow-wrap: anywhere; }
.season-top { flex-wrap: wrap; gap: 8px; }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 40px); }
  .download-dock { padding: 22px 26px; gap: 20px; }
  .hero-actions .button { min-width: 155px; padding: 0 16px; }
  .hero-content { padding: 36px; }
  .scene-caption { right: 24px; }
}
@media (max-width: 720px) {
  .site-header { height: 68px; }
  .header-actions { gap: 10px; }
  .header-actions .server-mini { font-size: 0; gap: 0; }
  .hero { height: calc(100svh - 126px); min-height: 500px; margin-top: 14px; }
  .hero-content { padding: 30px; }
  h1 { font-size: clamp(60px, 14vw, 90px); }
  .hero-copy { max-width: 290px; font-size: 14px; }
  .hero::before { background: linear-gradient(90deg, #071017e8, #09121882), linear-gradient(0deg, #091116e0, #09111600); }
  .scene-caption { display: none; }
  .download-dock { align-items: stretch; flex-direction: column; padding: 20px; gap: 18px; }
  .hero-actions .button { flex: 1; min-width: 0; }
  .hero-actions { width: 100%; }
  .download-heading strong { font-size: 16px; }
  .site-footer { height: 44px; }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 24px); }
  .brand { font-size: 10px; gap: 8px; }
  .header-actions { gap: 12px; }
  .button.small { padding: 0 12px; }
  .hero-content { padding: 24px; }
  .hero-actions .button { font-size: 12px; padding: 0 10px; gap: 8px; }
  .mode-tags { gap: 6px; }
  .mode-tags span { font-size: 9px; padding: 6px 8px; }
  .footer-inner { font-size: 9px; }
}
@media (max-height: 740px) {
  .site-header { height: 64px; }
  .hero { height: calc(100svh - 124px); min-height: 410px; margin-top: 16px; }
  .hero-content { padding: 26px 36px; }
  h1 { font-size: clamp(56px, 7vw, 82px); }
  .eyebrow { margin-bottom: 18px; }
  .hero-copy { margin-top: 20px; font-size: 14px; }
  .mode-tags { margin-top: 18px; }
  .download-dock { padding: 18px 26px; }
  .site-footer { height: 44px; }
}
@media (max-width: 720px) and (max-height: 740px) {
  .hero { min-height: 410px; height: calc(100svh - 124px); }
  .hero-content { padding: 20px 24px; }
  h1 { font-size: 58px; }
  .eyebrow { margin-bottom: 14px; font-size: 9px; }
  .hero-copy { margin-top: 16px; font-size: 13px; }
  .mode-tags { margin-top: 16px; }
  .download-dock { padding: 16px; gap: 12px; }
  .download-heading span { font-size: 11px; }
  .hero-actions .button { min-height: 46px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-height: 500px) and (min-width: 721px) {
  .site-header { height: 52px; }
  .hero { min-height: 252px; height: calc(100svh - 98px); margin-top: 12px; }
  .hero-content { padding: 16px 26px; }
  h1 { font-size: 48px; }
  h1 span { display: inline; }
  .eyebrow { margin-bottom: 10px; font-size: 9px; }
  .hero-copy { margin-top: 10px; font-size: 12px; max-width: 500px; }
  .mode-tags { display: none; }
  .download-dock { padding: 12px 22px; }
  .hero-actions .button { min-height: 42px; }
  .download-heading strong { font-size: 15px; }
  .download-heading span { font-size: 11px; }
  .site-footer { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
