@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@1,700&display=swap");

:root {
  color-scheme: dark;
  --ink: #fff8ff;
  --muted: #b8a9bd;
  --surface: rgba(255, 255, 255, .065);
  --surface-strong: rgba(255, 255, 255, .095);
  --line: rgba(255, 255, 255, .12);
  --pink: #ec296d;
  --purple: #7c279f;
  --violet: #4a1f76;
  --green: #6ee7a3;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #130817; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -15%, rgba(133, 41, 146, .36), transparent 39%),
    linear-gradient(160deg, #1c0a22 0%, #110713 47%, #16091a 100%);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 65%);
}

.aurora {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .25;
  pointer-events: none;
}

.aurora-one { top: 18%; left: -180px; width: 360px; height: 360px; background: var(--pink); }
.aurora-two { top: 48%; right: -200px; width: 420px; height: 420px; background: #642bab; }

.shell {
  width: min(100%, 580px);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px 54px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(38px, 10vw, 58px); line-height: .98; letter-spacing: -.065em; }
h1 span { color: #f6a5c4; font-family: "Playfair Display", Georgia, serif; font-weight: 700; letter-spacing: -.04em; }
h2 { margin-bottom: 8px; font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 44px;
}

.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; }
.brand img { width: 44px; height: 44px; object-fit: cover; object-position: top; border-radius: 12px; }
.brand div { display: grid; gap: 1px; }
.brand span { font-size: 16px; font-weight: 800; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 7px; letter-spacing: .07em; text-transform: uppercase; }

.member-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255,255,255,.04);
  color: #d9cadf;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.member-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 12px var(--pink); }

.welcome { margin-bottom: 28px; }
.welcome-text { max-width: 410px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.eyebrow {
  margin-bottom: 9px;
  color: #ed82ac;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.balance-card {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 290px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  padding: 27px;
  align-content: space-between;
  background:
    radial-gradient(circle at 80% 0%, rgba(255,255,255,.24), transparent 28%),
    linear-gradient(135deg, #ee356e 0%, #a62787 44%, #4b257f 100%);
  box-shadow: 0 30px 90px rgba(106, 20, 94, .4);
  transition: background .45s ease, box-shadow .45s ease, border-color .45s ease;
}
.balance-card.level-newbie { background: radial-gradient(circle at 80% 0%, rgba(255,255,255,.24), transparent 28%), linear-gradient(135deg, #eb477c 0%, #a43b8b 48%, #61317f 100%); }
.balance-card.level-crafter { border-color: rgba(255,232,183,.38); background: radial-gradient(circle at 80% 0%, rgba(255,246,207,.27), transparent 30%), linear-gradient(135deg, #db3977 0%, #843492 46%, #3b337f 100%); box-shadow: 0 30px 95px rgba(103, 35, 137, .48); }
.balance-card.level-master { border-color: rgba(255,228,157,.56); background: radial-gradient(circle at 80% 0%, rgba(255,234,171,.42), transparent 31%), linear-gradient(135deg, #c92770 0%, #713384 43%, #242b69 100%); box-shadow: 0 30px 100px rgba(130, 41, 104, .52); }
.balance-card.level-master .gem-mark { border-color: #ffe29a; box-shadow: 0 0 25px rgba(255,222,141,.5); }
.balance-card > :not(.registration-card-overlay) { transition: filter .45s ease, opacity .45s ease, transform .45s ease; }
.registration-card-overlay { position: absolute; z-index: 5; inset: 0; display: grid; width: 100%; place-content: center; justify-items: center; border: 0; padding: 28px; background: radial-gradient(circle at 50% 45%, rgba(29,8,34,.2), rgba(17,5,22,.62)); color: white; text-align: center; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.registration-card-overlay::before { position: absolute; inset: 21px; border: 1px solid rgba(255,255,255,.2); border-radius: 23px; background: rgba(255,255,255,.07); box-shadow: inset 0 1px rgba(255,255,255,.16), 0 20px 60px rgba(24,3,31,.32); content: ""; backdrop-filter: blur(5px); }
.registration-card-overlay > * { position: relative; z-index: 1; }
.registration-card-overlay strong { max-width: 270px; font-size: 18px; line-height: 1.2; letter-spacing: -.035em; }
.registration-card-overlay small { max-width: 255px; margin-top: 7px; color: rgba(255,255,255,.72); font-size: 9px; line-height: 1.55; }
.registration-arrow { display: grid; width: 48px; height: 48px; margin-bottom: 13px; place-items: center; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.08)); box-shadow: 0 0 0 0 rgba(255,175,212,.5), 0 12px 28px rgba(43,5,51,.3); font-size: 24px; animation: registration-arrow-float 1.35s ease-in-out infinite, registration-arrow-ring 2s ease-out infinite; }
.registration-required .balance-card { border-color: rgba(255,208,229,.46); box-shadow: 0 30px 95px rgba(125,28,109,.48), 0 0 0 1px rgba(255,255,255,.08); }
.registration-required .balance-card > :not(.registration-card-overlay) { filter: blur(7px); opacity: .38; transform: scale(.985); }
.registration-required .registration-card-overlay { opacity: 1; pointer-events: none; }

.card-glow { position: absolute; z-index: -1; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.13); filter: blur(3px); }
.card-pattern { position: absolute; z-index: -1; inset: 0; opacity: .18; background-image: radial-gradient(circle, white 1px, transparent 1.5px); background-size: 14px 14px; mask-image: linear-gradient(120deg, transparent 30%, black); }
.balance-top { display: flex; justify-content: space-between; gap: 20px; }
.card-label { color: rgba(255,255,255,.72); font-size: 12px; font-weight: 600; }
.balance-line { display: flex; align-items: baseline; gap: 10px; margin-top: 3px; }
.balance-line strong { font-size: clamp(72px, 22vw, 112px); line-height: .92; letter-spacing: -.1em; }
.balance-line span { color: rgba(255,255,255,.68); font-size: 11px; font-weight: 700; transform: rotate(-90deg) translateX(8px); }
.gem-mark { display: grid; width: 62px; height: 62px; overflow: hidden; place-items: center; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; background: white; box-shadow: 0 12px 30px rgba(69, 13, 78, .28); }
.gem-mark img { width: 100%; height: 100%; object-fit: cover; }

.level { margin: auto 0 18px; }
.level-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: rgba(255,255,255,.7); font-size: 9px; }
.level-row b { color: white; }
.progress { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.22); }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: white; box-shadow: 0 0 12px white; transition: width .5s ease; }
.level-benefit { display: block; margin-top: 8px; color: rgba(255,255,255,.78); font-size: 8px; font-weight: 700; letter-spacing: .02em; }
.card-footer { display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.72); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.quick-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0 34px; }
.quick-stats article { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 17px; padding: 14px; background: var(--surface); backdrop-filter: blur(16px); }
.stat-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: linear-gradient(135deg, rgba(236,41,109,.3), rgba(124,39,159,.45)); color: #ffacd0; }
.quick-stats div { display: grid; gap: 1px; }
.quick-stats strong { font-size: 14px; }
.quick-stats small { color: var(--muted); font-size: 8px; }

.levels-card { margin-bottom: 34px; border: 1px solid var(--line); border-radius: 24px; padding: 20px; background: var(--surface); backdrop-filter: blur(20px); }
.level-scale { display: grid; gap: 9px; }
.level-scale article { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 15px; padding: 11px; color: #9d8ca3; transition: .25s ease; }
.level-scale article > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: rgba(255,255,255,.06); color: #c7b5cc; font-size: 11px; font-weight: 800; }
.level-scale article div { display: grid; gap: 2px; }
.level-scale b { font-size: 11px; }
.level-scale small { font-size: 8px; }
.level-scale article.active { border-color: rgba(255,255,255,.16); background: linear-gradient(100deg, rgba(236,41,109,.2), rgba(124,39,159,.18)); color: white; }
.level-scale article.active > span { background: linear-gradient(135deg, var(--pink), var(--purple)); color: white; box-shadow: 0 10px 24px rgba(201,34,111,.22); }

.invite-card {
  position: relative;
  margin-bottom: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(255,255,255,.035));
  box-shadow: 0 20px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(24px);
}

.invite-card::after { position: absolute; top: -75px; right: -65px; width: 180px; height: 180px; border-radius: 50%; background: rgba(236,41,109,.18); content: ""; filter: blur(30px); }
.invite-content { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 15px; }
.invite-content p:not(.eyebrow) { margin-bottom: 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.invite-content b { color: #ff9ac2; }
.gift-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 15px; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 12px 30px rgba(201, 34, 111, .25); font-size: 20px; }

.referral-box { position: relative; z-index: 1; display: flex; gap: 8px; border: 1px solid var(--line); border-radius: 13px; padding: 5px; background: rgba(0,0,0,.16); }
.referral-link { min-width: 0; flex: 1; border: 0; padding: 8px 7px; outline: 0; background: transparent; color: var(--muted); font: inherit; font-size: 9px; }
button { font: inherit; cursor: pointer; }
.copy-mini { border: 0; border-radius: 9px; padding: 8px 10px; background: rgba(255,255,255,.09); color: white; font-size: 8px; font-weight: 700; }
.primary-button { position: relative; z-index: 1; display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 10px; border: 0; border-radius: 13px; padding: 14px 16px; background: linear-gradient(100deg, #ed326f, #a32a8b); color: white; font-size: 11px; font-weight: 800; box-shadow: 0 12px 34px rgba(205, 35, 112, .28); }
.button-arrow { font-size: 18px; line-height: 0; }
button:disabled { cursor: wait; opacity: .45; }
.hidden { display: none !important; }
.max-registration { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; margin: 0 0 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 24px; padding: 19px; background: linear-gradient(145deg, rgba(236,41,109,.2), rgba(124,39,159,.18)); box-shadow: 0 22px 70px rgba(75,18,83,.25); backdrop-filter: blur(24px); }
.max-registration::after { position: absolute; z-index: -1; top: -80px; right: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(238,48,112,.24); content: ""; filter: blur(32px); }
.max-registration-mark { display: grid; width: 54px; height: 54px; overflow: hidden; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: white; }
.max-registration-mark img { width: 100%; height: 100%; object-fit: cover; }
.max-registration h2 { margin: 3px 0 5px; font-size: 17px; }
.max-registration p:not(.eyebrow) { color: #b9a4bd; font-size: 9px; line-height: 1.55; }
.max-registration .primary-button, .max-registration small { grid-column: 1 / -1; }
.max-registration small { color: #9d87a2; font-size: 8px; line-height: 1.5; }
.registration-required .max-registration { border-color: rgba(255,192,220,.42); box-shadow: 0 22px 70px rgba(130,24,107,.35), 0 0 0 1px rgba(255,255,255,.07); }
.registration-required .max-registration .primary-button { animation: registration-button-pulse 2s ease-in-out infinite; }
.max-registration .primary-button.registration-button-attention { animation: registration-button-attention .6s ease-in-out 3; }

@keyframes registration-arrow-float {
  0%, 100% { transform: translateY(3px); }
  50% { transform: translateY(-7px); }
}

@keyframes registration-arrow-ring {
  0% { box-shadow: 0 0 0 0 rgba(255,175,212,.55), 0 12px 28px rgba(43,5,51,.3); }
  70%, 100% { box-shadow: 0 0 0 15px rgba(255,175,212,0), 0 12px 28px rgba(43,5,51,.3); }
}

@keyframes registration-button-pulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(205,35,112,.28), 0 0 0 0 rgba(255,123,181,.35); transform: translateY(0); }
  50% { box-shadow: 0 16px 42px rgba(205,35,112,.42), 0 0 0 7px rgba(255,123,181,0); transform: translateY(-2px); }
}

@keyframes registration-button-attention {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@media (prefers-reduced-motion: reduce) {
  .registration-arrow, .registration-required .max-registration .primary-button, .max-registration .primary-button.registration-button-attention { animation: none; }
}

.history-section { margin-bottom: 34px; }
.wallet-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 15px; padding: 4px; background: rgba(255,255,255,.045); }
.wallet-tab { border: 0; border-radius: 11px; padding: 11px 8px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; }
.wallet-tab.active { background: linear-gradient(100deg, rgba(236,41,109,.72), rgba(124,39,159,.78)); color: white; box-shadow: 0 8px 22px rgba(139,33,119,.22); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { margin-bottom: 0; }
.text-button { border: 0; padding: 0 0 2px; background: transparent; color: #d98db3; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.history { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); backdrop-filter: blur(20px); }
.history > p { padding: 18px; }
.transaction { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.transaction:last-child { border-bottom: 0; }
.transaction-icon { display: grid; grid-row: span 2; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.07); color: #efa0c2; font-size: 14px; }
.transaction span:not(.transaction-icon) { font-size: 10px; font-weight: 600; }
.transaction strong { grid-row: span 2; align-self: center; font-size: 13px; }
.transaction small { color: var(--muted); font-size: 8px; }
.positive { color: var(--green); }
.negative { color: #ff9aaf; }
.neutral { color: #f3afd0; font-size: 9px !important; }
.referral-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.referral-summary article { display: grid; gap: 3px; min-width: 0; border: 1px solid var(--line); border-radius: 15px; padding: 13px 9px; background: var(--surface); text-align: center; }
.referral-summary strong { font-size: 16px; color: white; }
.referral-summary span { color: var(--muted); font-size: 7px; line-height: 1.35; }
.referral-list { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.referral-list > p { padding: 18px; }
.referral-person { display: grid; grid-template-columns: auto 1fr auto; gap: 5px 11px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.referral-person:last-child { border-bottom: 0; }
.referral-avatar { display: grid; grid-row: span 2; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, rgba(236,41,109,.75), rgba(124,39,159,.8)); font-size: 11px; font-weight: 800; }
.referral-person b { font-size: 10px; }
.referral-person small { color: var(--muted); font-size: 8px; }
.referral-person strong { grid-row: span 2; color: #f2afd1; font-size: 10px; text-align: right; }
.muted, .status { color: var(--muted); font-size: 10px; }
.status { margin-top: 18px; text-align: center; }

footer { display: flex; align-items: center; justify-content: center; gap: 8px; color: #8e7d93; font-size: 8px; font-weight: 800; letter-spacing: .14em; }
footer img { width: 23px; height: 23px; object-fit: cover; object-position: top; border-radius: 7px; opacity: .75; }
footer small { color: #66586b; font-size: 7px; font-weight: 500; letter-spacing: .02em; }

@media (min-width: 700px) {
  .shell { padding-top: 42px; }
  .balance-card { min-height: 320px; }
}
