:root {
  color-scheme: dark;
  --bg: #07111d;
  --bg-soft: #0d1d2f;
  --surface: rgba(11, 24, 39, 0.88);
  --surface-strong: #102237;
  --text: #f7fbff;
  --muted: #9fb4ca;
  --line: rgba(134, 215, 255, 0.22);
  --blue: #18b9ff;
  --blue-deep: #0573d8;
  --yellow: #ffd426;
  --red: #ff314d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf7ff;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #091827;
  --muted: #52687f;
  --line: rgba(5, 115, 216, 0.18);
  --shadow: 0 20px 52px rgba(32, 76, 124, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 212, 38, 0.16), transparent 28%),
    radial-gradient(circle at 78% 0%, rgba(24, 185, 255, 0.2), transparent 30%),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

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

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  min-height: 88px;
}

.brand {
  position: absolute;
  left: calc((100% - 307px) / 2);
  justify-self: center;
  transform: translateX(-50%);
}

.brand img {
  width: 210px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

.navbuttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.header-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
}

.language-picker {
  position: relative;
}

.language-current,
.language-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.language-current {
  min-width: 136px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-current img,
.language-options img {
  width: 23px;
  height: 16px;
  flex: 0 0 auto;
  border-radius: 3px;
  object-fit: cover;
}

.language-current span { flex: 1; }
.language-current i { color: var(--blue); transition: transform .18s ease; }
.language-picker.is-open .language-current i { transform: rotate(180deg); }

.language-options {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  right: 0;
  width: 170px;
  overflow: hidden;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #10243a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.language-picker.is-open .language-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-options button {
  min-height: 39px;
  padding: 7px 9px;
  border-radius: 6px;
}

.language-options button:hover,
.language-options button.is-selected {
  color: #fff;
  background: rgba(24, 185, 255, .16);
}

.navbuttons a {
  position: relative;
  display: block;
}

.buttons {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.buttons i {
  display: block;
  width: 1em;
  line-height: 1;
  text-align: center;
}

.buttons > span {
  display: none;
}

.buttons:hover,
.navbuttons a:focus-visible .buttons {
  border-color: rgba(24, 185, 255, 0.55);
  transform: translateY(-2px);
  outline: none;
}

.buttons::after {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 3;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--text);
  content: attr(data-name);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -5px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.buttons:hover::after,
.navbuttons a:focus-visible .buttons::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.buttonWhatsapp {
  background: #25d366;
}

.buttonFacebook {
  background: #1877f2;
}

.buttonInstagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 48%, #8134af);
}

.buttonDiscord {
  background: #5865f2;
}

.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.theme-toggle span {
  position: absolute;
  inset: 13px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sun {
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(255, 212, 38, 0.18);
}

.moon {
  border-radius: 50%;
  background: var(--blue);
}

.moon::after {
  position: absolute;
  top: -2px;
  left: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  content: "";
  background: var(--surface);
}

:root[data-theme="dark"] .sun,
:root:not([data-theme]) .sun {
  opacity: 0;
  transform: scale(0.72) rotate(-30deg);
}

:root[data-theme="light"] .moon {
  opacity: 0;
  transform: scale(0.72) rotate(30deg);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 22px;
  align-items: stretch;
}

.main-column,
.sidebar {
  display: grid;
  gap: 18px;
}

.sidebar {
  align-content: start;
  align-self: start;
  grid-auto-rows: max-content;
}

.main-column {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 185, 255, 0.2), transparent 46%),
    linear-gradient(315deg, rgba(255, 49, 77, 0.16), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(45, 226, 141, 0.36);
  border-radius: 999px;
  color: #41e69a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: #41e69a;
}

.hero-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.22);
}

.hero-copy p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-menu {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0;
  overflow: hidden;
  width: min(680px, 100%);
  margin-top: 28px;
  border: 1px solid rgba(134, 215, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 49, 77, 0.2), transparent 18%, transparent 82%, rgba(24, 185, 255, 0.2)),
    rgba(3, 12, 24, 0.52);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.hero-menu::before {
  display: none;
}

.hero-menu-link {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.035);
}

.hero-menu-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.34));
  transition: transform 160ms ease, filter 160ms ease;
}

.mobile-menu-toggle,
.mobile-site-menu,
.mobile-menu-backdrop { display: none; }

@media (max-width: 620px) {
  html { scroll-behavior: smooth; scroll-padding-top: 16px; }
  body { padding-bottom: 0; }
  .hero-menu { display: none; }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(55,196,255,.35);
    border-radius: 11px;
    color: var(--yellow);
    background: rgba(24,185,255,.08);
  }

  .mobile-menu-backdrop {
    position: fixed;
    z-index: 1090;
    inset: 0;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 8, 18, .72);
    backdrop-filter: blur(3px);
    transition: opacity 180ms ease;
  }

  .mobile-menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

  .mobile-site-menu {
    position: fixed;
    z-index: 1100;
    top: 0;
    bottom: 0;
    left: 0;
    display: grid;
    align-content: start;
    gap: 9px;
    width: min(86vw, 340px);
    padding: 16px;
    border-right: 1px solid rgba(55, 196, 255, .3);
    background: rgba(5, 20, 35, .98);
    box-shadow: 20px 0 50px rgba(0,0,0,.5);
    backdrop-filter: blur(14px);
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

  .mobile-site-menu.is-open { transform: translateX(0); }
  .mobile-site-menu header { display: flex; justify-content: space-between; align-items: center; margin: -16px -16px 8px; padding: 16px; border-bottom: 1px solid var(--line); }
  .mobile-site-menu header strong { display: flex; gap: 9px; align-items: center; }
  .mobile-site-menu header img { width: 34px; height: 34px; object-fit: contain; }
  .mobile-menu-close { width: 38px; height: 38px; border: 1px solid rgba(255,83,107,.4); border-radius: 10px; color: #ff536b; background: rgba(255,83,107,.08); }

  .mobile-site-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 54px;
    padding: 7px 12px;
    border: 1px solid rgba(55,196,255,.18);
    border-radius: 11px;
    color: rgba(232, 241, 255, .76);
    font-size: .68rem;
    font-weight: 900;
  }

  .mobile-site-menu a:hover,
  .mobile-site-menu a:focus-visible {
    border-color: rgba(55, 196, 255, .42);
    color: #fff;
    background: rgba(55, 196, 255, .12);
  }

  .mobile-site-menu img,
  .mobile-site-menu i {
    width: 34px;
    height: 34px;
    object-fit: contain;
    font-size: 24px;
    line-height: 34px;
    text-align: center;
  }

  .mobile-site-menu header .mobile-menu-logo {
    width: 102px;
    height: 36px;
    object-fit: contain;
  }

  .mobile-site-menu i { color: #20bdff; }
  .mobile-menu-section-title {
    padding: 4px 3px 1px;
    color: var(--yellow);
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  body.mobile-menu-open { overflow: hidden; }
}

.hero-menu-link:hover .hero-menu-icon {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.42));
}

.hero-menu-link::after {
  position: absolute;
  right: 10px;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--menu-glow, var(--blue));
  box-shadow: 0 0 14px var(--menu-glow, var(--blue));
}

.hero-menu-link + .hero-menu-link {
  border-left: 1px solid rgba(134, 215, 255, 0.18);
}

.hero-menu-link i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  color: #ffffff;
  font-size: 0.78rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 35%),
    linear-gradient(135deg, var(--menu-a, var(--yellow)), var(--menu-b, var(--blue)));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.hero-menu-link:hover,
.hero-menu-link:focus-visible {
  color: #ffffff;
  outline: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(135deg, var(--menu-a, var(--yellow)), var(--menu-b, var(--blue)));
}

.hero-menu-link:hover i,
.hero-menu-link:focus-visible i {
  color: #06101c;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 40%),
    #ffffff;
}

.menu-principal {
  --menu-a: #ffd426;
  --menu-b: #ff8a18;
  --menu-glow: #ffd426;
}

.menu-account {
  --menu-a: #18b9ff;
  --menu-b: #2868ff;
  --menu-glow: #18b9ff;
}

.menu-create {
  --menu-a: #ff6aa8;
  --menu-b: #8e5cff;
  --menu-glow: #ff6aa8;
}

.menu-download {
  --menu-a: #45e69a;
  --menu-b: #12a8ff;
  --menu-glow: #45e69a;
}

.menu-rules {
  --menu-a: #ff5b58;
  --menu-b: #ffd426;
  --menu-glow: #ff5b58;
}

.primary-button,
.secondary-button,
.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button,
.account-link.login,
.account-link.create {
  color: #06101c;
  background: linear-gradient(135deg, var(--yellow), #ffad13);
  box-shadow: 0 12px 26px rgba(255, 180, 24, 0.26);
}

.secondary-button,
.account-link.recover {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(24, 185, 255, 0.09);
}

.account-link.account-recover {
  border-color: rgba(24, 185, 255, 0.72);
  color: #06101c;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 12px 26px rgba(24, 185, 255, 0.26);
}

.mobile-account-download {
  display: none;
}

.account-link.account-download {
  border: 1px solid rgba(65, 230, 154, 0.42);
  color: #06101c;
  background: linear-gradient(135deg, #45e69a, var(--blue));
  box-shadow: 0 12px 26px rgba(24, 185, 255, 0.22);
}

:root[data-theme="dark"] .account-card .account-link.login {
  color: #fff;
  background: linear-gradient(135deg, #ff354f, #b91432);
  box-shadow: 0 12px 26px rgba(220, 24, 58, 0.3);
}

.inline-login-card .primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ff354f, #b91432);
  box-shadow: 0 12px 26px rgba(220, 24, 58, 0.3);
}

.auth-links .recover-link {
  color: var(--blue);
}

.account-card,
.news-card,
.rank-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rank-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rank-badge {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.28));
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 760px;
  min-height: 760px;
  max-height: 760px;
  overflow: hidden;
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.section-head span {
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.news-scroll {
  display: grid;
  align-content: start;
  flex: 1;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 10px 2px 0;
  scrollbar-color: var(--blue) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.news-scroll::-webkit-scrollbar {
  width: 8px;
}

.news-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.news-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(var(--blue), var(--yellow));
}

.news-item {
  display: block;
  padding: 8px 5px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.news-item + .news-item {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.news-cover {
  width: min(640px, 100%);
  height: auto;
  margin: 16px auto 0;
  border-radius: 8px;
  object-fit: contain;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.26);
}

.news-item time {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.news-item h3 {
  margin: 7px 0 8px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.news-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.account-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.account-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.account-head img {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  margin-left: auto;
  object-fit: contain;
}

.account-head strong {
  display: block;
  font-size: 1.35rem;
}

.rank-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.rank-card {
  overflow: hidden;
}

.rank-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 12px;
}

.rank-title h2 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.rank-icon {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(6, 16, 28, 0.56);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.rank-icon.level {
  background: var(--yellow);
}

.rank-icon.fish {
  background: var(--blue);
}

.rank-icon.trophy {
  background: #ffb11b;
}

.rank-icon.dex {
  background: var(--red);
}

.rank-icon.has-image {
  width: 110px;
  height: 78px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.rank-icon.has-image img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
}

.rank-icon.level-badge {
  width: 96px;
  height: 70px;
}

.rank-icon.level-badge img {
  padding: 0;
  object-fit: cover;
  transform: scale(1.08);
}

.featured-rank .rank-title {
  display: flex;
  min-height: auto;
  align-items: center;
  padding: 18px 18px 12px;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 18px 18px;
  list-style: none;
  counter-reset: rank;
}

.rank-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  counter-increment: rank;
}

.rank-list li::before {
  display: none;
}

.rank-position {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.3));
}

.rank-list li > div { min-width: 0; }

.rank-list span,
.rank-list strong {
  min-width: 0;
}

.rank-list span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-list strong {
  display: block;
  grid-column: 2;
  margin-top: 5px;
  color: #ff536b;
  font-size: 0.82rem;
}

.rank-list .rank-place-1 span { color: #ffd53d; }
.rank-list .rank-place-2 span { color: #dce8f2; }
.rank-list .rank-place-3 span { color: #e9903f; }
.rank-list .rank-place-4 span { color: #39a8ff; }
.rank-list .rank-place-5 span { color: #d65cff; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-footer strong {
  display: block;
  color: var(--text);
  font-size: 1.15rem;
}

.site-footer p {
  max-width: 620px;
  margin: 8px 0 0;
  line-height: 1.6;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.site-footer a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  background: rgba(24, 185, 255, 0.08);
}

.auth-layout {
  display: grid;
  place-items: start center;
  min-height: 560px;
  padding-top: 38px;
}

.auth-card,
.profile-card,
.profile-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(480px, 100%);
  padding: 22px;
}

.inline-login-card {
  width: 100%;
}

.auth-card .section-head {
  display: grid;
  justify-content: start;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(24, 185, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.14);
}

.auth-form button {
  border: 0;
  cursor: pointer;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-actions .secondary-button {
  border: 1px solid var(--line);
  cursor: pointer;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.auth-links a,
.info-grid a,
.profile-table a {
  color: var(--blue);
  font-weight: 800;
}

.alert {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(24, 185, 255, 0.28);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  background: rgba(24, 185, 255, 0.09);
}

.alert.error {
  border: 1px solid rgba(255, 49, 77, 0.38);
  color: #ff9aa7;
  background: rgba(255, 49, 77, 0.1);
}

.account-panel-card {
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 185, 255, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(255, 212, 38, 0.1), transparent 46%),
    var(--surface);
  box-shadow: var(--shadow);
}

.inline-profile-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.inline-profile-hero h2 {
  margin: 14px 0 8px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.inline-profile-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-panel-grid,
.inline-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.profile-panel,
.inline-info-grid div,
.inline-history-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.profile-panel {
  padding: 15px;
}

.panel-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.panel-title i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #06101c;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.panel-title strong,
.inline-section-title h3,
.inline-history-grid h3 {
  margin: 0;
  font-size: 1rem;
}

.profile-panel h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.profile-panel.danger h3 {
  color: #ff9aa7;
}

.profile-panel p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.profile-panel a,
.inline-info-grid a,
.inline-section-title a,
.compact-profile-table a {
  color: var(--blue);
  font-weight: 800;
}

.inline-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.inline-info-grid div {
  padding: 14px;
}

.inline-info-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.inline-info-grid strong {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

.inline-info-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.wide-info {
  grid-column: 1 / -1;
}

.inline-section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.inline-section-title nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-profile-table {
  min-width: 520px;
}

.inline-history-grid article {
  min-width: 0;
  padding: 15px;
}

.mini-history-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 6px;
  scrollbar-color: var(--blue) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.mini-history-list div,
.mini-history-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.11);
}

.mini-history-list strong,
.mini-history-list span,
.mini-history-list small {
  display: block;
}

.mini-history-list span,
.mini-history-list small,
.mini-history-list p {
  color: var(--muted);
  line-height: 1.5;
}

.legacy-account-panel {
  display: none;
}

.classic-profile {
  overflow: hidden;
  padding: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.characters-cap {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(134, 215, 255, 0.26);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(255, 212, 38, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(24, 185, 255, 0.22), rgba(255, 49, 77, 0.08)),
    rgba(6, 16, 28, 0.42);
}

.characters-cap i {
  color: var(--yellow);
}

.classic-profile > h2 {
  margin: 20px 18px 14px;
  color: var(--text);
  font-size: 1.8rem;
  text-align: center;
}

.purple-box,
.classic-alert,
.message {
  margin: 14px 18px 0;
}

.purple-box,
.classic-alert {
  padding: 13px 15px;
  border: 1px solid rgba(24, 185, 255, 0.24);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(24, 185, 255, 0.07);
}

.purple-box a,
.classic-profile a {
  color: var(--blue);
  font-weight: 800;
}

.purple-box i {
  color: #b36bff;
}

.message {
  border: 1px solid rgba(134, 215, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.message .content {
  padding: 12px;
}

.classic-profile fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(134, 215, 255, 0.24);
  border-radius: 8px;
}

.classic-profile legend {
  padding: 0 8px;
  color: var(--yellow);
  font-weight: 900;
}

.security-row,
.status-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
}

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

.security-row > i,
.status-row > i {
  font-size: 3.2rem;
  text-align: center;
}

.security-row > i {
  color: var(--red);
}

.status-row > i {
  color: #8fa6bd;
}

.security-row strong,
.status-row strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.security-row small,
.status-row small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.red {
  color: #ff8f9e;
}

.classic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid rgba(24, 185, 255, 0.34);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  background: rgba(24, 185, 255, 0.08);
}

.classic-button:hover,
.classic-button:focus-visible {
  color: #06101c;
  outline: none;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.classic-info-table {
  display: grid;
  grid-template-columns: minmax(140px, 30%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.classic-info-table > div {
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.classic-info-table > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.classic-info-table .label {
  color: var(--text);
  font-weight: 900;
  background: rgba(24, 185, 255, 0.08);
}

.classic-info-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.classic-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.password-success-message {
  border-color: rgba(65, 230, 154, 0.48);
  color: #75efb0;
  background: rgba(65, 230, 154, 0.1);
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.password-modal.is-open {
  display: flex;
}

.password-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 10, 20, 0.82);
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.password-modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 24px;
  border: 1px solid rgba(24, 185, 255, 0.38);
  border-radius: 15px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(13, 35, 52, 0.99), rgba(7, 22, 36, 0.99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56), 0 0 35px rgba(24, 185, 255, 0.1);
}

.password-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 76, 98, 0.34);
  border-radius: 8px;
  color: #ff7385;
  background: rgba(255, 76, 98, 0.08);
  cursor: pointer;
}

.password-modal-title {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 42px;
  margin-bottom: 20px;
}

.password-modal-title > i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #06101c;
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.password-modal-title span {
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.password-modal-title h2 {
  margin: 3px 0 0;
  font-size: 1.45rem;
}

.password-form-message {
  margin-bottom: 16px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 76, 98, 0.44);
  border-radius: 8px;
  color: #ff91a0;
  background: rgba(255, 76, 98, 0.1);
}

.password-change-form {
  display: grid;
  gap: 14px;
}

.password-change-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.password-change-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.password-change-form input:focus {
  border-color: rgba(24, 185, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.13);
}

.password-change-form small {
  color: var(--muted);
  font-weight: 600;
}

.password-form-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 5px;
}

.password-form-actions button {
  border: 0;
  cursor: pointer;
}

body.password-modal-open {
  overflow: hidden;
}

.recovery-key-explanation {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 212, 38, 0.32);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 212, 38, 0.07);
}

.recovery-key-explanation i {
  margin-top: 3px;
  color: var(--yellow);
}

.recovery-key-explanation p {
  margin: 0;
  line-height: 1.5;
}

.generated-recovery-key {
  display: grid;
  gap: 8px;
}

.generated-recovery-key > span {
  color: #75efb0;
  font-weight: 900;
}

.generated-recovery-key code {
  display: block;
  padding: 10px;
  border: 1px dashed rgba(255, 212, 38, 0.55);
  border-radius: 7px;
  color: var(--yellow);
  font: 900 1rem/1.2 monospace;
  letter-spacing: 0.08em;
  text-align: center;
  background: rgba(255, 212, 38, 0.07);
}

.generated-recovery-key button {
  min-height: 34px;
  border: 1px solid rgba(24, 185, 255, 0.38);
  border-radius: 7px;
  color: var(--text);
  font-weight: 800;
  background: rgba(24, 185, 255, 0.1);
  cursor: pointer;
}

.generated-recovery-key small {
  color: #ff91a0;
}

.recovery-key-active {
  margin-right: 8px;
  color: #75efb0;
  font-weight: 900;
}

.recovery-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: linear-gradient(145deg, rgba(10, 35, 53, 0.96), rgba(12, 23, 40, 0.98));
}

.recovery-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.recovery-heading-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 15px;
  color: #06101c;
  font-size: 1.45rem;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
  box-shadow: 0 10px 28px rgba(24, 185, 255, 0.2);
}

.recovery-heading span {
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recovery-heading h2 {
  margin: 3px 0 5px;
  font-size: 1.75rem;
}

.recovery-heading p,
.recovery-warning p,
.recovery-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.recovery-warning,
.recovery-result {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 212, 38, 0.3);
  border-radius: 9px;
  background: rgba(255, 212, 38, 0.065);
}

.recovery-warning > i {
  margin-top: 3px;
  color: var(--yellow);
}

.recovery-result.is-error {
  border-color: rgba(255, 76, 98, 0.4);
  color: #ff91a0;
  background: rgba(255, 76, 98, 0.09);
}

.recovery-result.is-success {
  border-color: rgba(65, 230, 154, 0.4);
  color: #75efb0;
  background: rgba(65, 230, 154, 0.09);
}

.recovery-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 18px;
}

.recovery-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.recovery-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.055);
  outline: none;
}

.recovery-form input:focus {
  border-color: rgba(24, 185, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.13);
}

.recovery-submit,
.recovery-login-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #06101c;
  font-weight: 900;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
  cursor: pointer;
}

.recovery-login-link {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .password-modal {
    padding: 12px;
  }

  .password-modal-card {
    padding: 20px 16px 16px;
  }

  .password-form-actions {
    grid-template-columns: 1fr;
  }

  .recovery-panel {
    padding: 16px;
  }

  .recovery-heading {
    align-items: flex-start;
  }

  .recovery-heading h2 {
    font-size: 1.4rem;
  }

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

.pTable {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pTable th,
.pTable td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.pTable th {
  color: #ffffff;
  font-size: 0.82rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(24, 185, 255, 0.36), rgba(5, 115, 216, 0.22));
}

.pTable tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.035);
}

.character-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-right: 8px;
  border: 1px solid rgba(24, 185, 255, 0.34);
  border-radius: 8px;
  color: var(--yellow);
  background: rgba(6, 16, 28, 0.34);
  vertical-align: middle;
}

.pTable small i {
  color: #2196f3;
}

.account-character-roster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(4, 16, 29, .32);
}

.account-character-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.account-character-head span { display: flex; align-items: center; gap: 6px; }
.account-character-head span:last-child { justify-content: flex-end; }
.account-character-list { display: grid; gap: 8px; padding: 10px; }

.account-character-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 64px;
  gap: 13px;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 9px 14px;
  border: 1px solid rgba(134, 215, 255, .24);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,.055), rgba(24,185,255,.025));
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.account-character-card:hover {
  border-color: rgba(24,185,255,.55);
  background: linear-gradient(90deg, rgba(24,185,255,.1), rgba(255,255,255,.035));
  transform: translateY(-1px);
}

.account-character-card > img {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(24,185,255,.35);
  border-radius: 8px;
  object-fit: contain;
  image-rendering: auto;
  background: rgba(2, 10, 20, .5);
}

.account-character-card > div { display: grid; gap: 7px; min-width: 0; }
.account-character-card strong { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: .94rem; overflow-wrap: anywhere; }
.account-character-card span { color: var(--muted); font-size: .75rem; font-weight: 800; }
.account-character-card span i { margin-right: 4px; color: var(--blue); }
.account-character-card > b { justify-self: end; color: #ff536b; font-size: 1rem; }

.account-character-status {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.account-character-status.is-online { color: #45e69a; background: #45e69a; }
.account-character-status.is-offline { color: #a96cff; background: #a96cff; }
.account-character-empty { margin: 0; padding: 22px; color: var(--muted); text-align: center; }

@media (max-width: 560px) {
  .account-character-head { grid-template-columns: 1fr; padding: 10px 12px; }
  .account-character-head span:last-child { display: none; }
  .account-character-card { grid-template-columns: 48px minmax(0, 1fr); min-height: 66px; padding: 8px 10px; }
  .account-character-card > img { width: 48px; height: 48px; }
  .account-character-card > b { display: none; }
}

.classic-history-list {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: var(--blue) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.classic-history-list div,
.classic-history-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 16, 28, 0.2);
}

.classic-history-list strong,
.classic-history-list span,
.classic-history-list small {
  display: block;
}

.classic-history-list span,
.classic-history-list small,
.classic-history-list p {
  color: var(--muted);
  line-height: 1.45;
}

.rules-panel {
  overflow: hidden;
  padding: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 185, 255, 0.1), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
}

.rules-panel > h2 {
  margin: 20px 18px 10px;
  font-size: 1.9rem;
  text-align: center;
}

.rules-intro,
.rules-summary,
.rules-chapter {
  margin: 14px 18px 0;
}

.rules-intro {
  padding: 16px;
  border: 1px solid rgba(24, 185, 255, 0.24);
  border-radius: 8px;
  color: var(--muted);
  line-height: 1.7;
  background: rgba(24, 185, 255, 0.07);
}

.rules-intro p {
  margin: 0;
}

.rules-intro p + p {
  margin-top: 10px;
}

.rules-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rules-summary div,
.rules-chapter {
  border: 1px solid rgba(134, 215, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.rules-summary div {
  padding: 14px;
}

.rules-summary strong {
  display: block;
  color: var(--yellow);
  font-size: 0.95rem;
}

.rules-summary span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.rules-chapter {
  padding: 16px;
}

.rules-chapter h3 {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 1.08rem;
}

.rules-chapter p,
.rules-chapter li {
  color: var(--muted);
  line-height: 1.65;
}

.rules-chapter p {
  margin: 0;
}

.rules-chapter p + p {
  margin-top: 10px;
}

.rules-chapter ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.rules-chapter li::marker {
  color: var(--blue);
}

.support-panel {
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 53, 79, .12), transparent 30%),
    linear-gradient(145deg, rgba(24, 185, 255, .08), transparent 42%),
    var(--surface);
  box-shadow: var(--shadow);
}

.support-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.support-heading > span {
  color: var(--blue);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.support-heading h2 {
  margin: 8px 0 7px;
  font-size: 1.8rem;
}

.support-heading p,
.support-guidance p,
.support-success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.support-success,
.support-guidance {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 15px;
  border-radius: 8px;
}

.support-success {
  border: 1px solid rgba(69, 230, 154, .48);
  background: rgba(69, 230, 154, .1);
}

.support-success > i {
  color: #45e69a;
  font-size: 1.45rem;
}

.support-success strong,
.support-guidance strong { display: block; margin-bottom: 4px; }

.support-guidance {
  border: 1px solid rgba(24, 185, 255, .28);
  background: rgba(24, 185, 255, .07);
}

.support-guidance > i { color: var(--yellow); font-size: 1.3rem; }
.support-alert { margin-top: 16px; }

.support-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  width: min(620px, 100%);
  margin: 18px auto 0;
}

.support-form label {
  display: grid;
  gap: 7px;
}

.support-form .support-wide,
.support-form > button,
.support-required {
  grid-column: 1;
}

.support-form label > span {
  color: var(--text);
  font-size: .78rem;
  font-weight: 800;
}

.support-form label b,
.support-required b { color: #ff536b; }
.support-form label small { color: var(--muted); font-weight: 600; }

.support-form input,
.support-form textarea {
  width: 100%;
  border: 1px solid rgba(134, 215, 255, .22);
  border-radius: 8px;
  outline: 0;
  color: var(--text);
  font: inherit;
  background: rgba(4, 16, 30, .58);
  transition: border-color .18s ease, box-shadow .18s ease;
}

:root[data-theme="light"] .support-form input,
:root[data-theme="light"] .support-form textarea { background: rgba(255, 255, 255, .72); }

.support-form input { min-height: 46px; padding: 0 13px; }
.support-form textarea { min-height: 170px; padding: 13px; resize: vertical; line-height: 1.55; }

.support-form input:focus,
.support-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, .11);
}

.support-form > button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-weight: 900;
  background: linear-gradient(135deg, #ff354f, #b91432);
  box-shadow: 0 12px 26px rgba(220, 24, 58, .25);
  cursor: pointer;
}

.support-required { margin: -5px 0 0; color: var(--muted); font-size: .72rem; text-align: center; }
.support-honeypot { position: absolute !important; left: -9999px !important; }

.download-panel {
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 8% 0, rgba(69,230,154,.14), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(24,185,255,.15), transparent 32%),
    var(--surface);
  box-shadow: var(--shadow);
}

.download-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.download-hero-icon {
  display: grid;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(69,230,154,.42);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(69,230,154,.18), rgba(24,185,255,.12));
  box-shadow: 0 14px 28px rgba(0,0,0,.22);
}

.download-hero-icon img { width: 52px; height: 52px; object-fit: contain; }
.download-hero span,
.download-section-title span,
.download-file-info span { color: #45e69a; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.download-hero h2 { margin: 5px 0 6px; font-size: clamp(1.65rem, 4vw, 2.35rem); }
.download-hero p { max-width: 650px; margin: 0; color: var(--muted); line-height: 1.55; }

.download-platforms {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 10px;
  margin-top: 18px;
}

.download-platform {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 0;
  padding: 15px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
  background: rgba(255,255,255,.035);
}

.download-platform i { margin-bottom: 3px; color: var(--muted); font-size: 1.75rem; }
.download-platform strong { font-size: .9rem; }
.download-platform small { color: var(--muted); font-size: .68rem; font-weight: 800; }
.download-platform.is-active { border-color: rgba(69,230,154,.55); background: rgba(69,230,154,.1); }
.download-platform.is-active i,
.download-platform.is-active small { color: #45e69a; }
.download-platform.is-disabled { opacity: .55; }

.download-options {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.download-main-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(235px, .72fr);
  gap: 16px;
  align-items: center;
  margin-top: 0;
  padding: 18px;
  border: 1px solid rgba(24,185,255,.3);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(24,185,255,.09), rgba(69,230,154,.05));
}

.download-main-card.is-recommended { border-color: rgba(69,230,154,.52); }
.download-main-card.is-portable { background: linear-gradient(135deg, rgba(24,185,255,.07), rgba(255,255,255,.025)); }
.download-main-button.is-secondary { background: linear-gradient(135deg,#087fb5,#0ba8d4); box-shadow: 0 14px 28px rgba(11,168,212,.2); }

.download-file-info { display: flex; align-items: center; gap: 13px; min-width: 0; }
.download-file-info > div:first-child { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 10px; color: var(--yellow); font-size: 1.45rem; background: rgba(255,212,38,.11); }
.download-file-info > div:last-child { display: grid; gap: 4px; min-width: 0; }
.download-file-info strong { font-size: 1rem; }
.download-file-info small { color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; }

.download-main-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 16px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #ff354f, #b91432);
  box-shadow: 0 14px 28px rgba(220,24,58,.25);
}

.download-main-button > i { font-size: 1.35rem; }
.download-main-button span { display: grid; gap: 2px; }
.download-main-button strong { font-size: .88rem; }
.download-main-button small { color: rgba(255,255,255,.76); font-size: .64rem; }
.download-safe { grid-column: 1 / -1; margin: -2px 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
.download-safe i { margin-right: 5px; color: #45e69a; }

.download-section-title { margin-top: 24px; text-align: center; }
.download-section-title h3 { margin: 5px 0 0; font-size: 1.25rem; }
.download-requirements { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.download-requirements article { display: grid; gap: 6px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.03); }
.download-requirements i { color: var(--blue); font-size: 1.25rem; }
.download-requirements span { color: var(--muted); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.download-requirements strong { font-size: .78rem; overflow-wrap: anywhere; }

.download-guide { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.download-guide .download-section-title { margin-top: 0; text-align: left; }
.download-guide ol { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.download-guide li { display: flex; align-items: flex-start; gap: 12px; }
.download-guide li > b { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #06101c; background: linear-gradient(135deg,var(--yellow),#ff9e18); }
.download-guide li strong { font-size: .86rem; }
.download-guide li p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.download-help { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: center; margin-top: 16px; padding: 16px; border: 1px solid rgba(24,185,255,.28); border-radius: 9px; background: rgba(24,185,255,.07); }
.download-help > i { color: var(--blue); font-size: 1.5rem; }
.download-help strong { font-size: .88rem; }
.download-help p { margin: 3px 0 0; color: var(--muted); font-size: .74rem; }
.download-help a { padding: 10px 13px; border: 1px solid rgba(24,185,255,.45); border-radius: 8px; color: var(--text); font-size: .74rem; font-weight: 900; background: rgba(24,185,255,.12); }

@media (max-width: 768px) {
  .inline-login-card .primary-button,
  .account-card .account-link.login {
    color: #fff;
    background: linear-gradient(135deg, #ff354f, #b91432);
    box-shadow: 0 12px 26px rgba(220,24,58,.28);
  }

  .download-panel { padding: 14px; }
  .download-hero { align-items: flex-start; gap: 12px; }
  .download-hero-icon { flex-basis: 54px; width: 54px; height: 54px; border-radius: 13px; }
  .download-hero-icon img { width: 38px; height: 38px; }
  .download-hero h2 { font-size: 1.45rem; }
  .download-hero p { font-size: .78rem; }
  .download-platform { padding: 11px 5px; }
  .download-platform i { font-size: 1.35rem; }
  .download-platform strong { font-size: .72rem; }
  .download-main-card { grid-template-columns: 1fr; padding: 14px; }
  .download-main-button { width: 100%; }
  .download-requirements { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .download-help { grid-template-columns: auto minmax(0,1fr); }
  .download-help a { grid-column: 1 / -1; text-align: center; }

  .page-download .download-panel { order: 2; }
  .page-download .sidebar { order: 3; }
}

@media (max-width: 420px) {
  .download-hero-icon { display: none; }
  .download-file-info > div:first-child { display: none; }
  .download-platforms { gap: 6px; }
  .download-requirements { grid-template-columns: 1fr; }
}

.profile-layout {
  display: grid;
  gap: 18px;
}

.profile-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 28px;
}

.profile-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.profile-hero p,
.profile-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.profile-grid,
.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.profile-card {
  padding: 20px;
}

.profile-card-title {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.profile-card-title i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #06101c;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.profile-card-title h2 {
  margin: 0;
  font-size: 1.12rem;
}

.profile-card > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.warning-card > strong {
  color: #ff9aa7;
}

.profile-card .account-link {
  margin: 14px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.info-grid dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.info-grid dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.info-grid small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.4;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-tabs a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  background: rgba(24, 185, 255, 0.08);
}

.table-wrap {
  overflow-x: auto;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.profile-table th,
.profile-table td {
  padding: 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.profile-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.collapse-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  background: transparent;
}

.collapse-title strong {
  color: var(--blue);
  font-size: 0.86rem;
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-top: 14px;
  scrollbar-color: var(--blue) rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
}

.history-item,
.empty-state {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.history-item strong,
.history-item span,
.history-item small {
  display: block;
}

.history-item span,
.history-item small,
.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.history-item span {
  margin-top: 5px;
}

.history-item small {
  margin-top: 4px;
}

.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto 1fr;
    row-gap: 12px;
  }

  .navbuttons {
    grid-column: auto;
    grid-row: auto;
    justify-content: flex-end;
    overflow: visible;
    padding: 0;
  }

  .header-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .header-actions .buttons {
    width: 34px;
    height: 34px;
    font-size: .9rem;
  }

  .header-actions .language-current {
    height: 40px;
    min-width: 120px;
  }

  .header-actions .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .header-actions .theme-toggle span {
    inset: 10px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 250px);
    gap: 14px;
  }

  .news-card {
    height: 760px;
    min-height: 760px;
    max-height: 760px;
  }

  .news-scroll {
    flex: 1;
    max-height: none;
  }

  .sidebar {
    grid-row: auto;
  }

  .profile-hero,
  .profile-grid,
  .history-grid,
  .profile-panel-grid,
  .inline-history-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero,
  .inline-profile-hero {
    display: grid;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 8px, 1180px);
    padding-top: 12px;
  }

  .site-header {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    min-height: auto;
    margin-bottom: 18px;
  }

  .navbuttons {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
  }

  .navbuttons::-webkit-scrollbar {
    display: none;
  }

  .brand {
    position: static;
    left: auto;
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    transform: none;
  }

  .brand img {
    width: min(185px, 54vw);
  }

  .header-actions .buttons {
    width: 28px;
    height: 28px;
    font-size: .72rem;
  }

  .header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
    justify-self: stretch;
    gap: 6px;
  }

  .header-actions .language-current {
    min-width: 106px;
    height: 34px;
    padding: 0 6px;
    font-size: .62rem;
  }

  .header-actions .language-current img,
  .header-actions .language-options img {
    width: 19px;
    height: 13px;
  }

  .header-actions .language-options {
    width: 150px;
  }

  .header-actions .theme-toggle {
    grid-column: auto;
    grid-row: auto;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .header-actions .theme-toggle span {
    inset: 9px;
  }

  .mobile-menu-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .main-column {
    display: contents;
  }

  .main-column > * {
    order: 3;
  }

  .main-column > .hero-panel {
    order: 1;
  }

  .sidebar {
    order: 2;
    align-self: stretch;
  }

  .hero-panel {
    min-height: auto;
    padding: 18px 12px;
  }

  .hero-copy h1 {
    font-size: 3rem;
  }

  .hero-actions {
    display: grid;
  }

  .hero-menu {
    grid-template-columns: 1fr 1fr;
  }

  .hero-menu .menu-download {
    display: none;
  }

  .hero-menu-link {
    justify-content: start;
    min-height: 46px;
  }

  .hero-menu-link:nth-child(odd) {
    border-left: 0;
  }

  .hero-menu-link:nth-child(n + 3) {
    border-top: 1px solid rgba(134, 215, 255, 0.18);
  }

  .hero-menu-link:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .news-card {
    height: 650px;
    min-height: 650px;
    max-height: 650px;
    padding: 12px;
  }

  .news-scroll {
    max-height: none;
    padding-right: 4px;
    overflow-x: hidden;
  }

  .news-item,
  .news-item h3,
  .news-item p {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .news-cover {
    width: 100%;
    max-width: 100%;
  }

  .account-card {
    display: none;
  }

  .account-head {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 7px 8px;
    border: 1px solid rgba(255, 212, 38, 0.34);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 212, 38, 0.14), rgba(24, 185, 255, 0.06));
  }

  .account-head strong {
    color: var(--yellow);
    font-size: 0.95rem;
    text-align: center;
    text-transform: uppercase;
  }

  .account-link {
    min-height: 32px;
    padding: 0 5px;
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
  }

  .mobile-account-download {
    display: inline-flex;
  }

  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rank-title {
    gap: 4px;
    padding: 7px 6px 5px;
  }

  .featured-rank .rank-title {
    min-height: auto;
    justify-items: center;
    text-align: center;
  }

  .rank-title h2 {
    font-size: 0.66rem;
  }

  .rank-badge { width: 38px; height: 38px; flex-basis: 38px; }

  .rank-icon.has-image {
    width: 76px;
    height: 54px;
  }

  .rank-icon.level-badge {
    width: 70px;
    height: 50px;
  }

  .rank-list {
    gap: 4px;
    padding: 0 5px 6px;
  }

  .rank-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 4px;
    min-height: 34px;
    padding: 4px;
  }

  .rank-position { width: 28px; height: 28px; }

  .rank-list li::before {
    width: 22px;
    height: 22px;
    font-size: 0.68rem;
  }

  .rank-list span {
    font-size: 0.66rem;
  }

  .rank-list strong {
    margin-top: 2px;
    font-size: 0.58rem;
  }

  .site-footer {
    display: grid;
    padding: 18px;
  }

  .site-footer nav {
    justify-content: start;
  }

  .profile-hero,
  .account-panel-card,
  .profile-card,
  .auth-card {
    padding: 18px;
  }

  .info-grid,
  .inline-info-grid {
    grid-template-columns: 1fr;
  }

  .inline-section-title {
    display: grid;
  }

  .classic-profile > h2 {
    font-size: 1.45rem;
  }

  .rules-panel > h2 {
    font-size: 1.45rem;
  }

  .rules-summary {
    grid-template-columns: 1fr;
  }

  .support-panel {
    padding: 14px;
  }

  .support-heading h2 {
    font-size: 1.45rem;
  }

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

  .support-form label,
  .support-form .support-wide,
  .support-form > button,
  .support-required {
    grid-column: 1;
  }

  .security-row,
  .status-row,
  .classic-info-table {
    grid-template-columns: 1fr;
  }

  .classic-info-table > div {
    border-bottom: 1px solid var(--line);
  }

  .classic-action-row {
    display: grid;
    justify-content: stretch;
  }

.classic-button {
    width: 100%;
  }
}

.admin-page {
  min-height: 100vh;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 44px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.admin-brand img {
  width: 220px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

.admin-header div {
  text-align: right;
}

.admin-header span,
.admin-card-title span,
.admin-welcome span,
.admin-metrics span {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-header strong {
  display: block;
  margin-top: 4px;
  font-size: 1.2rem;
}

.admin-login-wrap {
  display: grid;
  place-items: center;
  min-height: 620px;
}

.admin-login-card,
.admin-sidebar,
.admin-content,
.admin-panel-card,
.admin-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-login-card {
  width: min(480px, 100%);
  padding: 24px;
}

.admin-card-title {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-card-title > i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #06101c;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.admin-card-title h1 {
  margin: 4px 0 0;
  font-size: 1.55rem;
}

.admin-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.admin-form input:focus {
  border-color: rgba(24, 185, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.14);
}

.admin-form button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #06101c;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.admin-test-access {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid rgba(24, 185, 255, 0.24);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(24, 185, 255, 0.07);
}

.admin-test-access strong {
  color: var(--text);
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.admin-sidebar strong {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 1.2rem;
}

.admin-sidebar a {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  border-color: rgba(24, 185, 255, 0.36);
  color: var(--text);
  background: rgba(24, 185, 255, 0.08);
}

.admin-content {
  padding: 20px;
}

.admin-welcome {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-welcome h1 {
  margin: 8px 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.admin-welcome p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.admin-metrics article {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.admin-metrics i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #06101c;
  background: linear-gradient(135deg, var(--yellow), var(--blue));
}

.admin-metrics strong {
  font-size: 1.25rem;
}

.admin-panel-card {
  margin-top: 18px;
  padding: 18px;
}

.admin-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.admin-panel-card h2 {
  margin: 0 0 14px;
}

.admin-panel-heading h2 {
  margin: 0;
}

.admin-panel-heading a,
.admin-news-actions a,
.admin-news-actions button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 185, 255, 0.28);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  background: rgba(24, 185, 255, 0.08);
}

.admin-panel-heading a:hover,
.admin-news-actions a:hover,
.admin-news-actions button:hover {
  border-color: rgba(24, 185, 255, 0.56);
  background: rgba(24, 185, 255, 0.14);
}

.admin-task-list {
  display: grid;
  gap: 10px;
}

.admin-task-list span {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.admin-task-list i {
  color: var(--yellow);
}

.admin-account-alert { margin-top: 18px; }
.admin-account-search { display: flex; gap: 10px; align-items: center; }
.admin-account-search input { flex: 1; min-width: 0; }
.admin-account-search button,
.admin-account-search a,
.admin-account-actions-grid button,
.admin-account-actions-grid select,
.admin-account-actions-grid input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.admin-account-search button,
.admin-account-search a,
.admin-account-actions-grid button { padding: 0 13px; font-weight: 900; cursor: pointer; }
.admin-account-search a { display: inline-flex; align-items: center; }
.admin-accounts-grid { display: grid; gap: 16px; margin-top: 18px; }
.admin-search-empty { padding: 42px 20px; text-align: center; }
.admin-search-empty > i { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 50%; color: #07111d; font-size: 1.35rem; background: linear-gradient(135deg, var(--yellow), var(--blue)); }
.admin-search-empty h2 { margin-bottom: 8px; }
.admin-search-empty p { max-width: 560px; margin: 0 auto; color: var(--muted); }
.admin-account-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5, 18, 31, 0.64); }
.admin-account-card.is-banned { border-color: rgba(255, 78, 104, 0.48); }
.admin-account-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.admin-account-head span { color: var(--muted); font-size: .8rem; font-weight: 900; }
.admin-account-head h2 { margin: 3px 0 0; }
.admin-account-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-account-badges span { padding: 6px 9px; border-radius: 999px; color: var(--text); background: rgba(24, 185, 255, .12); }
.admin-account-badges .panel-admin { color: #07111d; background: var(--yellow); }
.admin-account-badges .banned { color: #fff; background: #c72e49; }
.admin-account-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-account-section h3,
.admin-account-action-box h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; font-size: .95rem; }
.admin-account-section h3 i,
.admin-account-action-box h3 i { color: var(--yellow); }
.admin-account-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.admin-account-details div { padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.admin-account-details dt { color: var(--muted); font-size: .76rem; font-weight: 900; text-transform: uppercase; }
.admin-account-details dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.admin-character-list { margin: 0; padding: 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
.admin-player-profiles { display: grid; gap: 10px; }
.admin-player-profile { display: grid; grid-template-columns: 82px minmax(160px, 1fr) minmax(220px, .8fr); gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.admin-player-profile > img { width: 82px; height: 82px; border: 1px solid rgba(24,185,255,.28); border-radius: 9px; object-fit: cover; background: rgba(24,185,255,.08); }
.admin-player-main span { color: #39d98a; font-size: .7rem; font-weight: 900; }
.admin-player-main h4 { margin: 4px 0; font-size: 1.15rem; }
.admin-player-main p { margin: 0; color: var(--muted); font-size: .82rem; }
.admin-player-profile dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 0; }
.admin-player-profile dl div { padding: 8px; border-radius: 6px; background: rgba(255,255,255,.035); }
.admin-player-profile dt { color: var(--muted); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.admin-player-profile dd { margin: 3px 0 0; font-size: .82rem; overflow-wrap: anywhere; }
.admin-account-history { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.admin-account-history summary { padding: 13px; cursor: pointer; color: var(--text); font-weight: 900; background: rgba(24,185,255,.06); }
.admin-account-history summary i { margin-right: 8px; color: var(--yellow); }
.admin-history-content { display: grid; gap: 10px; padding: 12px; }
.admin-history-content section { padding: 11px; border: 1px solid var(--line); border-radius: 7px; }
.admin-history-content h3 { margin: 0 0 8px; font-size: .9rem; }
.admin-history-content p { margin: 5px 0; color: var(--muted); }
.admin-ban-reason { padding: 10px; border-radius: 7px; color: #ff9caf; background: rgba(255, 78, 104, .1); }
.admin-account-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.admin-account-action-box { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.admin-account-action-box > p { min-height: 38px; margin: 0 0 12px; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.admin-account-action-box form { display: flex; gap: 8px; }
.admin-account-action-box select,
.admin-account-action-box input { flex: 1; min-width: 0; padding: 0 10px; }
.admin-account-action-box select option { color: #0b1724; background: #fff; }
.admin-account-action-box button { border-color: rgba(24, 185, 255, .3); background: rgba(24, 185, 255, .1); }
.admin-account-action-box button.warning { border-color: rgba(255, 211, 45, .4); color: var(--yellow); }
.admin-account-action-box button.danger { border-color: rgba(255, 78, 104, .5); color: #ff9caf; }
.admin-account-action-box button.unban { border-color: rgba(57, 217, 138, .55); color: #8ff0bd; background: rgba(57, 217, 138, .1); }
.admin-ban-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.admin-ban-actions > form:last-child button { height: 100%; }
.admin-account-action-box .admin-kick-form { margin-top: 9px; }
.admin-account-action-box button.kick { border-color: #e33f59; color: #fff; background: #b8233c; }
.admin-account-action-box button.kick:hover { background: #d52d49; }
.admin-account-action-box button:disabled { opacity: .4; cursor: not-allowed; }
.admin-security-box { grid-column: 1 / -1; }

@media (max-width: 700px) {
  .admin-account-head,
  .admin-account-search,
  .admin-account-action-box form { flex-direction: column; }
  .admin-ban-actions { grid-template-columns: 1fr; }
  .admin-account-details { grid-template-columns: 1fr; }
  .admin-account-actions-grid { grid-template-columns: 1fr; }
  .admin-player-profile { grid-template-columns: 64px 1fr; }
  .admin-player-profile > img { width: 64px; height: 64px; }
  .admin-player-profile dl { grid-column: 1 / -1; }
  .admin-account-badges { justify-content: flex-start; }
  .admin-account-search button,
  .admin-account-search a,
  .admin-account-actions-grid button,
  .admin-account-actions-grid select,
  .admin-account-actions-grid input { width: 100%; }
}

.admin-news-form {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
}

.admin-news-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-news-form .wide,
.admin-editor-label {
  grid-column: 1 / -1;
}

.admin-editor-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-editor-label > small {
  color: rgba(232, 241, 255, 0.58);
  font-weight: 700;
  line-height: 1.45;
}

.admin-file-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.admin-file-label small {
  color: rgba(232, 241, 255, 0.58);
  font-weight: 700;
  line-height: 1.45;
}

.admin-news-form input,
.admin-news-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.admin-news-form input {
  min-height: 46px;
}

.admin-news-form input[type="file"] {
  display: block;
  min-height: auto;
  padding: 13px;
  color: var(--muted);
}

.admin-news-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(24, 185, 255, 0.35);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  background: rgba(24, 185, 255, 0.12);
}

.admin-news-form textarea {
  resize: vertical;
}

.admin-news-form input:focus,
.admin-news-form textarea:focus {
  border-color: rgba(24, 185, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(24, 185, 255, 0.14);
}

.admin-save-button {
  grid-column: 1 / -1;
  min-height: 46px;
  border: 1px solid rgba(24, 185, 255, 0.35);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(24, 185, 255, 0.2), rgba(24, 185, 255, 0.09));
}

.admin-save-button:hover {
  border-color: rgba(255, 214, 79, 0.5);
  background: linear-gradient(180deg, rgba(24, 185, 255, 0.28), rgba(24, 185, 255, 0.14));
}

.admin-editor-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 22, 31, 0.62);
}

.admin-editor-toolbar button {
  display: inline-flex;
  grid-column: auto;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(232, 241, 255, 0.1);
  border-radius: 6px;
  color: rgba(232, 241, 255, 0.72);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.045);
}

.admin-editor-toolbar button:hover,
.admin-editor-toolbar button:focus-visible {
  border-color: rgba(24, 185, 255, 0.44);
  color: var(--text);
  background: rgba(24, 185, 255, 0.11);
}

.admin-rich-editor {
  min-height: 240px;
  padding: 16px 17px;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.68;
  outline: none;
}

.admin-rich-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(24, 185, 255, 0.18);
}

.admin-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(232, 241, 255, 0.46);
  pointer-events: none;
}

.admin-rich-editor h2,
.admin-rich-editor h3,
.admin-news-body h2,
.admin-news-body h3 {
  margin: 0.35em 0 0.45em;
  color: var(--text);
  line-height: 1.18;
}

.admin-rich-editor blockquote,
.admin-news-body blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(255, 214, 79, 0.72);
  color: rgba(232, 241, 255, 0.78);
  background: rgba(255, 214, 79, 0.07);
}

.admin-rich-editor ul,
.admin-rich-editor ol,
.admin-news-body ul,
.admin-news-body ol {
  margin: 10px 0 10px 22px;
  padding: 0;
}

.admin-news-body {
  color: var(--muted);
  line-height: 1.6;
}

.admin-current-image {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(24, 185, 255, 0.2);
  border-radius: 8px;
  color: rgba(232, 241, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(24, 185, 255, 0.06);
}

.admin-current-image img {
  width: 96px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.admin-news-list {
  display: grid;
  gap: 12px;
}

.admin-news-list > p {
  margin: 0;
  color: var(--muted);
}

.admin-news-list article {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-news-list article.admin-news-without-image {
  grid-template-columns: 1fr;
}

.admin-news-list img {
  width: 88px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.admin-news-list time {
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-news-list h3 {
  margin: 4px 0 6px;
}

.admin-news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.admin-news-actions form { margin: 0; }
.admin-news-actions button.admin-news-delete { border-color: rgba(255, 78, 104, .58); color: #fff; background: #b8233c; }
.admin-news-actions button.admin-news-delete:hover { border-color: #ff7188; background: #d52d49; }

.admin-news-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-news-list .admin-news-body {
  display: -webkit-box;
  overflow: hidden;
  max-height: 4.65em;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.admin-news-list .admin-news-body > * { margin-top: 0; margin-bottom: 0; }

.admin-support-list { display: grid; gap: 16px; }

.admin-support-ticket {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 23, 39, .78);
  box-shadow: var(--shadow);
}

.admin-support-ticket.is-open { border-left: 4px solid #ff536b; }
.admin-support-ticket.is-answered { border-left: 4px solid #45e69a; }

.admin-support-ticket > header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-support-ticket header span { color: var(--blue); font-size: .7rem; font-weight: 900; }
.admin-support-ticket header h2 { margin: 5px 0 0; font-size: 1.18rem; }
.admin-support-ticket header > strong { padding: 7px 10px; border-radius: 999px; color: #fff; font-size: .68rem; background: #b8233c; }
.admin-support-ticket.is-answered header > strong { color: #062118; background: #45e69a; }

.admin-support-ticket dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.admin-support-ticket dl div { min-width: 0; padding: 10px; border-radius: 7px; background: rgba(255,255,255,.04); }
.admin-support-ticket dt { color: var(--muted); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.admin-support-ticket dd { overflow-wrap: anywhere; margin: 4px 0 0; font-size: .82rem; font-weight: 800; }

.admin-support-message,
.admin-support-reply { margin-top: 12px; padding: 14px; border-radius: 8px; }
.admin-support-message { border: 1px solid rgba(24,185,255,.24); background: rgba(24,185,255,.06); }
.admin-support-reply { border: 1px solid rgba(69,230,154,.28); background: rgba(69,230,154,.07); }
.admin-support-message p,
.admin-support-reply p { margin: 7px 0 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.admin-support-reply small { display: block; margin-top: 9px; color: #45e69a; font-weight: 800; }

.admin-support-ticket form { display: grid; gap: 10px; margin-top: 14px; }
.admin-support-ticket textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: var(--text); font: inherit; line-height: 1.5; resize: vertical; background: rgba(3,14,26,.66); }
.admin-support-ticket textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,185,255,.1); }
.admin-support-ticket form button { min-height: 44px; border: 0; border-radius: 8px; color: #fff; font-weight: 900; background: linear-gradient(135deg, #18b9ff, #087ccd); cursor: pointer; }

.admin-support-archive {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgba(69,230,154,.32);
  border-radius: 11px;
  background: rgba(7,23,39,.72);
  box-shadow: var(--shadow);
}

.admin-support-archive > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.admin-support-archive > summary::-webkit-details-marker { display: none; }
.admin-support-archive > summary span { display: flex; align-items: center; gap: 9px; }
.admin-support-archive > summary i { color: #45e69a; }
.admin-support-archive > summary > strong { min-width: 30px; padding: 5px 9px; border-radius: 999px; color: #062118; text-align: center; background: #45e69a; }
.admin-support-archive[open] > summary { border-bottom: 1px solid var(--line); }
.admin-support-archive-list { display: grid; gap: 12px; padding: 16px; }

.admin-support-archived-message {
  padding: 16px;
  border: 1px solid rgba(69,230,154,.22);
  border-left: 4px solid #45e69a;
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}

.admin-support-archived-message > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.admin-support-archived-message header span { color: var(--blue); font-size: .68rem; font-weight: 900; }
.admin-support-archived-message header h2 { margin: 4px 0 0; font-size: 1.05rem; }
.admin-support-archived-message header > strong { color: #45e69a; font-size: .72rem; white-space: nowrap; }
.admin-support-archive-meta { display: flex; gap: 10px; margin: 10px 0 0; color: var(--muted); font-size: .78rem; }
.admin-support-archive-meta span::before { content: '\2022'; margin-right: 10px; color: #45e69a; }

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
  }

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

  .admin-news-form {
    grid-template-columns: 1fr;
  }

  .admin-support-ticket dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-shell {
    width: min(100% - 20px, 1180px);
  }

  .admin-header {
    display: grid;
  }

  .admin-header div {
    text-align: left;
  }

  .admin-brand img {
    width: min(220px, 78vw);
  }

  .admin-login-card,
  .admin-content {
    padding: 18px;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-news-list article {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .admin-news-list img {
    width: 76px;
    height: 58px;
  }

  .admin-current-image {
    grid-template-columns: 1fr;
  }

  .admin-current-image img {
    width: 100%;
    height: 150px;
  }

  .admin-support-ticket > header,
  .admin-support-ticket dl {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-support-archived-message > header {
    display: grid;
  }

  .admin-support-archived-message header > strong {
    white-space: normal;
  }
}
