:root {
  --bg: #061013;
  --panel: #0d1a1e;
  --panel-2: #11242a;
  --line: rgba(143, 199, 190, 0.24);
  --text: #f5fbf9;
  --muted: #97aaa6;
  --primary: #28e0ba;
  --primary-2: #8df4dc;
  --accent: #ffcf5a;
  --danger: #ff6f7d;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(40, 224, 186, 0.16), transparent 32%),
    radial-gradient(circle at 82% 10%, rgba(255, 207, 90, 0.12), transparent 28%),
    linear-gradient(180deg, #061013 0%, #0a161a 48%, #071114 100%);
  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(143, 199, 190, 0.2);
  background: rgba(6, 16, 19, 0.82);
  backdrop-filter: blur(18px);
}

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

.brand {
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #061013;
  box-shadow: 0 0 28px rgba(40, 224, 186, 0.28);
}

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

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

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

.account .btn.small {
  flex: 0 1 auto;
}

.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: rgba(13, 26, 30, 0.82);
}

.coin-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--primary) 52%, #167f72);
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 16, 19, 0.96), rgba(6, 16, 19, 0.54) 52%, rgba(6, 16, 19, 0.9)),
    radial-gradient(circle at 70% 30%, rgba(40, 224, 186, 0.22), transparent 30%),
    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;
}

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

h3 {
  margin-bottom: 8px;
}

.hero-copy {
  max-width: 560px;
  color: #c7d7d3;
  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: #c7d7d3;
  background: rgba(13, 26, 30, 0.82);
  font-size: 13px;
}

.game-card,
.tier-card,
.package-card,
.custom-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 36, 42, 0.92), rgba(10, 24, 28, 0.94));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.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,
.packages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.mini-game {
  position: relative;
  min-height: 204px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 28, 32, 0.92);
  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;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.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: rgba(11, 28, 32, 0.86);
  cursor: pointer;
}

.currency-tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #061013;
  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;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}

.checkout-summary,
.checkout-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.checkout-summary {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
  color: var(--muted);
}

.summary-line strong {
  color: var(--text);
  text-align: right;
}

.checkout-form {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.payment-section {
  display: grid;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.card-preview {
  display: grid;
  gap: 34px;
  min-height: 172px;
  border: 1px solid rgba(232, 200, 122, 0.38);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(40, 224, 186, 0.24), rgba(255, 207, 90, 0.18)),
    #102329;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card-preview strong {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  color: #e8fff9;
  font-size: 22px;
  letter-spacing: 0;
}

.card-preview-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.payment-grid {
  grid-template-columns: 1.4fr 0.8fr 0.6fr;
}

.checkout-form label {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.checkout-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: #071216;
  color: var(--text);
  outline: none;
}

.checkout-form input:focus {
  border-color: var(--primary);
}

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

.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: #071216;
  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: #061013;
  box-shadow: 0 14px 30px rgba(40, 224, 186, 0.18);
}

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

.btn.secondary {
  border: 1px solid var(--line);
  background: rgba(17, 36, 42, 0.88);
  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: #193036;
  color: #627874;
}

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

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

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

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

.legal-email-link:hover {
  color: var(--primary-2);
}

.legal-email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 12px 20px;
  background: var(--primary);
  color: #061013;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(40, 224, 186, 0.18);
}

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

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

.dashboard-tabs {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 16px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(7, 18, 22, 0.86);
}

.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: #132a30;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 24, 28, 0.92);
}

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

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

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

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

.amount-positive {
  color: #58e6a7;
}

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

.contact-form {
  display: grid;
  gap: 20px;
  margin-top: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px 40px 40px;
  background: linear-gradient(180deg, rgba(17, 36, 42, 0.92), rgba(10, 24, 28, 0.94));
}

.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: 8px;
  padding: 13px 15px;
  background: #071216;
  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: 8px;
  background: var(--primary);
  color: #061013;
}

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

.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: rgba(4, 12, 14, 0.96);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(170px, 0.8fr) minmax(220px, 1fr);
  gap: clamp(24px, 4vw, 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: #b8cbc7;
  font-size: 18px;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--primary);
  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: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
  width: min(100%, 240px);
  max-width: 100%;
}

.payment-badges img {
  width: 72px;
  height: 48px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #183039, #0e2026);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.22);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.payment-badges img:hover {
  border-color: rgba(40, 224, 186, 0.72);
  background: linear-gradient(180deg, #1d3e45, #10282e);
  transform: translateY(-1px);
}

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

.footer-copy {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #7f9691;
  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(2, 10, 12, 0.78);
  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);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.game-modal {
  padding: clamp(8px, 2vw, 18px);
}

.game-panel {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(var(--app-vh, 1vh) * 100 - 24px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
}

.game-modal-head {
  min-width: 0;
  padding-right: 36px;
}

.game-modal-head h2 {
  overflow: hidden;
  margin-bottom: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(7, 18, 22, 0.86);
}

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

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

.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-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 18, 22, 0.92);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.game-close span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #061013;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.game-close:hover {
  border-color: var(--primary-2);
  background: #132a30;
  transform: translateY(-1px);
}

.game-close:hover span {
  background: var(--primary-2);
}

.game-frame {
  display: grid;
  width: 100%;
  height: min(680px, calc(var(--app-vh, 1vh) * 100 - 144px));
  min-height: 420px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 30%, rgba(40, 224, 186, 0.12), transparent 35%),
    #071216;
}

.game-frame iframe,
.game-frame canvas,
.game-frame object,
.game-frame embed {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.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: #102329;
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

@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);
  }

  #logoutBtn {
    max-width: 96px;
  }

  .nav {
    display: none;
  }

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

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

  .checkout-form {
    padding: 22px;
  }

  .card-preview {
    min-height: 150px;
  }

  .game-panel {
    width: min(760px, calc(100vw - 20px));
    max-height: calc(var(--app-vh, 1vh) * 100 - 16px);
    padding: 14px;
  }

  .game-frame {
    height: calc(var(--app-vh, 1vh) * 100 - 126px);
    min-height: 360px;
  }

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

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

  .footer-main {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 28px;
  }

  .payment-badges {
    grid-template-columns: repeat(auto-fit, minmax(64px, 72px));
    gap: 10px;
  }
}

@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;
  }

  #logoutBtn {
    max-width: 82px;
  }

  .payment-badges {
    grid-template-columns: repeat(3, 72px);
    gap: 10px;
  }

  .checkout-summary,
  .checkout-form {
    border-radius: 6px;
  }

  .card-preview {
    gap: 28px;
    min-height: 142px;
    padding: 18px;
  }

  .card-preview strong {
    font-size: 18px;
  }

  .game-modal {
    align-items: stretch;
    padding: 0;
  }

  .game-panel {
    width: 100vw;
    max-height: calc(var(--app-vh, 1vh) * 100);
    min-height: calc(var(--app-vh, 1vh) * 100);
    border-width: 0;
    border-radius: 0;
    padding: 12px;
  }

  .game-modal-head {
    padding-right: 50px;
  }

  .game-modal-head h2 {
    font-size: 20px;
  }

  .game-frame {
    height: calc(var(--app-vh, 1vh) * 100 - 92px);
    min-height: 0;
    border-radius: 6px;
  }

  .game-close {
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
  }

  .game-close span {
    width: 30px;
    height: 30px;
    font-size: 21px;
  }

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

  h1 {
    font-size: 40px;
  }
}
