:root {
  color-scheme: dark;
  --bg: #07080d;
  --panel: rgba(8, 10, 15, 0.86);
  --panel-strong: rgba(10, 12, 18, 0.94);
  --line: rgba(206, 216, 255, 0.16);
  --text: #f4f0ee;
  --muted: #aeb4c5;
  --blue: #6da8ff;
  --red: #e2444f;
  --green: #4fd56d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("assets/azhyron2.png") top center / cover no-repeat;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(4, 6, 12, 0.03) 0, rgba(4, 6, 12, 0.24) 44%, rgba(4, 6, 12, 0.94) 78%),
    linear-gradient(90deg, rgba(4, 6, 12, 0.82), transparent 26%, transparent 70%, rgba(4, 6, 12, 0.82));
}

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

.nav-button,
button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 62px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.brand {
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(109, 168, 255, 0.7);
}

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.2vw, 32px);
}

.topbar nav a,
.nav-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #d9e2ff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 750;
  min-height: auto;
  padding: 0;
  text-shadow: none;
}

.topbar nav a:hover,
.nav-button:hover,
.link-row a:hover,
.more-link:hover {
  color: var(--blue);
  filter: none;
}

.hero {
  min-height: calc(100vh - 62px);
  padding: 500px 24px 50px;
}

.page-grid {
  display: grid;
  grid-template-columns: 280px minmax(480px, 610px) 315px;
  gap: 18px;
  width: min(1260px, 100%);
  margin: 0 auto;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.left-column,
.right-column {
  display: grid;
  gap: 14px;
}

.login-panel,
.online-panel,
.ranking-mini,
.media-panel {
  padding: 18px;
}

.register-panel {
  padding: 24px 28px 26px;
  background:
    linear-gradient(180deg, rgba(22, 28, 46, 0.9), rgba(6, 8, 13, 0.93)),
    var(--panel);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 0 24px rgba(109, 168, 255, 0.55);
}

h2 {
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 1.2rem;
  letter-spacing: 0;
}

h3 {
  margin: 28px 0 10px;
  color: #ffffff;
  font-size: 1.08rem;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.stack-form {
  display: grid;
  gap: 9px;
}

input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(206, 216, 255, 0.18);
  border-radius: 2px;
  outline: none;
  background: rgba(2, 4, 9, 0.74);
  color: var(--text);
  padding: 0 12px;
}

input:focus {
  border-color: rgba(109, 168, 255, 0.88);
  box-shadow: 0 0 0 3px rgba(109, 168, 255, 0.13);
}

input::placeholder {
  color: #7f879b;
}

.stack-form button,
.main-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 2px;
  background: linear-gradient(180deg, #f25560, #a91522);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  box-shadow: 0 12px 22px rgba(226, 68, 79, 0.24);
}

.text-button {
  display: inline;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--blue);
  padding: 0;
  font-weight: 900;
  text-shadow: none;
}

.text-button:hover {
  filter: none;
  color: #9cc5ff;
}

.stack-form button:hover,
.main-button:hover {
  filter: brightness(1.08);
}

output {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

output.error {
  color: #ff7c83;
}

output.success {
  color: #7cf58e;
}

.link-row {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.online-panel {
  text-align: center;
}

.online-panel > strong {
  display: block;
  color: #ffffff;
  font-size: 2.15rem;
  line-height: 1;
}

.online-panel > span {
  display: block;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.channels {
  display: grid;
  gap: 8px;
  text-align: left;
}

.channels div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(206, 216, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #dce5ff;
  font-size: 0.88rem;
  font-weight: 750;
}

.channels i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(79, 213, 109, 0.9);
}

.channels div.is-offline {
  color: #adb4c2;
}

.channels div.is-offline i {
  background: var(--red);
  box-shadow: 0 0 14px rgba(226, 68, 79, 0.78);
}

.channels div.is-online {
  border-color: rgba(79, 213, 109, 0.4);
}

.register-form {
  display: grid;
  gap: 12px;
}

.register-form label {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.register-form label > span {
  color: #edf2ff;
  font-size: 0.91rem;
  font-weight: 800;
  text-align: right;
}

.register-form small {
  grid-column: 2;
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.rules-check {
  grid-template-columns: 24px 1fr !important;
  align-items: start !important;
  margin: 6px 0;
  padding: 11px 12px;
  border: 1px solid rgba(206, 216, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.rules-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.rules-check span {
  text-align: left !important;
}

.register-form .main-button,
.register-form output {
  width: min(330px, 100%);
  margin: 0 auto;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tabs {
  display: flex;
  border: 1px solid rgba(206, 216, 255, 0.14);
}

.tab {
  min-width: 64px;
  min-height: 31px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  color: var(--muted);
  font-size: 0.78rem;
}

.tab.is-active {
  background: linear-gradient(180deg, #6da8ff, #315fba);
  color: #fff;
}

.ranking-list {
  display: grid;
  gap: 8px;
}

.empty-ranking {
  min-height: 126px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid rgba(206, 216, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: center;
}

.ranking-card {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(206, 216, 255, 0.11);
  background: rgba(255, 255, 255, 0.04);
}

.rank-number {
  color: var(--blue);
  font-weight: 900;
}

.ranking-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-card small,
.ranking-score {
  color: var(--muted);
  font-size: 0.75rem;
}

.ranking-score {
  color: #ffccd0;
  font-weight: 850;
}

.more-link {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  text-align: right;
}

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

.media-grid span {
  aspect-ratio: 1.45;
  border: 1px solid rgba(206, 216, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(5, 7, 12, 0), rgba(5, 7, 12, 0.38)),
    url("assets/azhyron2.png") center / cover no-repeat;
}

.download-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px max(24px, calc((100vw - 1180px) / 2));
  border-block: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.92);
}

.download-band .section-kicker {
  text-align: left;
}

.download-band h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.download-band p {
  margin-bottom: 0;
  color: var(--muted);
}

.download-band .main-button {
  min-width: 180px;
}

.shop-band {
  padding: 58px max(24px, calc((100vw - 1260px) / 2));
  border-block: 1px solid var(--line);
  background: rgba(5, 7, 12, 0.9);
}
.shop-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.shop-heading .section-kicker, .shop-heading h2, .shop-heading p { text-align: left; }
.shop-heading h2 { margin-bottom: 7px; font-size: 2rem; }
.shop-heading > div > p:last-child { margin-bottom: 0; color: var(--muted); }
.shop-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.shop-card { display: grid; gap: 14px; min-height: 278px; padding: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(27, 33, 54, 0.7), rgba(8, 10, 16, 0.95)); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25); }
.shop-card-visual { display: grid; min-height: 82px; place-items: center; border: 1px solid rgba(109, 168, 255, 0.24); background: radial-gradient(circle, rgba(109, 168, 255, 0.3), transparent 65%), rgba(2, 4, 9, 0.72); color: #c8dcff; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.shop-card-copy h3 { margin: 0 0 7px; font-size: 1rem; }
.shop-card-copy p { min-height: 42px; margin: 0 0 8px; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.shop-card-copy small { color: #dce5ff; }
.shop-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.shop-card-footer strong { color: #ffd48c; font-size: 1.05rem; }
.shop-buy { min-height: 36px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 2px; background: linear-gradient(180deg, #f25560, #a91522); color: #fff; cursor: pointer; font-weight: 850; }
.shop-buy:disabled { cursor: wait; opacity: 0.65; }
.empty-shop { grid-column: 1 / -1; padding: 30px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

.rules-intro {
  max-width: 760px;
  margin: 0 auto 24px;
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.rules-copy {
  padding: 0 4px 0 0;
}

.rules-copy ul,
.rules-copy ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: #d4d9e8;
  line-height: 1.58;
}

footer {
  padding: 25px 24px;
  border-top: 1px solid var(--line);
  background: #05070c;
  color: var(--muted);
  text-align: center;
}

.rules-modal {
  width: min(960px, calc(100% - 28px));
  max-height: min(82vh, 820px);
  border: 1px solid rgba(206, 216, 255, 0.24);
  background: var(--panel-strong);
  color: var(--text);
  padding: 0;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.75);
}

.rules-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.modal-shell {
  max-height: min(82vh, 820px);
  overflow: auto;
  padding: 24px 30px 30px;
}

.modal-head {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -30px 18px;
  padding: 22px 30px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.96);
}

.modal-head .section-kicker {
  text-align: left;
}

.modal-head h2 {
  margin: 0;
  font-size: 2rem;
}

.modal-close {
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  color: #fff;
  font-size: 1.5rem;
}

@media (max-width: 1130px) {
  .hero {
    padding-top: 460px;
  }

  .page-grid {
    grid-template-columns: 280px minmax(430px, 1fr);
  }

  .right-column {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .shop-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 18px;
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    padding: 390px 14px 34px;
  }

  .page-grid,
  .right-column {
    grid-template-columns: 1fr;
  }

  .register-form label {
    grid-template-columns: 1fr;
  }

  .register-form label > span {
    text-align: left;
  }

  .register-form small {
    grid-column: 1;
  }

  .download-band {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-heading { display: grid; align-items: start; }
}

@media (max-width: 520px) {
  .shop-list { grid-template-columns: 1fr; }

  body::before {
    background-size: auto 360px;
  }

  .hero {
    padding-top: 335px;
  }

  .register-panel {
    padding: 20px 16px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .modal-shell {
    padding: 18px 18px 24px;
  }

  .modal-head {
    margin: -18px -18px 16px;
    padding: 18px;
  }
}
