﻿:root {
  color-scheme: dark;
  --bg: #06070b;
  --panel: rgba(12, 10, 15, .72);
  --panel-strong: rgba(8, 8, 12, .86);
  --gold: #f6cd5f;
  --gold-dark: #80601d;
  --red: #8b1a2a;
  --violet: #8f55ff;
  --text: #f4ede0;
  --dim: #c4a882;
  --muted: #aeb8c5;
  --line: rgba(246, 205, 95, .28);
  --shadow: 0 24px 70px rgba(0, 0, 0, .62);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  /* Replace this file with a custom wide castle render when needed. */
  background:
    linear-gradient(90deg, rgba(5, 7, 14, .82), rgba(5, 7, 14, .38) 45%, rgba(5, 7, 14, .76)),
    linear-gradient(180deg, rgba(5, 7, 14, .18), rgba(5, 7, 14, .74) 46%, rgba(5, 7, 14, .9)),
    url("./assets/castle-bg.jpg") center top / cover fixed no-repeat,
    radial-gradient(circle at 72% 18%, rgba(74, 96, 148, .34), transparent 28rem),
    #06070b;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    radial-gradient(circle at 69% 21%, rgba(246, 205, 95, .28), transparent 14rem),
    radial-gradient(circle at 78% 24%, rgba(143, 85, 255, .2), transparent 22rem),
    radial-gradient(circle at 21% 78%, rgba(220, 84, 38, .16), transparent 18rem),
    linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .18) 50%, rgba(0, 0, 0, .35));
  mix-blend-mode: screen;
  opacity: .72;
}

body::after {
  z-index: 1;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 216, 128, .55) 0 1px, transparent 2px),
    radial-gradient(circle at 24% 72%, rgba(255, 122, 45, .5) 0 1px, transparent 2px),
    radial-gradient(circle at 49% 36%, rgba(246, 205, 95, .42) 0 1px, transparent 2px),
    radial-gradient(circle at 79% 62%, rgba(255, 139, 58, .48) 0 1px, transparent 2px),
    radial-gradient(circle at 93% 30%, rgba(246, 205, 95, .36) 0 1px, transparent 2px);
  background-size: 260px 260px, 310px 310px, 360px 360px, 430px 430px, 500px 500px;
  opacity: .42;
  animation: none;
}

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

section {
  scroll-margin-top: 92px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.castle-page {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  overflow: hidden;
}

.castle-page::before,
.castle-page::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
}

.castle-page::before {
  background:
    linear-gradient(115deg, transparent 0 20%, rgba(145, 164, 189, .12) 36%, transparent 57%),
    linear-gradient(78deg, transparent 10%, rgba(195, 210, 225, .1) 50%, transparent 86%),
    radial-gradient(ellipse at 50% 82%, rgba(190, 205, 220, .16), transparent 45%);
  filter: blur(18px);
  opacity: .55;
  transform: translate3d(0, 0, 0);
  animation: none;
}

.castle-page::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 14, .5), transparent 20%, transparent 68%, rgba(3, 3, 6, .72)),
    radial-gradient(ellipse at 50% 7%, rgba(7, 8, 14, .48), transparent 28%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, .58), transparent 35%);
}

.castle-page > * {
  position: relative;
  z-index: 1;
}

.top-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 74px;
  padding: 0 clamp(16px, 4vw, 62px);
  border-bottom: 1px solid rgba(246, 205, 95, .28);
  background:
    linear-gradient(90deg, rgba(6, 7, 12, .9), rgba(12, 9, 13, .76), rgba(6, 7, 12, .9));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .34);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 900;
  text-shadow: 0 0 24px rgba(139, 26, 42, .82);
}

.brand small {
  color: #c0392b;
  font-size: .45em;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 42px);
  color: var(--dim);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-nav a:hover {
  color: var(--gold);
}

.top-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switcher {
  position: relative;
  z-index: 24;
}

.language-toggle,
.top-cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(246, 205, 95, .45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(76, 42, 14, .92), rgba(21, 12, 9, .92));
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 16px rgba(246, 205, 95, .08);
  cursor: pointer;
  white-space: nowrap;
}

.top-cta {
  padding: 0 16px;
}

.language-toggle {
  min-width: 86px;
  padding: 0 12px;
  text-transform: uppercase;
}

.language-toggle b {
  font-size: 12px;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(230px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(246, 205, 95, .42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(143, 85, 255, .14), transparent 9rem),
    linear-gradient(180deg, rgba(14, 12, 18, .98), rgba(5, 6, 10, .96));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .64),
    0 0 28px rgba(246, 205, 95, .08),
    inset 0 0 24px rgba(246, 205, 95, .04);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.language-switcher.open .language-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.language-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 10px;
  height: 10px;
  border-left: 1px solid rgba(246, 205, 95, .42);
  border-top: 1px solid rgba(246, 205, 95, .42);
  background: rgba(14, 12, 18, .98);
  transform: rotate(45deg);
}

.language-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #e8d6ad;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.language-menu button::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.language-menu button:hover,
.language-menu button.active {
  background:
    linear-gradient(90deg, rgba(246, 205, 95, .17), rgba(143, 85, 255, .08));
  color: var(--gold);
  box-shadow: inset 0 0 18px rgba(246, 205, 95, .05);
}

.language-menu button.active::after {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(246, 205, 95, .75);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 510px);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: 106px clamp(18px, 5vw, 82px) 42px;
}

.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg {
  z-index: -2;
  background:
    radial-gradient(circle at 73% 26%, rgba(255, 223, 154, .22), transparent 14rem),
    radial-gradient(circle at 84% 66%, rgba(143, 85, 255, .18), transparent 18rem),
    linear-gradient(90deg, rgba(5, 7, 14, .58), rgba(5, 7, 14, .12) 50%, rgba(5, 7, 14, .56)),
    url("./assets/castle-bg.jpg") center top / cover;
  filter: brightness(1.08) saturate(1.18) contrast(1.08);
  transform: scale(1.015);
  animation: none;
}

.hero-shade {
  z-index: -1;
  background:
    radial-gradient(circle at 72% 36%, rgba(246, 205, 95, .24), transparent 17rem),
    radial-gradient(circle at 86% 70%, rgba(143, 85, 255, .17), transparent 18rem),
    linear-gradient(180deg, rgba(5, 7, 14, .08), transparent 54%, rgba(5, 7, 14, .62) 84%, rgba(5, 7, 14, .8));
}

.hero-content,
.castle-hud,
.info-section::before,
.format-section::before,
.feature-grid article,
.notify-section,
.community-panel,
.prereg-section,
.device-copy,
.desktop-shot,
.phone-shot {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 228, 164, .055), transparent 38%),
    radial-gradient(circle at 100% 0, rgba(143, 85, 255, .1), transparent 14rem),
    linear-gradient(180deg, rgba(13, 12, 18, .76), rgba(6, 7, 11, .84));
  box-shadow:
    var(--shadow),
    0 0 34px rgba(143, 85, 255, .11),
    inset 0 0 28px rgba(246, 205, 95, .045);
  backdrop-filter: blur(5px);
}

.hero-content {
  max-width: 780px;
  padding: clamp(18px, 3vw, 30px);
  border-radius: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(246, 205, 95, .22), 0 0 34px rgba(139, 26, 42, .52);
}

h1 {
  max-width: 860px;
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: .92;
}

h2 {
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1;
}

h3 {
  font-size: 20px;
}

.lead {
  max-width: 680px;
  margin: 26px 0 0;
  color: #ead8ae;
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.7;
}

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

.btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(246, 205, 95, .5);
  border-radius: 10px;
  padding: 0 22px;
  color: #fff4c9;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .13);
  transition: transform .18s ease, filter .18s ease;
}

.btn:hover,
.castle-preview button:hover,
.top-cta:hover,
.language-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-gold {
  background: linear-gradient(180deg, #d6ae32, #72500d);
  color: #211307;
}

.btn-dark {
  background: linear-gradient(180deg, rgba(31, 20, 30, .94), rgba(8, 8, 12, .94));
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.status-row span,
.level,
.resource-bar span,
.hud-nav button,
.beta-flow article,
.notify-form input,
.toast {
  border: 1px solid rgba(246, 205, 95, .24);
  background: rgba(3, 4, 8, .46);
  box-shadow: inset 0 0 18px rgba(246, 205, 95, .035);
}

.status-row span {
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffe9b0;
  font-size: 13px;
  font-weight: 800;
}

.beta-meter {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(246, 205, 95, .28);
  border-radius: 14px;
  background: rgba(3, 4, 8, .46);
  box-shadow: inset 0 0 24px rgba(246, 205, 95, .06);
}

.beta-meter strong,
.beta-meter b {
  color: var(--gold);
}

.beta-meter span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.beta-meter i {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.beta-meter i span {
  display: block;
  width: 72%;
  height: 100%;
  margin: 0;
  background: linear-gradient(90deg, #8b1a2a, #f6cd5f);
  box-shadow: 0 0 18px rgba(246, 205, 95, .42);
}

.castle-hud {
  border-radius: 18px;
  overflow: hidden;
  transform: translateZ(0);
  animation: panelIn .7s ease both;
}

.hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid rgba(196, 120, 60, .22);
  background: rgba(0, 0, 0, .2);
}

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

.lord img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid rgba(246, 205, 95, .72);
}

.lord small {
  display: block;
  color: var(--dim);
}

.lord strong,
.level {
  color: var(--gold);
  font-weight: 900;
}

.level {
  padding: 7px 10px;
  border-radius: 10px;
}

.resource-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.resource-bar span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 10px;
  color: #ffe9b0;
  font-size: 13px;
  font-weight: 900;
}

.resource-bar img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.castle-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.castle-preview button {
  min-height: 138px;
  display: grid;
  align-content: end;
  gap: 8px;
  border: 1px solid rgba(246, 205, 95, .28);
  border-radius: 12px;
  padding: 12px;
  background: #08090c;
  color: var(--gold);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.castle-preview button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0, 0, 0, .72));
}

.castle-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .78;
  transition: transform .24s ease, opacity .24s ease;
}

.castle-preview button:hover img {
  opacity: .92;
  transform: scale(1.05);
}

.castle-preview span {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .82);
}

.squad-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 14px 16px;
}

.squad-row img {
  width: 30%;
  height: 132px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid rgba(246, 205, 95, .36);
  border-radius: 14px 14px 6px 6px;
  background: #09090b;
}

.hud-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 0 14px 14px;
}

.hud-nav button {
  min-height: 42px;
  border-radius: 10px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.hud-nav button:first-child {
  color: var(--gold);
  background: rgba(246, 205, 95, .11);
}

.info-section,
.format-section,
.notify-section,
.prereg-section,
.community-panel,
.site-footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 42px);
}

.info-section,
.format-section {
  position: relative;
}

.info-section::before,
.format-section::before {
  content: "";
  position: absolute;
  inset: 18px clamp(8px, 2vw, 22px);
  z-index: -1;
  border-radius: 22px;
}

.section-head {
  max-width: 760px;
  margin-bottom: 24px;
}

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

.feature-grid article {
  padding: 24px;
  border-radius: 16px;
}

.feature-grid span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-weight: 900;
}

.feature-grid p,
.format-section p,
.notify-section p,
.notify-form small {
  color: #e0d0ad;
  line-height: 1.65;
}

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

.beta-flow article {
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
}

.beta-flow b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #c9a227, #7a5a10);
  color: #211307;
}

.beta-flow span {
  color: #e7d3aa;
  font-weight: 800;
}

.format-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(340px, 1.15fr);
  gap: 18px;
  align-items: center;
}

.device-copy {
  padding: 28px;
  border-radius: 16px;
}

.device-frame {
  position: relative;
  min-height: 500px;
}

.desktop-shot,
.phone-shot {
  position: absolute;
  overflow: hidden;
}

.desktop-shot {
  inset: 32px 78px 64px 0;
  border-radius: 16px;
}

.phone-shot {
  right: 0;
  bottom: 0;
  width: min(36%, 220px);
  height: 360px;
  border-radius: 24px;
}

.desktop-shot img,
.phone-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notify-section {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 26px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 18px;
}

.prereg-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(360px, 1.18fr);
  gap: 24px;
  align-items: center;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 18px;
  overflow: hidden;
}

.prereg-section .eyebrow {
  margin-bottom: 14px;
  color: #d9bd83;
  font-size: 13px;
  letter-spacing: .12em;
}

.prereg-section h2 {
  max-width: 560px;
  font-size: clamp(42px, 4.6vw, 68px);
  line-height: .96;
  text-wrap: balance;
}

.prereg-copy p:not(.eyebrow) {
  max-width: 560px;
  margin: 22px 0 0;
  color: #eadabb;
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 500;
  line-height: 1.62;
  text-wrap: pretty;
}

.prereg-section::before,
.prereg-section::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.prereg-section::before {
  inset: 0;
  background:
    radial-gradient(circle at 74% 22%, rgba(143, 85, 255, .18), transparent 18rem),
    radial-gradient(circle at 15% 84%, rgba(246, 205, 95, .14), transparent 15rem);
}

.prereg-section::after {
  inset: 12px;
  background:
    radial-gradient(circle at 12% 28%, rgba(246, 205, 95, .7) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 18%, rgba(143, 85, 255, .72) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 72%, rgba(246, 205, 95, .48) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 84%, rgba(255, 124, 56, .45) 0 1px, transparent 2px);
  background-size: 140px 140px, 190px 190px, 230px 230px, 270px 270px;
  opacity: .28;
  animation: sparksDrift 20s linear infinite;
}

.prereg-copy,
.reward-grid,
.reward-note {
  position: relative;
  z-index: 1;
}

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

.reward-card {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-rows: minmax(220px, 1fr) 58px auto;
  align-content: stretch;
  gap: 12px;
  border: 1px solid rgba(246, 205, 95, .3);
  border-radius: 16px;
  padding: 16px 18px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(246, 205, 95, .2), transparent 6rem),
    linear-gradient(180deg, rgba(18, 14, 22, .86), rgba(4, 5, 9, .9));
  box-shadow:
    0 18px 45px rgba(0, 0, 0, .42),
    inset 0 0 26px rgba(246, 205, 95, .04);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.reward-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 50% 40%, rgba(143, 85, 255, .3), transparent 22%),
    conic-gradient(from 120deg, transparent, rgba(246, 205, 95, .16), transparent, rgba(143, 85, 255, .14), transparent);
  opacity: .52;
  animation: rewardPulse 4.5s ease-in-out infinite;
}

.reward-card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(246, 205, 95, .18);
  border-radius: 12px;
  pointer-events: none;
}

.reward-card:hover {
  transform: translateY(-4px);
  border-color: rgba(246, 205, 95, .58);
  box-shadow:
    0 0 34px rgba(246, 205, 95, .13),
    0 18px 50px rgba(0, 0, 0, .5),
    inset 0 0 34px rgba(143, 85, 255, .08);
}

.reward-art {
  position: relative;
  z-index: 1;
  min-height: 218px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px;
  border: 1px solid rgba(246, 205, 95, .18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(143, 85, 255, .26), transparent 38%),
    radial-gradient(circle at 50% 74%, rgba(246, 205, 95, .16), transparent 45%),
    rgba(3, 4, 8, .34);
  box-shadow:
    0 0 24px rgba(143, 85, 255, .16),
    inset 0 0 28px rgba(246, 205, 95, .035);
}

.reward-art::before,
.reward-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.reward-art::before {
  width: 62%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(246, 205, 95, .2), transparent 64%);
  filter: blur(6px);
}

.reward-art::after {
  width: 82%;
  height: 42%;
  bottom: 4%;
  background: radial-gradient(ellipse, rgba(143, 85, 255, .22), transparent 68%);
}

.reward-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 280px;
  max-height: 220px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 20px rgba(246, 205, 95, .24))
    drop-shadow(0 0 30px rgba(143, 85, 255, .16));
  transform: translateZ(0);
  transition: transform .24s ease, filter .24s ease;
}

.reward-card:hover .reward-art img {
  transform: translateY(-4px) scale(1.04);
  filter:
    drop-shadow(0 0 24px rgba(246, 205, 95, .38))
    drop-shadow(0 0 38px rgba(143, 85, 255, .26));
}

.reward-card span,
.reward-card p {
  position: relative;
  z-index: 1;
}

.reward-card span {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 58px;
  display: flex;
  align-items: end;
  font-size: clamp(23px, 1.8vw, 28px);
  font-weight: 900;
  line-height: .98;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(246, 205, 95, .22);
  text-wrap: balance;
}

.reward-card p {
  margin: 0;
  color: #eadabb;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.58;
  text-wrap: pretty;
}

.reward-chests .reward-art {
  background:
    radial-gradient(circle at 50% 42%, rgba(50, 154, 255, .2), transparent 38%),
    radial-gradient(circle at 50% 74%, rgba(246, 205, 95, .14), transparent 45%),
    rgba(3, 4, 8, .34);
}

.reward-chests .reward-art img {
  max-width: 320px;
}

.reward-note,
.form-reward-note {
  color: #ffe5a5;
  font-weight: 700;
}

.reward-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  text-wrap: balance;
}

.form-reward-note {
  margin: 12px 0 0;
  line-height: 1.55;
}

.community-panel {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(360px, 1.14fr);
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: 18px;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.social-link {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(246, 205, 95, .28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(246, 205, 95, .12), transparent 5rem),
    linear-gradient(180deg, rgba(13, 12, 18, .82), rgba(3, 4, 8, .74));
  color: #ffe9b0;
  padding: 8px 16px 8px 8px;
  font-weight: 900;
  box-shadow:
    inset 0 0 18px rgba(246, 205, 95, .035),
    0 10px 26px rgba(0, 0, 0, .24);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.social-link span,
.footer-socials a {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(246, 205, 95, .42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 20%, rgba(246, 205, 95, .26), transparent 45%),
    linear-gradient(180deg, rgba(35, 22, 13, .94), rgba(5, 6, 10, .95));
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(246, 205, 95, .35);
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 205, 95, .62);
  color: #fff4c9;
  box-shadow:
    0 0 24px rgba(246, 205, 95, .16),
    0 12px 30px rgba(0, 0, 0, .34),
    inset 0 0 22px rgba(143, 85, 255, .08);
}

.social-link-wide {
  grid-column: 1 / -1;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 34px;
  padding-top: 28px;
  padding-bottom: 28px;
  color: #cdbb98;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(139, 26, 42, .74);
}

.footer-brand small {
  color: #c0392b;
  font-size: .45em;
}

.site-footer p {
  margin: 0;
  text-align: center;
  font-weight: 700;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease;
}

.footer-socials a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(246, 205, 95, .2);
}

.notify-form label {
  display: block;
  color: var(--dim);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.notify-form label span {
  display: block;
  margin-bottom: 10px;
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.field-row {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.notify-form input {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  color: var(--text);
  padding: 0 16px;
}

.notify-form small {
  display: block;
  margin-top: 10px;
}

.form-state {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(111, 207, 151, .34);
  border-radius: 12px;
  background: rgba(111, 207, 151, .08);
  color: #b8e8c8;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  max-width: min(92vw, 460px);
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 12px 16px;
  border-radius: 12px;
  color: #ffe9b0;
  text-align: center;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reward-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}

.reward-modal[hidden] {
  display: none;
}

.reward-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(143, 85, 255, .18), transparent 22rem),
    rgba(0, 0, 0, .72);
  backdrop-filter: blur(5px);
}

.reward-modal-panel {
  position: relative;
  width: min(92vw, 520px);
  border: 1px solid rgba(246, 205, 95, .42);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 38px);
  background:
    radial-gradient(circle at 100% 0, rgba(143, 85, 255, .18), transparent 15rem),
    linear-gradient(180deg, rgba(17, 13, 20, .98), rgba(5, 6, 10, .98));
  box-shadow:
    0 26px 80px rgba(0, 0, 0, .72),
    0 0 42px rgba(246, 205, 95, .12),
    inset 0 0 34px rgba(246, 205, 95, .04);
}

.reward-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(246, 205, 95, .32);
  border-radius: 50%;
  background: rgba(3, 4, 8, .62);
  color: var(--gold);
  cursor: pointer;
}

.reward-modal-panel ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.reward-modal-panel li {
  border: 1px solid rgba(246, 205, 95, .24);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(3, 4, 8, .42);
  color: #ffe5a5;
  font-weight: 900;
}

@keyframes slowDrift {
  from { background-position: center top; }
  to { background-position: center 3%; }
}

@keyframes fogDrift {
  from { transform: translate3d(-2%, 0, 0) scale(1.02); opacity: .44; }
  to { transform: translate3d(3%, -1%, 0) scale(1.07); opacity: .66; }
}

@keyframes sparksDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(18px, -38px, 0); }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rewardPulse {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: .42; }
  50% { transform: rotate(12deg) scale(1.04); opacity: .68; }
}

@media (max-width: 980px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

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

  .top-nav {
    display: none;
  }

  .top-actions {
    gap: 8px;
  }

  .hero,
  .format-section,
  .prereg-section,
  .notify-section,
  .community-panel {
    grid-template-columns: 1fr;
  }

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

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

  .castle-hud {
    max-width: 560px;
  }

  .device-frame {
    min-height: 420px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  body {
    background:
      linear-gradient(90deg, rgba(5, 7, 14, .84), rgba(5, 7, 14, .56), rgba(5, 7, 14, .84)),
      linear-gradient(180deg, rgba(5, 7, 14, .18), rgba(5, 7, 14, .76) 45%, rgba(5, 7, 14, .92)),
      url("./assets/castle-bg.jpg") center top / auto 1000px repeat-y,
      #06070b;
  }

  body::after {
    opacity: .22;
  }

  .castle-page::before {
    opacity: .36;
    filter: blur(14px);
  }

  .top-panel {
    min-height: 64px;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 0 10px;
  }

  .brand {
    min-height: 40px;
    font-size: 18px;
  }

  .top-cta {
    display: none;
  }

  .top-actions {
    min-width: 0;
    gap: 6px;
    justify-content: end;
  }

  .language-toggle {
    min-width: 62px;
    min-height: 40px;
    padding: 0 7px;
    font-size: 11px;
  }

  .language-menu {
    right: -4px;
  }

  .hero {
    padding: 88px 14px 32px;
    align-items: end;
  }

  h1 {
    font-size: clamp(40px, 13vw, 56px);
  }

  .hero-content,
  .feature-grid article,
  .prereg-section,
  .device-copy,
  .notify-section,
  .community-panel {
    backdrop-filter: blur(3px);
  }

  .hero-actions,
  .field-row,
  .form-fields {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .castle-preview,
  .resource-bar {
    grid-template-columns: 1fr;
  }

  .beta-flow,
  .hud-nav {
    grid-template-columns: 1fr;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

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

  .reward-card {
    min-height: 0;
    grid-template-rows: minmax(218px, auto) auto auto;
  }

  .prereg-section h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .reward-card span {
    min-height: auto;
    font-size: clamp(24px, 7.4vw, 29px);
  }

  .social-link {
    min-height: 56px;
  }

  .castle-preview button {
    min-height: 118px;
  }

  .squad-row img {
    height: 110px;
  }

  .device-frame {
    min-height: 340px;
  }

  .desktop-shot {
    inset: 0 38px 58px 0;
  }

  .phone-shot {
    width: 42%;
    height: 230px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Updated hero card presentation */
.top-telegram {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(86, 176, 255, .48);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(22, 92, 145, .9), rgba(8, 23, 39, .92));
  color: #dff3ff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 16px rgba(86, 176, 255, .12), 0 0 18px rgba(86, 176, 255, .08);
  white-space: nowrap;
}

.top-telegram:hover {
  color: #fff;
  border-color: rgba(116, 204, 255, .72);
  box-shadow: inset 0 0 18px rgba(86, 176, 255, .16), 0 0 24px rgba(86, 176, 255, .18);
}

.squad-row-cards {
  align-items: stretch;
  padding: 0 14px 18px;
}

.squad-row-cards img {
  height: 154px;
  object-fit: contain;
  object-position: center bottom;
  padding: 5px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 12%, rgba(246, 205, 95, .16), transparent 58%),
    linear-gradient(180deg, rgba(19, 13, 18, .94), rgba(5, 5, 8, .96));
  box-shadow: inset 0 0 18px rgba(246, 205, 95, .08), 0 10px 22px rgba(0, 0, 0, .28);
}

@media (max-width: 640px) {
  .top-telegram {
    min-height: 40px;
    padding: 0 9px;
    font-size: 11px;
  }

  .squad-row-cards img {
    height: 124px;
    padding: 4px;
  }
}

/* Castle featured hub update */
.castle-preview-featured {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 14px 14px;
}

.castle-preview-featured .castle-feature-card {
  min-height: 190px;
  padding: 18px;
  align-content: end;
  border-color: rgba(246, 205, 95, .52);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 167, .08),
    inset 0 -72px 80px rgba(10, 3, 3, .74),
    0 20px 42px rgba(0, 0, 0, .34),
    0 0 34px rgba(211, 49, 37, .14);
}

.castle-preview-featured .castle-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 24%, rgba(246, 205, 95, .18), transparent 34%),
    linear-gradient(180deg, rgba(255, 220, 128, .12), transparent 42%);
}

.castle-preview-featured .castle-feature-card img {
  filter: brightness(1.14) contrast(1.12) saturate(1.08);
}

.castle-preview-featured .castle-feature-card span {
  font-size: 26px;
  color: #ffe39b;
}

.castle-preview-featured .castle-feature-card em {
  position: relative;
  z-index: 2;
  width: fit-content;
  padding: 4px 10px;
  border: 1px solid rgba(246, 205, 95, .38);
  border-radius: 999px;
  background: rgba(18, 7, 5, .66);
  color: rgba(255, 242, 198, .88);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.castle-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.castle-preview-featured .castle-mode-grid button {
  min-height: 92px;
  padding: 10px;
  border-color: rgba(246, 205, 95, .22);
}

.castle-preview-featured .castle-mode-grid span {
  font-size: 14px;
}

@media (max-width: 640px) {
  .castle-preview-featured .castle-feature-card {
    min-height: 154px;
  }

  .castle-mode-grid {
    grid-template-columns: 1fr;
  }

  .castle-preview-featured .castle-mode-grid button {
    min-height: 86px;
  }
}

