:root {
  color-scheme: dark;
  --ink: #020713;
  --night: #061126;
  --panel: rgba(5, 16, 42, 0.88);
  --panel-solid: #081733;
  --line: rgba(244, 198, 77, 0.42);
  --blue-line: rgba(94, 153, 230, 0.34);
  --text: #edf5ff;
  --muted: rgba(195, 214, 242, 0.78);
  --gold: #f4c64d;
  --gold-deep: #b87408;
  --cyan: #3ac3f2;
  --green: #4ce18a;
  --red: #ff5f7d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(2, 7, 19, 0.42), rgba(2, 7, 19, 0.96) 82%),
    url("assets/bg_ft.png") center top / cover fixed,
    var(--ink);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(2, 7, 19, 0.88), rgba(2, 7, 19, 0.38) 45%, rgba(2, 7, 19, 0.9));
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr minmax(230px, auto);
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px 34px;
  border-bottom: 1px solid rgba(244, 198, 77, 0.16);
  background:
    linear-gradient(90deg, rgba(2, 7, 19, 0.96), rgba(3, 13, 32, 0.88), rgba(2, 7, 19, 0.96));
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 198, 77, 0.46), rgba(75, 161, 255, 0.34), transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 950;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(244, 198, 77, 0.22));
}

.site-nav {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  justify-self: center;
  border: 1px solid rgba(94, 153, 230, 0.24);
  border-radius: 12px;
  padding: 5px;
  background:
    linear-gradient(180deg, rgba(9, 26, 64, 0.58), rgba(2, 10, 31, 0.72));
  box-shadow: inset 0 0 0 1px rgba(244, 198, 77, 0.06), 0 12px 34px rgba(0, 0, 0, 0.22);
}

.site-nav a,
.ghost-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 750;
  letter-spacing: 0;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--text);
  border-color: rgba(94, 153, 230, 0.62);
  background:
    linear-gradient(180deg, rgba(36, 72, 138, 0.82), rgba(13, 39, 91, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(61, 124, 218, 0.22);
}

.site-nav a.active {
  color: #ffffff;
  border-color: rgba(244, 198, 77, 0.42);
}

.ghost-button:hover {
  color: var(--text);
  border-color: var(--blue-line);
  background: rgba(61, 124, 218, 0.16);
}

.ghost-button.danger:hover {
  border-color: rgba(255, 95, 125, 0.42);
  background: rgba(255, 95, 125, 0.14);
}

.account-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-height: 50px;
  border: 1px solid rgba(94, 153, 230, 0.22);
  border-radius: 14px;
  padding: 6px 8px 6px 7px;
  background:
    linear-gradient(180deg, rgba(9, 26, 64, 0.56), rgba(2, 10, 31, 0.7));
  box-shadow: inset 0 0 0 1px rgba(244, 198, 77, 0.05);
}

.account-copy-mini {
  display: grid;
  gap: 1px;
  min-width: 82px;
}

.account-copy-mini small {
  color: rgba(244, 198, 77, 0.86);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-copy-mini strong {
  max-width: 140px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-medallion {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(246, 214, 120, 0.7);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.95), transparent 18%),
    linear-gradient(135deg, #ffe487 0%, #f0b72d 45%, #2466c9 100%);
  box-shadow: 0 0 22px rgba(244, 198, 77, 0.22), inset 0 0 0 2px rgba(2, 7, 19, 0.28);
}

.user-medallion::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(2, 7, 19, 0.24);
  border-radius: inherit;
}

.user-medallion svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #061126;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  z-index: 1;
}

.ghost-button {
  min-width: 68px;
}

.ghost-button:not(.danger) {
  color: #241300;
  border-color: rgba(246, 214, 120, 0.7);
  background: linear-gradient(180deg, #ffe487 0%, #f0b72d 100%);
  font-weight: 950;
}

.ghost-button:not(.danger):hover {
  color: #241300;
  border-color: rgba(255, 231, 147, 0.9);
  background: linear-gradient(180deg, #fff0a8 0%, #f5c647 100%);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 38px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.section {
  scroll-margin-top: 86px;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 118px 7vw 72px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 7, 19, 0.92), rgba(2, 7, 19, 0.46) 58%, rgba(2, 7, 19, 0.8)),
    linear-gradient(180deg, rgba(2, 7, 19, 0.08), rgba(2, 7, 19, 0.98)),
    url("assets/background.png") center / cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-character {
  position: absolute;
  top: 86px;
  right: 5vw;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(48vw, 760px);
  pointer-events: none;
}

.hero-character::before {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 9%;
  width: 62%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 151, 255, 0.2), transparent 68%);
  filter: blur(18px);
}

.hero-character img {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: calc(100vh - 98px);
  object-fit: contain;
  object-position: bottom center;
  filter:
    drop-shadow(0 30px 52px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 28px rgba(50, 142, 255, 0.18));
  transform: translateX(2vw);
}

.hero-logo {
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 22px rgba(244, 198, 77, 0.24));
}

.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.hero h1 {
  margin-bottom: 16px;
  font-size: clamp(52px, 8vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.86);
}

.hero p {
  max-width: 620px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 22px;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.primary-button {
  color: #241300;
  background: linear-gradient(180deg, #ffe487 0%, #f0b72d 52%, var(--gold-deep) 100%);
  border-color: rgba(246, 214, 120, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 12px 28px rgba(216, 144, 16, 0.28);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 8px), 0 8px);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  color: var(--text);
  background: rgba(4, 14, 42, 0.72);
  border-color: var(--blue-line);
}

.secondary-button:hover {
  border-color: var(--line);
  background: rgba(13, 39, 91, 0.74);
}

.secondary-button.small {
  min-height: 40px;
  padding: 0 16px;
}

.wide {
  width: 100%;
}

.hero-status {
  position: absolute;
  right: 7vw;
  bottom: 74px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 270px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(5, 16, 42, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.hero-status strong,
.hero-status small {
  display: block;
}

.hero-status small {
  margin-top: 3px;
  color: var(--muted);
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(76, 225, 138, 0.14), 0 0 20px rgba(76, 225, 138, 0.56);
}

.website-section {
  padding: 86px 7vw;
  background:
    linear-gradient(180deg, rgba(2, 7, 19, 0.76), rgba(2, 7, 19, 0.92)),
    var(--ink);
}

.website-section:nth-of-type(odd) {
  background:
    linear-gradient(180deg, rgba(4, 14, 42, 0.64), rgba(2, 7, 19, 0.9)),
    url("assets/bg_ft.png") center / cover fixed;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  max-width: 680px;
}

.section-heading h2 {
  margin: 8px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.section-heading p,
.play-copy p,
.support-panel p,
.download-card p,
.info-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 20px;
  align-items: stretch;
}

.play-panel,
.support-panel,
.account-callout,
.account-card,
.download-card,
.info-grid article,
.game-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(9, 26, 64, 0.88), rgba(3, 11, 32, 0.93)), var(--panel);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(114, 174, 255, 0.12);
}

.play-panel {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 22px;
  align-items: center;
  padding: 22px;
}

.play-art {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: rgba(2, 10, 31, 0.62);
}

.play-art img {
  width: 138px;
  height: 138px;
  object-fit: contain;
}

.play-copy h3 {
  margin: 6px 0 8px;
  font-size: 34px;
}

.server-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.server-stats div {
  min-height: 62px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(2, 10, 31, 0.54);
}

.server-stats span {
  display: block;
  color: rgba(174, 195, 230, 0.74);
  font-size: 12px;
  font-weight: 900;
}

.server-stats strong {
  display: block;
  margin-top: 4px;
}

.support-panel {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.support-panel img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--blue-line);
}

.support-panel div {
  padding: 20px;
}

.support-panel h3,
.download-card h3,
.info-grid h3 {
  margin: 6px 0 8px;
}

.browser-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid rgba(244, 198, 77, 0.46);
  border-radius: 8px;
  padding: 15px 18px;
  background: rgba(42, 31, 9, 0.64);
}

.browser-warning span {
  color: var(--muted);
}

.game-shell {
  margin-top: 20px;
}

.game-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 12px;
}

.game-toolbar h3 {
  margin-bottom: 0;
}

.game-frame {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.game-launch-status {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 680px;
  margin-top: 18px;
  border: 1px solid rgba(76, 225, 138, 0.42);
  border-radius: 8px;
  padding: 16px;
  background: rgba(11, 54, 34, 0.48);
}

.game-launch-status strong,
.game-launch-status p {
  display: block;
  margin: 0;
}

.game-launch-status p {
  margin-top: 4px;
  color: var(--muted);
}

#conta {
  background:
    linear-gradient(90deg, rgba(2, 7, 19, 0.94), rgba(4, 14, 42, 0.78) 56%, rgba(2, 7, 19, 0.94)),
    url("assets/background.png") center / cover fixed;
}

.account-callout {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(280px, 420px);
  gap: 26px;
  align-items: center;
  max-width: 1040px;
  padding: 30px;
}

.account-copy h3 {
  max-width: 660px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
}

.account-copy p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.6;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.account-benefits {
  display: grid;
  gap: 12px;
}

.account-benefits div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 10, 31, 0.58);
}

.account-benefits strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #241300;
  background: linear-gradient(180deg, #ffe487, #f0b72d);
  font-weight: 950;
}

.account-benefits span {
  color: #dce8ff;
  line-height: 1.45;
}

#cristais {
  background:
    linear-gradient(180deg, rgba(2, 7, 19, 0.84), rgba(2, 7, 19, 0.94)),
    url("assets/bg_ft.png") center / cover fixed;
}

.crystal-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1040px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 103, 202, 0.5);
  border-radius: 8px;
  padding: 20px 24px;
  background:
    linear-gradient(135deg, rgba(54, 15, 64, 0.78), rgba(5, 16, 42, 0.92)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 170, 226, 0.12);
}

.crystal-balance-card span {
  display: block;
  color: var(--muted);
  font-weight: 850;
}

.crystal-balance-card strong {
  display: block;
  margin-top: 4px;
  font-size: 34px;
}

.pink-diamond {
  width: 42px;
  height: 42px;
  transform: rotate(45deg);
  border: 1px solid rgba(255, 220, 245, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 32%),
    linear-gradient(135deg, #ff7bd5 0%, #ff2fae 54%, #8e2fff 100%);
  box-shadow: 0 0 24px rgba(255, 72, 190, 0.5);
}

.crystal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  max-width: 1040px;
}

.crystal-package {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(9, 26, 64, 0.9), rgba(3, 11, 32, 0.95)),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(114, 174, 255, 0.12);
}

.crystal-package.featured {
  border-color: rgba(255, 103, 202, 0.7);
}

.package-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 7px 10px;
  color: #241300;
  background: linear-gradient(180deg, #ffe487, #f0b72d);
  font-size: 11px;
  font-weight: 950;
}

.package-title {
  min-height: 20px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.package-amount {
  margin-top: 10px;
  color: #ffd7f2;
  font-size: 44px;
  font-weight: 950;
  line-height: 1;
}

.package-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.package-label .pink-diamond {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.package-bonus {
  color: #ff9fe0;
  font-weight: 850;
}

.package-price {
  margin-top: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
}

.cash-shop-empty {
  grid-column: 1 / -1;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: rgba(2, 10, 31, 0.62);
}

.crystal-transfer-panel {
  margin-bottom: 20px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(8, 24, 58, 0.76), rgba(2, 10, 31, 0.88)),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(114, 174, 255, 0.1);
}

.crystal-transfer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.crystal-transfer-head h3 {
  margin: 5px 0 0;
  font-size: 24px;
}

.character-offline-warning {
  margin-bottom: 14px;
  border: 1px solid rgba(244, 198, 77, 0.38);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(42, 31, 9, 0.42);
}

.character-offline-warning strong {
  color: var(--gold);
}

.web-characters-list {
  display: grid;
  gap: 10px;
}

.web-character-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) repeat(3, minmax(92px, auto)) minmax(220px, 0.9fr);
  gap: 12px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(2, 10, 31, 0.62);
}

.web-character-card.skeleton {
  min-height: 82px;
}

.web-character-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.web-character-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.web-character-crystals strong {
  color: #ff9fe0;
}

.web-character-transfer {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) auto;
  gap: 8px;
}

.web-character-transfer input {
  min-height: 40px;
}

.web-character-transfer .primary-button {
  min-height: 40px;
  padding: 0 14px;
}

.skeleton {
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 1.2s linear infinite;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 520px);
  gap: 20px;
  align-items: start;
}

.account-card {
  padding: 26px;
}

.account-card h3 {
  margin-bottom: 18px;
  font-size: 28px;
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 8px;
  color: #dce8ff;
  font-size: 14px;
  font-weight: 850;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 10, 31, 0.74);
  outline: none;
}

input:focus {
  border-color: rgba(244, 198, 77, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 198, 77, 0.1);
}

input::placeholder {
  color: rgba(174, 195, 230, 0.48);
}

.download-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
}

.download-card {
  padding: 22px;
}

.main-download {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: center;
}

.main-download img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.main-download .primary-button {
  margin-top: 10px;
}

.download-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 214, 120, 0.8);
  border-radius: 8px;
  color: #241300;
  background: linear-gradient(180deg, #ffe487, #f0b72d);
  font-weight: 950;
}

.browser-downloads {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 20px;
  align-items: center;
  border-color: rgba(114, 174, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(9, 26, 64, 0.9), rgba(2, 10, 31, 0.94)),
    var(--panel);
}

.browser-downloads h3 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.browser-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.browser-link {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(2, 10, 31, 0.64);
}

.browser-link:hover {
  border-color: rgba(244, 198, 77, 0.62);
  background: rgba(13, 39, 91, 0.74);
}

.browser-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(246, 214, 120, 0.72);
  border-radius: 50%;
  color: #241300;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.82), transparent 18%),
    linear-gradient(135deg, #ffe487 0%, #f0b72d 46%, #2466c9 100%);
  font-weight: 950;
}

.browser-link strong,
.browser-link small {
  display: block;
}

.browser-link small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.info-grid article {
  padding: 24px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 86px;
  border-top: 1px solid rgba(244, 198, 77, 0.16);
  color: var(--muted);
  background: rgba(2, 7, 19, 0.96);
}

.site-footer img {
  width: 34px;
  height: 34px;
}

.site-footer span {
  color: var(--text);
  font-weight: 950;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 19, 0.72);
  backdrop-filter: blur(10px);
}

.auth-dialog {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(9, 26, 64, 0.96), rgba(3, 11, 32, 0.98)),
    var(--panel-solid);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(114, 174, 255, 0.13);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(2, 10, 31, 0.62);
  cursor: pointer;
}

.auth-close:hover {
  color: var(--text);
  border-color: rgba(255, 95, 125, 0.5);
  background: rgba(255, 95, 125, 0.14);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 36px;
}

.auth-brand img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(244, 198, 77, 0.22));
}

.auth-brand h2 {
  margin: 5px 0 0;
  font-size: 28px;
  line-height: 1.05;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 6px;
  background: rgba(2, 10, 31, 0.62);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #241300;
  background: linear-gradient(180deg, #ffe487, #f0b72d);
}

.auth-panel {
  display: grid;
}

.crystal-modal {
  z-index: 66;
}

.confirm-modal {
  z-index: 95;
}

.confirm-dialog {
  width: min(440px, 100%);
}

.crystal-dialog {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 58px);
  padding: 28px;
}

.crystal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-right: 42px;
  margin-bottom: 20px;
}

.crystal-modal-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.crystal-modal-head p {
  margin: 0;
  color: var(--muted);
}

.crystal-dialog .crystal-balance-card,
.crystal-dialog .crystal-grid {
  max-width: none;
}

.confirm-message {
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.toast {
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(5, 16, 42, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.toast.success {
  border-color: rgba(76, 225, 138, 0.54);
}

.toast.error {
  border-color: rgba(255, 95, 125, 0.58);
}

.toast.warning {
  border-color: rgba(244, 198, 77, 0.58);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(2, 7, 19, 0.72);
  backdrop-filter: blur(8px);
}

.loader-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--panel-solid);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(114, 174, 255, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

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

  .menu-toggle {
    display: inline-block;
  }

  .site-nav {
    position: absolute;
    top: 76px;
    left: 14px;
    right: 14px;
    display: none;
    grid-template-columns: 1fr;
    border: 1px solid var(--blue-line);
    border-radius: 8px;
    padding: 10px;
    background: rgba(2, 7, 19, 0.96);
    width: auto;
  }

  .site-nav.open {
    display: grid;
  }

  .account-mini {
    justify-self: end;
  }

  .hero-character {
    right: -12vw;
    width: 62vw;
    opacity: 0.42;
  }

  .hero-character img {
    transform: translateX(0);
  }

  .play-layout,
  .account-grid,
  .account-callout {
    grid-template-columns: 1fr;
  }

  .play-panel {
    grid-template-columns: 150px 1fr;
  }

  .play-panel .primary-button {
    grid-column: 1 / -1;
  }

  .info-grid,
  .download-layout,
  .crystal-grid {
    grid-template-columns: 1fr;
  }

  .browser-downloads,
  .browser-link-grid {
    grid-template-columns: 1fr;
  }

  .web-character-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .web-character-transfer {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 10px;
    padding: 9px 12px;
  }

  .brand span {
    display: none;
  }

  .account-copy-mini {
    display: none;
  }

  .account-mini {
    min-height: 44px;
    gap: 6px;
    padding: 5px;
  }

  .user-medallion {
    width: 34px;
    height: 34px;
  }

  .user-medallion svg {
    width: 19px;
    height: 19px;
  }

  .ghost-button {
    min-width: 58px;
    min-height: 34px;
    padding: 7px 10px;
  }

  .hero {
    padding: 104px 20px 54px;
  }

  .hero-character {
    display: none;
  }

  .hero-logo {
    width: 116px;
    height: 116px;
  }

  .hero h1 {
    font-size: 50px;
  }

  .hero-status {
    position: static;
    width: 100%;
    margin-top: 34px;
  }

  .website-section {
    padding: 66px 20px;
  }

  .hero-actions,
  .account-actions,
  .browser-warning,
  .game-toolbar,
  .crystal-transfer-head {
    display: grid;
  }

  .web-character-card {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .play-panel {
    grid-template-columns: 1fr;
  }

  .server-stats {
    grid-template-columns: 1fr;
  }

  .main-download {
    grid-template-columns: 1fr;
  }
}
