:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5fafb;
  --line: #d9e4e8;
  --text: #17232d;
  --muted: #667783;
  --primary: #0f8f8c;
  --primary-2: #175f8a;
  --accent: #f16f54;
  --danger: #c24152;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(23, 35, 45, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand,
.nav,
.account,
.balance {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #ffffff;
}

.nav {
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.nav a.active,
.nav a:hover {
  color: var(--primary);
}

.account {
  gap: 12px;
  min-width: 0;
}

.balance {
  gap: 8px;
  min-width: 92px;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--primary-2);
  background: #eef9f8;
}

.coin-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #d8fffb, var(--primary) 55%, #0b5c63);
}

.hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(236, 250, 249, 0.78) 45%, rgba(255, 255, 255, 0.72)),
    url("https://solsticewebgame.com/images/hero-banner.jpg") center/cover;
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 90px;
}

.kicker,
.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-title-image {
  display: block;
  width: min(680px, 100%);
  aspect-ratio: 16 / 7;
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 18px 48px rgba(23, 35, 45, 0.12);
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 8px;
}

.hero-copy {
  max-width: 560px;
  color: #4f606b;
  font-size: 18px;
  line-height: 1.6;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view.section {
  min-height: calc(100vh - 238px);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 13px;
}

.game-card,
.tier-card,
.package-card,
.custom-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.game-card {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 16px;
}

.game-card img {
  width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.muted {
  color: var(--muted);
}

.tiers {
  display: grid;
  gap: 26px;
}

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

.tier-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.packages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mini-game {
  position: relative;
  min-height: 166px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
}

.mini-game img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.mini-game:hover img {
  transform: scale(1.04);
}

.mini-game footer {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.mini-game strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
}

.lock-tag,
.open-tag {
  color: var(--primary-2);
  font-size: 12px;
  white-space: nowrap;
}

.currency-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.currency-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--muted);
  background: var(--panel);
  cursor: pointer;
}

.currency-tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.package-card {
  padding: 18px;
}

.package-card .price {
  font-size: 24px;
  font-weight: 800;
}

.package-card .coins {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  font-size: 20px;
  color: var(--primary-2);
  font-weight: 800;
}

.custom-card {
  display: grid;
  grid-template-columns: 1fr 220px 1fr 160px;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 20px;
}

.amount-field {
  position: relative;
}

.amount-field span {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.amount-field input,
.modal label input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.amount-field input {
  padding-left: 34px;
}

.amount-field input:focus,
.modal label input:focus {
  border-color: var(--primary);
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--primary-2);
}

.btn.secondary {
  border: 1px solid var(--line);
  background: #f4f8fa;
  color: var(--text);
}

.btn.small {
  max-width: 220px;
  overflow: hidden;
  padding: 9px 15px;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn.wide {
  width: 100%;
}

.btn:disabled {
  cursor: not-allowed;
  background: #e5ecef;
  color: #8a9aa4;
}

.legal {
  border-top: 1px solid var(--line);
}

.legal-body {
  max-width: 820px;
  color: #4f606b;
  line-height: 1.8;
}

.legal-body h3 {
  margin: 28px 0 10px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.35;
}

.legal-body h3:first-child {
  margin-top: 0;
}

.legal-body p {
  margin-bottom: 16px;
}

.dashboard {
  min-height: calc(100vh - 238px);
}

.dashboard-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 16px;
  padding: 5px;
  border-radius: 8px;
  background: #edf5f7;
}

.dashboard-tabs button {
  border: 0;
  border-radius: 6px;
  padding: 10px 16px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.dashboard-tabs button.active {
  color: var(--primary-2);
  background: #ffffff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: #4f606b;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--text);
  background: #f2f7f8;
  font-weight: 800;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.amount-positive {
  color: #16835f;
}

.amount-negative {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 34px 40px 40px;
  background: #f7fbfc;
}

.contact-form h3 {
  margin-bottom: 4px;
  font-size: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form label {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 15px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.contact-form textarea {
  min-height: 172px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.send-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 0;
  background: var(--primary-2);
  color: #fff;
}

.send-btn:hover {
  background: var(--primary);
}

.send-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  transform: rotate(-35deg);
}

.footer {
  display: grid;
  gap: 28px;
  padding: 34px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #f3f8fa;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(190px, 0.75fr) minmax(300px, 1.1fr);
  gap: 52px;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.footer h3 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 20px;
}

.footer p {
  margin-bottom: 12px;
  color: #5c6d78;
  font-size: 18px;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--primary-2);
  font-size: 18px;
}

.mail-icon {
  display: inline-grid;
  width: 18px;
  height: 14px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  color: transparent;
}

.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: fit-content;
  max-width: 460px;
  background: transparent;
  border: 0;
  padding: 0;
}

.payment-badges img {
  width: 86px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(23, 35, 45, 0.08);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
}

.legal-index {
  color: var(--primary);
  font-weight: 800;
}

.footer-copy {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid rgba(23, 35, 45, 0.1);
  color: #6e7d87;
  text-align: center;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 32, 42, 0.48);
  color: var(--text);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: #edf5f7;
}

.tab {
  border: 0;
  border-radius: 6px;
  padding: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.tab.active {
  color: var(--primary-2);
  background: #ffffff;
}

.modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.checkline {
  grid-template-columns: auto 1fr;
  align-items: center;
  text-transform: none;
  font-weight: 500;
}

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

.icon-btn {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.game-frame {
  display: grid;
  width: min(960px, calc(100vw - 80px));
  height: min(640px, calc(100vh - 190px));
  min-height: 360px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  color: var(--muted);
  background: #f7fbfc;
}

.game-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #02030a;
}

#gameModal .modal-panel {
  width: auto;
  max-width: calc(100vw - 32px);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 18px 40px rgba(23, 35, 45, 0.18);
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand [data-site="brandName"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account {
    flex: 1;
    justify-content: flex-end;
  }

  .balance {
    min-width: 74px;
    padding: 8px 10px;
  }

  .btn.small {
    max-width: min(190px, 44vw);
  }

  .nav {
    display: none;
  }

  .game-card,
  .custom-card,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .game-card img {
    width: 100%;
  }

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

  .section-head,
  .footer-main {
    align-items: flex-start;
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
  }

  .brand [data-site="brandName"] {
    max-width: 72px;
  }

  .balance {
    min-width: 64px;
    font-size: 13px;
  }

  .btn.small {
    max-width: 112px;
    padding: 8px 10px;
  }

  .packages {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .game-frame {
    width: calc(100vw - 48px);
    height: min(560px, calc(100vh - 170px));
    min-height: 320px;
  }
}
