@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #11131b;
  --panel: #191c27;
  --panel-strong: #202432;
  --line: rgba(255, 255, 255, .09);
  --text: #f5f5f8;
  --muted: #9296a7;
  --purple: #a78bfa;
  --mint: #78ebc4;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 80% 6%, rgba(119, 88, 206, .13), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.app-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font: 700 19px "Space Grotesk", sans-serif;
  letter-spacing: -.7px;
}

.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #bba8ff, #8264e7);
  color: #14111f;
  font-size: 17px;
}

.brand-light { color: #a995ed; }

.profile-shortcut {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .035);
  color: #ded8f1;
  font-size: 12px;
  font-weight: 600;
}

.shortcut-avatar, .profile-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(220, 207, 255, .35);
  border-radius: 50%;
  background: linear-gradient(145deg, #bba8ff, #765bd0);
  color: #171321;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}
.shortcut-avatar { width: 30px; height: 30px; }
.shortcut-avatar img, .profile-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.balance-star { color: #f3cf75; font-size: 23px; }
.profile-balance strong { display: block; margin-top: 1px; font-size: 18px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }

.hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  margin-top: 25px;
  padding: 46px 55px;
  overflow: hidden;
  border: 1px solid rgba(183, 162, 255, .15);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 78% 50%, rgba(131, 98, 229, .2), transparent 35%),
    linear-gradient(112deg, #1a1b29, #191a27 60%, #211e34);
}

.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow { display: flex; gap: 8px; align-items: center; color: #b6a4ef; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 11px var(--mint); }

h1, h2 { font-family: "Space Grotesk", sans-serif; letter-spacing: -1.7px; }
h1 { margin: 19px 0 12px; font-size: clamp(46px, 7vw, 72px); line-height: .96; }
h1 span { color: var(--purple); }
.hero-description { max-width: 340px; margin: 0; color: #a9a9ba; font-size: 14px; line-height: 1.7; }
.text-link { display: inline-flex; gap: 10px; align-items: center; margin-top: 24px; color: #d7cdf8; font-size: 13px; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.hero-actions .text-link { margin-top: 24px; }
.upgrader-link { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; margin-top: 24px; padding: 0 14px; border: 1px solid rgba(193,176,255,.25); border-radius: 11px; background: rgba(167,139,250,.1); color: #e4d9ff; font-size: 11px; font-weight: 700; transition: background .2s, border-color .2s, transform .2s; }
.upgrader-link:hover { transform: translateY(-2px); border-color: rgba(193,176,255,.48); background: rgba(167,139,250,.18); }

.hero-art { position: absolute; top: 50%; right: 12%; width: 280px; height: 280px; transform: translateY(-50%); }
.orbit { position: absolute; inset: 20px; border: 1px solid rgba(195, 175, 255, .2); border-radius: 50%; transform: rotate(-24deg) scaleY(.65); }
.orbit-two { inset: 0; transform: rotate(45deg) scaleY(.6); border-color: rgba(195, 175, 255, .12); }
.hero-gem { position: absolute; inset: 66px; display: grid; place-items: center; border: 1px solid rgba(222, 209, 255, .3); border-radius: 30px; background: linear-gradient(145deg, #b8a0ff, #7757d0 68%, #473080); box-shadow: 0 22px 70px rgba(125, 86, 220, .36), inset 0 1px 0 rgba(255,255,255,.55); color: #f6f1ff; font-size: 86px; transform: rotate(45deg); }
.hero-gem::first-letter { transform: rotate(-45deg); }
.spark { position: absolute; color: #ded0ff; }
.spark-one { top: 37px; left: 40px; font-size: 25px; }
.spark-two { right: 17px; bottom: 56px; color: #f3d288; font-size: 17px; }
.spark-three { top: 83px; right: 21px; font-size: 38px; }

.info-note { position: absolute; right: 20px; bottom: 17px; left: 20px; display: flex; gap: 9px; align-items: center; color: #9e9daf; font-size: 11px; }
.info-note > span:first-child { color: #b7a4f5; font-size: 14px; }

.subscription-gate {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 11, 17, .82);
  backdrop-filter: blur(12px);
}
.subscription-gate[hidden] { display: none; }
.subscription-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(183, 162, 255, .22);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(167,139,250,.1), transparent 55%), var(--panel);
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  text-align: center;
}
.subscription-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(193,176,255,.32);
  border-radius: 18px;
  background: rgba(167,139,250,.15);
  color: #d7caff;
  font-size: 30px;
}
.subscription-card h2 { margin: 10px 0; font-size: 26px; }
.subscription-card > p:not(.eyebrow) { margin: 0 0 20px; color: #a9a9ba; font-size: 13px; line-height: 1.65; }
.subscription-link, .subscription-check { display: block; width: 100%; min-height: 44px; margin-top: 10px; font-size: 12px; }
.subscription-link { padding: 14px; }
.subscription-check { border-radius: 10px; }
.subscription-check:disabled { opacity: .6; cursor: wait; }

.section { padding-top: 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -1px; }
.section-count { padding-bottom: 5px; color: #777b8d; font: 500 11px "Space Grotesk", sans-serif; letter-spacing: 1px; }

.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 15px; }
.case-card {
  position: relative;
  min-height: 280px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.012) 55%), var(--panel);
  transition: transform .2s ease, border-color .2s ease;
}
.case-card:hover { transform: translateY(-3px); border-color: rgba(193, 176, 255, .34); }
.case-card::after { position: absolute; top: -50px; right: -52px; width: 160px; height: 160px; border-radius: 50%; background: var(--case-glow); content: ""; filter: blur(40px); opacity: .16; pointer-events: none; }
.case-card.rich { --case-glow: #a880ff; }
.case-card.ordinary { --case-glow: #70d8bd; }
.case-card.allin { --case-glow: #f4bf72; }
.case-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.case-number { color: #777b8d; font: 500 11px "Space Grotesk", sans-serif; letter-spacing: .8px; }
.case-tag { padding: 5px 8px; border-radius: 20px; background: rgba(255,255,255,.06); color: #aaaabd; font-size: 9px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.case-visual { position: relative; z-index: 1; display: grid; height: 102px; place-items: center; }
.case-box { display: grid; width: 76px; height: 70px; place-items: center; border: 1px solid color-mix(in srgb, var(--case-glow), transparent 25%); border-radius: 20px; background: linear-gradient(145deg, color-mix(in srgb, var(--case-glow), #fff 15%), color-mix(in srgb, var(--case-glow), #151421 68%)); box-shadow: 0 12px 35px color-mix(in srgb, var(--case-glow), transparent 78%), inset 0 1px 0 rgba(255,255,255,.55); color: #fff; font-size: 33px; transform: rotate(-8deg); }
.case-card h3 { position: relative; z-index: 1; margin: 3px 0 3px; font: 600 18px "Space Grotesk", sans-serif; }
.case-description { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 11px; }
.case-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.case-price { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; }
.case-price span { color: #f3cf75; }
.open-button, .primary-button { border: 0; border-radius: 10px; background: #e8defe; color: #211a35; font-size: 11px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.open-button { padding: 10px 13px; }
.open-button:hover, .primary-button:hover { background: #fff; transform: translateY(-1px); }
.open-button:disabled { background: #343643; color: #737688; cursor: not-allowed; transform: none; }
.odds-toggle { position: relative; z-index: 1; display: inline-block; margin-top: 14px; padding: 0; border: 0; background: none; color: #aaa0cb; font-size: 10px; cursor: pointer; }
.odds-toggle:hover { color: #e3d9ff; }
.odds-list { position: relative; z-index: 1; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; }
.odds-list li { display: flex; justify-content: space-between; gap: 7px; padding: 4px 0; color: #b6b7c4; font-size: 10px; }
.odds-list strong { color: #e0d7fa; font-weight: 600; }

.profile-section { padding-top: 38px; }
.profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
  padding: 20px 24px;
  border: 1px solid rgba(183, 162, 255, .16);
  border-radius: 18px;
  background: linear-gradient(115deg, rgba(167,139,250,.1), rgba(255,255,255,.025) 65%), var(--panel);
}
.profile-identity { display: flex; min-width: 0; align-items: center; gap: 15px; }
.profile-avatar { width: 56px; height: 56px; font-size: 24px; box-shadow: 0 8px 26px rgba(125, 86, 220, .24); }
.profile-details { min-width: 0; }
.profile-details h2 { overflow-wrap: anywhere; margin: 6px 0 4px; font-size: 21px; letter-spacing: -.8px; }
.profile-id { margin: 0; color: var(--muted); font-size: 11px; }
.profile-id span { margin-left: 4px; color: #d3c8f3; font-family: "Space Grotesk", sans-serif; letter-spacing: .5px; }
.profile-balance { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.12); }
.profile-balance .eyebrow { font-size: 9px; }
.profile-page-hero { position: relative; padding: 44px 0 15px; }
.profile-page-hero h1 { margin: 10px 0 8px; font-size: clamp(38px, 6vw, 58px); }
.profile-page-hero h1 span { color: var(--purple); }
.profile-page-hero > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.profile-page-card { margin: 15px 0 0; }
.profile-page-section { padding-top: 40px; }
.account-tools-section { padding-top: 24px; }
.account-tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-tool-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.account-tool-card h3 { margin: 0 0 12px; font-size: 14px; }
.account-tool-label { display: block; margin: 0 0 5px; color: #bfc0cc; font-size: 9px; font-weight: 600; }
.copy-link-row { display: flex; min-width: 0; gap: 6px; }
.copy-link-row input { width: 100%; min-width: 0; min-height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #141620; color: var(--text); font: 500 10px "DM Sans", sans-serif; }
.copy-link-row input:focus { border-color: rgba(185,162,255,.55); box-shadow: 0 0 0 3px rgba(167,139,250,.1); }
.copy-link-row input[readonly] { color: #aaa1c8; }
.secondary-button { flex: 0 0 auto; min-height: 34px; padding: 0 9px; border: 1px solid rgba(183,162,255,.2); border-radius: 8px; background: rgba(167,139,250,.1); color: #d7caff; font-size: 9px; font-weight: 700; cursor: pointer; }
.secondary-button:hover { border-color: rgba(183,162,255,.4); background: rgba(167,139,250,.17); }
.star-packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 8px; }
.star-packages .secondary-button { min-height: 40px; }
.account-tool-form { margin-top: 10px; }
.account-tool-form > small { display: block; margin-top: 6px; color: #858899; font-size: 9px; line-height: 1.4; }
.referral-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.referral-stats > div { display: grid; gap: 4px; padding: 7px; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; background: rgba(255,255,255,.02); }
.referral-stats span { color: #9296a7; font-size: 9px; }
.referral-stats strong { color: #e8defe; font: 600 15px "Space Grotesk", sans-serif; }
.referral-stats strong span { color: #e8defe; font: inherit; }
.promo-code-list { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.promo-code-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid rgba(255,255,255,.06); border-radius: 8px; background: rgba(255,255,255,.02); }
.promo-code-list li > span:first-child { display: grid; gap: 3px; }
.promo-code-list strong { color: #e2d9fb; font: 600 10px "Space Grotesk", sans-serif; letter-spacing: .5px; }
.promo-code-list small { color: #a9abb8; font-size: 9px; }
.promo-status { color: var(--mint); font-size: 9px; }
.promo-status.is-used { color: #858899; }
.withdraw-note { line-height: 1.6; }
.upgrader-section { padding-top: 52px; }
.upgrade-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(167,139,250,.24); border-radius: 12px; background: rgba(167,139,250,.1); color: #d7caff; font-size: 20px; }
.upgrader-card { position: relative; overflow: hidden; padding: 23px; border: 1px solid rgba(183,162,255,.16); border-radius: 18px; background: radial-gradient(ellipse at 50% 0, rgba(142,111,225,.12), transparent 55%), var(--panel); box-shadow: 0 12px 36px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.03); }
.upgrade-fields { display: grid; grid-template-columns: minmax(0,1fr) 32px minmax(0,1fr); align-items: end; gap: 14px; }
.upgrade-field { display: grid; min-width: 0; gap: 9px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.upgrade-field select { width: 100%; min-width: 0; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #171923; color: var(--text); font: 500 12px "DM Sans", sans-serif; }
.upgrade-field select:focus { border-color: rgba(185,162,255,.55); box-shadow: 0 0 0 3px rgba(167,139,250,.1); }
.upgrade-field select:disabled { color: #777b8d; }
.upgrade-arrow { display: grid; width: 32px; height: 46px; place-items: center; color: #b7a4f5; font-size: 19px; }
.upgrade-preview { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 19px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.06); border-radius: 12px; background: rgba(255,255,255,.025); }
.upgrade-preview > div { display: grid; gap: 6px; }
.upgrade-preview .eyebrow { font-size: 8px; }
.upgrade-preview strong { color: #e8defe; font: 600 18px "Space Grotesk", sans-serif; }
.upgrade-target-price { text-align: right; }
.upgrade-wheel-wrap { position: relative; display: flex; align-items: center; flex-direction: column; margin: 22px auto 0; }
.upgrade-wheel { position: relative; display: grid; flex: 0 0 206px; width: 206px; height: 206px; place-items: center; border: 7px solid #292b39; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 10px 32px rgba(0,0,0,.28); }
.upgrade-wheel-disc { --chance-deg: 0deg; --wheel-rotation: 0deg; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #6bedb5 0deg var(--chance-deg), #363847 var(--chance-deg) 360deg); box-shadow: inset 0 0 18px rgba(0,0,0,.16); transform: rotate(var(--wheel-rotation)); }
.upgrade-wheel-pointer { --pointer-rotation: 0deg; position: absolute; inset: 0; z-index: 1; border-radius: 50%; transform: rotate(var(--pointer-rotation)); pointer-events: none; }
.upgrade-wheel-pointer::after { position: absolute; top: -8px; left: 50%; width: 0; height: 0; border-top: 12px solid #fff; border-right: 8px solid transparent; border-left: 8px solid transparent; filter: drop-shadow(0 1px 5px rgba(0,0,0,.55)); content: ""; transform: translateX(-50%); }
.upgrade-wheel-pointer.is-spinning { will-change: transform; transition: transform 6s cubic-bezier(.12,.78,.08,1); }
.upgrade-wheel-center { position: relative; z-index: 1; display: grid; flex: 0 0 88px; width: 88px; height: 88px; align-content: center; justify-items: center; gap: 3px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; background: radial-gradient(circle at 35% 25%, #292b3c, #191a25 75%); box-shadow: 0 2px 12px rgba(0,0,0,.35); }
.upgrade-wheel-center strong { color: #f3edff; font: 600 18px "Space Grotesk", sans-serif; }
.upgrade-wheel-center span { color: #9296a7; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.upgrade-wheel-caption { margin: 11px 0 0; color: #9a9cac; font-size: 10px; }
.upgrade-warning { margin: 14px 0 16px; color: #9a9cac; font-size: 11px; line-height: 1.65; }
.upgrade-button { width: 100%; min-height: 46px; border: 1px solid rgba(194,174,255,.32); border-radius: 11px; background: linear-gradient(110deg,#b9a5ff,#8f73e9); color: #1d1830; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 22px rgba(129,99,215,.18); transition: transform .18s, filter .18s, opacity .18s; }
.upgrade-button:not(:disabled):hover { filter: brightness(1.1); transform: translateY(-2px); }
.upgrade-button:active:not(:disabled) { transform: scale(.985); }
.upgrade-button:disabled { opacity: .43; cursor: not-allowed; box-shadow: none; }
.upgrade-result { min-height: 16px; margin: 11px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.upgrade-result.upgrade-success { color: var(--mint); animation: reveal-pop .32s ease-out both; }
.upgrade-result.upgrade-failure { color: #ff9aab; animation: reveal-pop .32s ease-out both; }
.upgrade-history-section, .upgrade-activity-section { padding-top: 34px; }
.history-count { display: grid; min-width: 26px; height: 26px; padding: 0 7px; place-items: center; border: 1px solid rgba(167,139,250,.16); border-radius: 20px; background: rgba(167,139,250,.07); color: #c6b5ff; font: 600 11px "Space Grotesk", sans-serif; }
.upgrade-history-list, .upgrade-activity-list { display: grid; gap: 8px; }
.upgrade-history-item, .upgrade-activity-item { display: grid; min-width: 0; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: linear-gradient(110deg, rgba(255,255,255,.025), rgba(255,255,255,.008)), var(--panel); }
.history-outcome-mark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(120,235,196,.18); border-radius: 9px; background: rgba(120,235,196,.07); color: var(--mint); font-size: 15px; font-weight: 700; }
.is-failure .history-outcome-mark { border-color: rgba(255,154,171,.17); background: rgba(255,154,171,.06); color: #ff9aab; }
.history-main { display: grid; min-width: 0; gap: 4px; }
.history-main strong { overflow: hidden; color: #e8e4f2; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.history-main strong span { padding: 0 4px; color: #9c8acb; }
.history-main > span { color: #858899; font-size: 9px; }
.history-outcome { padding: 4px 7px; border: 1px solid rgba(120,235,196,.13); border-radius: 20px; background: rgba(120,235,196,.045); color: var(--mint); font-size: 9px; white-space: nowrap; }
.is-failure .history-outcome { border-color: rgba(255,154,171,.13); background: rgba(255,154,171,.04); color: #ff9aab; }
.upgrade-history-empty { margin: 0; padding: 18px; border: 1px dashed rgba(255,255,255,.11); border-radius: 11px; color: #858899; font-size: 11px; text-align: center; }
.upgrade-history-empty[hidden] { display: none; }
.upgrade-activity-item { grid-template-columns: minmax(105px, .7fr) minmax(0, 1fr) auto; }
.activity-user { display: grid; min-width: 0; gap: 3px; color: #d3c8f3; font-size: 10px; font-weight: 600; }
.activity-user span { color: #777b8d; font-size: 8px; font-weight: 500; text-transform: uppercase; }
.activity-attempt { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 6px; color: #a9a9ba; font-size: 9px; }
.activity-attempt > span:first-child, .activity-attempt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-attempt strong { color: #e8e4f2; font-size: 9px; font-weight: 600; }
.activity-arrow { color: #a995ed; }
.upgrade-outcome-dialog { position: fixed; width: min(360px, calc(100% - 32px)); max-height: min(560px, calc(100% - 32px)); margin: auto; padding: 30px 22px 24px; overflow: auto; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: radial-gradient(ellipse at 50% 30%, rgba(120,235,196,.09), transparent 68%), #191c27; color: var(--text); text-align: center; box-shadow: 0 24px 100px rgba(0,0,0,.62); }
.upgrade-outcome-dialog::backdrop { background: rgba(7,8,13,.78); backdrop-filter: blur(7px); }
.upgrade-outcome-dialog.is-success { border-color: rgba(120,235,196,.24); }
.upgrade-outcome-dialog.is-failure { border-color: rgba(255,154,171,.22); background: radial-gradient(ellipse at 50% 30%, rgba(255,154,171,.07), transparent 68%), #191c27; }
.upgrade-outcome-dialog.is-success[open], .upgrade-outcome-dialog.is-failure[open] { animation: reveal-pop .45s cubic-bezier(.2,.8,.2,1) both; }
.upgrade-outcome-dialog .dialog-close { top: 9px; right: 12px; }
.upgrade-outcome-dialog > .eyebrow { margin: 0; color: var(--mint); font-size: 9px; }
.upgrade-outcome-dialog.is-failure > .eyebrow { color: #ff9aab; }
.upgrade-outcome-art { display: grid; width: 120px; height: 120px; margin: 8px auto; place-items: center; color: #f3cf75; font-size: 44px; }
.upgrade-outcome-art svg { display: block; width: 100%; height: 100%; }
.upgrade-outcome-art.has-tgs .upgrade-outcome-fallback { display: none; }
.upgrade-outcome-dialog.is-success .upgrade-outcome-art { animation: outcome-gift-arrive .6s cubic-bezier(.2,.8,.2,1) both; }
.upgrade-outcome-art.is-disappearing { animation: outcome-gift-vanish .8s cubic-bezier(.55,.05,.8,.3) forwards; }
.upgrade-outcome-dialog h2 { margin: 0 0 8px; font-size: 19px; }
.upgrade-outcome-dialog.is-success h2 { color: var(--mint); }
.upgrade-outcome-dialog.is-failure h2 { color: #ff9aab; }
.upgrade-outcome-dialog > p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.back-to-cases { display: inline-flex; margin-top: 22px; color: #c9b9fb; font-size: 12px; font-weight: 600; }
.back-to-cases:hover { color: #fff; }
.profile-heading { margin-bottom: 16px; }
.profile-heading h2 { font-size: 24px; }
.inventory-count { display: inline-grid; min-width: 22px; height: 22px; margin-left: 4px; place-items: center; border-radius: 20px; background: rgba(167,139,250,.16); color: #c6b5ff; font: 600 12px "DM Sans", sans-serif; vertical-align: 3px; }
.reset-button { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: #a5a6b3; font-size: 10px; cursor: pointer; }
.reset-button:hover { border-color: rgba(255,255,255,.22); color: var(--text); }
.inventory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.inventory-item { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.gift-art { position: relative; overflow: hidden; }
.gift-animation { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); }
.gift-animation svg { display: block; width: 100%; height: 100%; }
.gift-type { display: block; margin-bottom: 7px; color: #b7a4f5; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.gift-art { display: grid; width: 88px; max-width: 100%; height: 88px; margin: 0 auto 12px; place-items: center; border-radius: 10px; background: radial-gradient(circle, var(--gift-glow), transparent 66%), #202230; color: var(--gift-color); font-size: 35px; }
.inventory-item h3 { margin: 0 0 4px; font-size: 13px; }
.inventory-item p { margin: 0; color: var(--muted); font-size: 10px; }
.sell-button { width: 100%; margin-top: 14px; padding: 9px 6px; border: 1px solid rgba(120,235,196,.2); border-radius: 8px; background: rgba(120,235,196,.08); color: var(--mint); font-size: 10px; font-weight: 700; cursor: pointer; }
.sell-button:hover { background: rgba(120,235,196,.16); }
.gift-actions { display: grid; gap: 7px; }
.gift-actions .sell-button { margin-top: 14px; }
.sell-button:disabled { opacity: .42; cursor: not-allowed; }
.withdraw-button { width: 100%; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.018); color: #747888; font-size: 9px; cursor: not-allowed; }
.withdraw-button:not(:disabled) { border-color: rgba(183,162,255,.24); background: rgba(167,139,250,.1); color: #d7caff; cursor: pointer; }
.withdraw-button:not(:disabled):hover { border-color: rgba(183,162,255,.42); background: rgba(167,139,250,.17); }
.withdrawal-item-status { margin: 0; color: #b7a4f5; font-size: 9px; line-height: 1.5; }
.withdraw-note { margin: 13px 0 0; color: #838798; font-size: 10px; text-align: center; }
.inventory-empty { margin: 0; padding: 34px 16px; border: 1px dashed rgba(255,255,255,.13); border-radius: 14px; color: #7e8191; text-align: center; font-size: 12px; }

footer { display: flex; justify-content: space-between; margin-top: 68px; padding: 22px 0; border-top: 1px solid var(--line); color: #b4a3ec; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
footer a { color: #9295a4; font-weight: 500; letter-spacing: 0; }
.footer-muted { color: #6f7281; font-weight: 500; }

.result-dialog { position: fixed; width: min(380px, calc(100% - 32px)); padding: 32px; border: 1px solid rgba(194,174,255,.23); border-radius: 22px; background: #1b1d29; color: var(--text); text-align: center; box-shadow: 0 22px 100px rgba(0,0,0,.55); }
.result-dialog [hidden] { display: none !important; }
.result-dialog::backdrop { background: rgba(7,8,13,.75); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; color: #9698a7; font-size: 24px; cursor: pointer; }
.dialog-close:disabled { visibility: hidden; }
.result-glow { display: grid; width: 78px; height: 78px; margin: 4px auto 18px; place-items: center; border: 1px solid rgba(207,187,255,.28); border-radius: 24px; background: radial-gradient(circle, rgba(167,139,250,.4), rgba(167,139,250,.08)); color: #e4d8ff; font-size: 42px; }
.result-dialog h2 { margin: 8px 0 16px; font-size: 25px; }
.result-gift { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; }
.result-animation { width: 70px; height: 70px; }
.result-animation svg { display: block; width: 100%; height: 100%; }
.result-hint { margin: 8px 0 19px; color: var(--muted); font-size: 11px; }
.primary-button { padding: 12px 18px; }
.opening-stage, .opening-reveal { min-height: 250px; }
.opening-stage { display: flex; align-items: center; flex-direction: column; justify-content: center; }
.opening-stage h2 { margin: 2px 0 0; }
.opening-stage .result-hint { margin-bottom: 0; }
.opening-case-wrap { position: relative; display: grid; width: 150px; height: 150px; margin: 10px 0 14px; place-items: center; }
.opening-ring { position: absolute; inset: 14px; border: 1px solid rgba(193,176,255,.35); border-radius: 50%; box-shadow: 0 0 40px rgba(167,139,250,.16), inset 0 0 30px rgba(167,139,250,.08); }
.opening-case { z-index: 1; display: grid; width: 86px; height: 78px; place-items: center; border: 1px solid rgba(222,209,255,.45); border-radius: 23px; background: linear-gradient(145deg,#b8a0ff,#7757d0 68%,#473080); box-shadow: 0 18px 48px rgba(125,86,220,.4),inset 0 1px 0 rgba(255,255,255,.55); color: #f6f1ff; font-size: 43px; transform: rotate(-8deg); }
.opening-spark { position: absolute; z-index: 2; color: #e4d9ff; }
.opening-spark-one { top: 15px; left: 18px; font-size: 25px; }
.opening-spark-two { right: 12px; bottom: 24px; color: #f3cf75; font-size: 18px; }
.opening-spark-three { top: 22px; right: 22px; font-size: 36px; }
.is-opening .opening-ring { animation: opening-pulse .65s ease-in-out infinite alternate; }
.is-opening .opening-case { animation: opening-shake .16s linear infinite alternate; }
.is-opening .opening-spark { animation: opening-twinkle .45s ease-in-out infinite alternate; }
.is-revealed .opening-reveal { animation: reveal-pop .42s cubic-bezier(.2,.8,.2,1) both; }
.is-revealed .result-glow { animation: reveal-glow .8s ease-out both; }
.primary-button:disabled { opacity: .5; cursor: wait; }
@keyframes opening-shake {
  from { transform: translateX(-5px) rotate(-13deg); }
  to { transform: translateX(5px) rotate(-3deg); }
}
@keyframes opening-pulse {
  from { opacity: .45; transform: scale(.88); }
  to { opacity: 1; transform: scale(1.08); }
}
@keyframes opening-twinkle {
  from { opacity: .35; scale: .8; }
  to { opacity: 1; scale: 1.2; }
}
@keyframes reveal-pop {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes reveal-glow {
  from { box-shadow: 0 0 0 rgba(167,139,250,0); transform: scale(.75) rotate(-12deg); }
  to { box-shadow: 0 0 38px rgba(167,139,250,.25); transform: scale(1) rotate(0); }
}
@keyframes outcome-gift-arrive {
  from { opacity: 0; transform: translateY(14px) scale(.65) rotate(-10deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes outcome-gift-vanish {
  0% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
  55% { opacity: .8; transform: scale(.78) rotate(-8deg); filter: blur(1px); }
  100% { opacity: 0; transform: scale(.08) rotate(25deg); filter: blur(7px); }
}
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: calc(100% - 40px); padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: #252735; color: var(--text); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 720px) {
  .app-shell { width: min(100% - 32px, 520px); }
  .topbar { height: 70px; }
  .hero { min-height: 370px; align-items: flex-start; margin-top: 16px; padding: 35px 25px; }
  .hero-art { top: 80%; right: -58px; width: 140px; height: 140px; opacity: .24; }
  .hero-gem { inset: 55px; border-radius: 24px; font-size: 62px; }
  .hero-description { max-width: 240px; }
  .info-note { right: 16px; bottom: 14px; left: 16px; font-size: 10px; line-height: 1.4; }
  .case-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .case-card { min-width: 0; min-height: 0; padding: 10px 8px; border-radius: 13px; }
  .case-topline { min-height: 17px; }
  .case-number { font-size: 8px; letter-spacing: .3px; }
  .case-tag { display: none; }
  .case-visual { height: 57px; }
  .case-box { width: 43px; height: 40px; border-radius: 12px; font-size: 22px; }
  .case-card h3 { min-height: 30px; margin-top: 5px; font-size: 12px; line-height: 1.2; letter-spacing: -.3px; }
  .case-description { display: none; }
  .case-bottom { align-items: stretch; flex-direction: column; gap: 7px; margin-top: 8px; }
  .case-price { gap: 4px; font-size: 10px; white-space: nowrap; }
  .open-button { min-height: 36px; padding: 7px 3px; font-size: 9px; }
  .odds-toggle { min-height: 38px; margin-top: 5px; font-size: 9px; line-height: 1.2; }
  .odds-list li { font-size: 9px; }
  .inventory-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding-top: 46px; }
  .profile-section { padding-top: 25px; }
  .profile-card { align-items: stretch; flex-direction: column; gap: 16px; padding: 17px; }
  .profile-avatar { width: 48px; height: 48px; font-size: 21px; }
  .profile-details h2 { font-size: 19px; }
  .profile-balance { align-self: stretch; }
  .profile-heading { align-items: center; }
  .profile-page-hero { padding-top: 34px; }
  .profile-page-card { margin-top: 10px; }
  .profile-page-section, .upgrader-section { padding-top: 36px; }
  .upgrade-history-section, .upgrade-activity-section { padding-top: 28px; }
  .upgrade-history-item, .upgrade-activity-item { gap: 7px; padding: 9px; }
  .upgrade-activity-item { grid-template-columns: minmax(68px, .55fr) minmax(0, 1fr) auto; }
  .activity-attempt { gap: 4px; font-size: 8px; }
  .activity-attempt strong { font-size: 8px; }
  .history-outcome { padding: 4px 6px; font-size: 8px; }
  .account-tools-section { padding-top: 28px; }
  .account-tools-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .account-tool-card { padding: 11px; }
  .star-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-tool-card h3 { margin-bottom: 9px; }
  .account-tool-form { margin-top: 8px; }
  .referral-stats { margin-top: 8px; }
  .promo-code-list { margin-top: 8px; }
  .account-tools-section > .section-heading { margin-bottom: 12px; }
  .hero-actions { gap: 7px 12px; }
  .hero-actions .text-link, .upgrader-link { margin-top: 18px; }
  .upgrader-card { padding: 16px; }
  .upgrade-fields { grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr); gap: 7px; }
  .upgrade-field select { padding-inline: 8px; font-size: 10px; }
  .upgrade-arrow { width: 24px; }
  .upgrade-preview { padding: 13px; }
  .upgrade-preview strong { font-size: 16px; }
  .profile-heading h2 { font-size: 21px; }
  .reset-button { min-height: 40px; }
  .sell-button, .odds-toggle { min-height: 44px; }
  .open-button { min-height: 40px; padding: 8px 3px; }
  .sell-button { padding: 10px 7px; }
  .withdraw-button { min-height: 38px; }
}

@media (max-width: 380px) {
  .brand { font-size: 17px; }
  .hero-art { right: -70px; }
  h1 { font-size: 43px; }
  .hero-description { max-width: 210px; }
  .profile-shortcut { gap: 7px; padding-right: 9px; font-size: 11px; }
  .case-grid { gap: 6px; }
  .case-card { padding-inline: 6px; }
  .case-number { font-size: 7px; }
  .case-price { font-size: 9px; }
  .open-button { font-size: 8px; }
  .odds-toggle { font-size: 8px; }
  .profile-heading { align-items: flex-start; gap: 8px; }
  .profile-heading h2 { font-size: 19px; }
  .profile-heading .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .reset-button { padding-inline: 8px; font-size: 9px; }
  .inventory-item { padding: 11px; }
  .inventory-item h3 { font-size: 12px; }
  .sell-button { font-size: 9px; }
  .upgrade-field { font-size: 8px; letter-spacing: .65px; }
  .upgrade-field select { font-size: 9px; }
  .upgrade-warning { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .upgrade-wheel-pointer.is-spinning { transition-duration: 1.2s !important; }
}

/* Motion and finish */
body {
  background:
    radial-gradient(ellipse at 8% 35%, rgba(80, 119, 190, .075), transparent 28rem),
    radial-gradient(ellipse at 92% 70%, rgba(142, 91, 220, .09), transparent 30rem),
    radial-gradient(ellipse at 80% 6%, rgba(119, 88, 206, .13), transparent 30rem),
    var(--bg);
}

.topbar { position: relative; }
.topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 164, 255, .36), transparent);
  content: "";
}

.brand-mark { box-shadow: 0 5px 20px rgba(130, 100, 231, .28); transition: transform .25s, box-shadow .25s; }
.brand:hover .brand-mark { transform: rotate(-9deg) scale(1.08); box-shadow: 0 7px 25px rgba(160, 130, 255, .45); }
.profile-shortcut { transition: border-color .2s, background .2s, transform .2s; }
.profile-shortcut:hover { transform: translateY(-2px); border-color: rgba(192, 172, 255, .38); background: rgba(167, 139, 250, .1); }

.hero {
  isolation: isolate;
  background:
    radial-gradient(ellipse at 76% 45%, rgba(143, 111, 244, .24), transparent 34%),
    radial-gradient(ellipse at 18% 110%, rgba(86, 190, 166, .09), transparent 42%),
    linear-gradient(118deg, #191c2b, #1a1b29 58%, #242039);
  box-shadow: 0 22px 65px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255,255,255,.035);
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(226, 218, 255, .28) .7px, transparent .7px);
  background-size: 30px 30px;
  content: "";
  mask-image: linear-gradient(90deg, transparent 35%, #000);
  opacity: .14;
}
.hero-art { animation: hero-drift 7s ease-in-out infinite; }
.hero-gem { animation: gem-float 5s ease-in-out infinite; }
.orbit-one { animation: orbit-turn 22s linear infinite; }
.orbit-two { animation: orbit-turn 28s linear infinite reverse; }
.spark-one { animation: sparkle 2.4s ease-in-out infinite; }
.spark-two { animation: sparkle 1.8s .5s ease-in-out infinite; }
.spark-three { animation: sparkle 2.1s 1s ease-in-out infinite; }
.status-dot { animation: status-glow 2.2s ease-in-out infinite; }

.section-heading { position: relative; }
.section-heading h2 { text-shadow: 0 3px 22px rgba(196, 177, 255, .08); }
.section-count { padding: 6px 9px; border: 1px solid rgba(255,255,255,.075); border-radius: 20px; background: rgba(255,255,255,.025); }

.case-card {
  isolation: isolate;
  border-color: rgba(255,255,255,.075);
  background:
    radial-gradient(ellipse at 50% 34%, color-mix(in srgb, var(--case-glow), transparent 91%), transparent 58%),
    linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.012) 55%),
    var(--panel);
  box-shadow: 0 10px 24px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.035);
  animation: card-arrive .55s both;
}
.case-card:nth-child(2) { animation-delay: 80ms; }
.case-card:nth-child(3) { animation-delay: 160ms; }
.case-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--case-glow), transparent 75%), transparent 42%);
  content: "";
  opacity: .38;
  pointer-events: none;
}
.case-card::after { transition: opacity .25s, transform .35s; }
.case-card:hover::after { transform: scale(1.3); opacity: .3; }
.case-box {
  position: relative;
  box-shadow: 0 12px 35px color-mix(in srgb, var(--case-glow), transparent 78%), inset 0 1px 0 rgba(255,255,255,.55);
  transition: box-shadow .25s, filter .25s;
}
.case-box::after {
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: inherit;
  content: "";
}
.case-card:hover .case-box { filter: brightness(1.12); box-shadow: 0 15px 44px color-mix(in srgb, var(--case-glow), transparent 64%), inset 0 1px 0 rgba(255,255,255,.65); }
.case-card h3 { transition: color .2s; }
.case-card:hover h3 { color: #fff; }
.open-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(110deg, #e8defe, #c9b9fb);
  box-shadow: 0 4px 14px rgba(167,139,250,.13);
}
.open-button::after {
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: -60%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  content: "";
  transform: skewX(-20deg);
  transition: left .5s;
}
.open-button:hover::after { left: 130%; }
.open-button:active, .sell-button:active, .primary-button:active { transform: scale(.96); }
.case-card:has(.open-button:disabled) { filter: saturate(.72); }
.odds-toggle { transition: color .18s; }
.odds-list { animation: odds-drop .22s ease-out both; }

.profile-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 95% 0%, rgba(167,139,250,.12), transparent 48%),
    linear-gradient(115deg, rgba(167,139,250,.1), rgba(255,255,255,.025) 65%),
    var(--panel);
  box-shadow: 0 12px 36px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.035);
}
.profile-card::after {
  position: absolute;
  top: -60px;
  right: 20%;
  width: 180px;
  height: 130px;
  border-radius: 50%;
  background: rgba(148, 117, 237, .12);
  content: "";
  filter: blur(40px);
  pointer-events: none;
}
.profile-avatar { box-shadow: 0 8px 26px rgba(125, 86, 220, .24), inset 0 1px 0 rgba(255,255,255,.4); }
.profile-balance { transition: border-color .2s, background .2s; }
.profile-balance:hover { border-color: rgba(243,207,117,.25); background: rgba(243,207,117,.045); }
.inventory-item {
  position: relative;
  overflow: hidden;
  box-shadow: 0 9px 23px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.025);
  transition: transform .22s, border-color .22s, box-shadow .22s;
  animation: card-arrive .45s both;
}
.inventory-item:hover { transform: translateY(-4px); border-color: rgba(193,176,255,.3); box-shadow: 0 15px 34px rgba(0,0,0,.2), 0 0 24px rgba(167,139,250,.06); }
.gift-art { box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.sell-button { transition: background .18s, border-color .18s, transform .18s; }
.sell-button:hover { border-color: rgba(120,235,196,.38); box-shadow: 0 0 18px rgba(120,235,196,.07); }
.reset-button { transition: color .18s, border-color .18s, background .18s; }
.reset-button:hover { background: rgba(255,255,255,.045); }
.inventory-empty { background: linear-gradient(120deg, rgba(255,255,255,.012), transparent); }

.reveal-section { opacity: 0; transform: translateY(18px); transition: opacity .65s ease var(--reveal-delay, 0ms), transform .65s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms); }
.reveal-section.is-visible { opacity: 1; transform: translateY(0); }
.toast { backdrop-filter: blur(14px); box-shadow: 0 10px 36px rgba(0,0,0,.28); }
.result-dialog { border-color: rgba(194,174,255,.28); background: radial-gradient(ellipse at 50% 0, rgba(127,99,208,.16), transparent 55%), #1b1d29; }

@keyframes hero-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
@keyframes gem-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -7px; }
}
@keyframes orbit-turn { to { rotate: 360deg; } }
@keyframes sparkle {
  0%, 100% { opacity: .55; scale: .88; }
  50% { opacity: 1; scale: 1.15; }
}
@keyframes status-glow {
  0%, 100% { box-shadow: 0 0 6px var(--mint); }
  50% { box-shadow: 0 0 14px var(--mint); }
}
@keyframes card-arrive {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes odds-drop {
  from { opacity: 0; translate: 0 -5px; }
  to { opacity: 1; translate: 0 0; }
}

@media (max-width: 720px) {
  .case-card:hover { transform: none; }
  .case-card:active { transform: scale(.985); }
}

/* Small visual refinements that preserve the existing palette and layout. */
:where(a, button, input, select):focus-visible {
  outline: 2px solid rgba(193, 164, 255, .8);
  outline-offset: 3px;
}

.brand { transition: opacity .2s ease; }
.brand:hover { opacity: .9; }
.brand-mark { box-shadow: 0 4px 16px rgba(130, 100, 231, .22), inset 0 1px 0 rgba(255,255,255,.42); }
.profile-shortcut { transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.profile-shortcut:hover { box-shadow: 0 6px 18px rgba(125,86,220,.1); }

.profile-card { box-shadow: 0 12px 32px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.045); }
.profile-avatar { border-color: rgba(235,226,255,.48); box-shadow: 0 6px 20px rgba(125,86,220,.2), inset 0 1px 0 rgba(255,255,255,.4); }
.profile-id span { display: inline-block; padding: 3px 7px; border: 1px solid rgba(193,176,255,.12); border-radius: 6px; background: rgba(167,139,250,.06); }
.profile-balance { border-color: rgba(243,207,117,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); transition: border-color .2s, background .2s, transform .2s; }
.profile-balance:hover { transform: translateY(-1px); border-color: rgba(243,207,117,.26); }
.profile-balance strong { font-family: "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }

.inventory-item { border-color: rgba(255,255,255,.075); background: linear-gradient(160deg, rgba(255,255,255,.035), transparent 60%), var(--panel); }
.gift-art { border: 1px solid rgba(255,255,255,.045); box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 8px 18px rgba(0,0,0,.12); }
.inventory-item h3 { letter-spacing: -.2px; }
.sell-button, .withdraw-button { transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
.sell-button:hover { border-color: rgba(120,235,196,.36); box-shadow: 0 5px 16px rgba(120,235,196,.07); }
.sell-button:active:not(:disabled), .secondary-button:active:not(:disabled), .reset-button:active:not(:disabled) { transform: scale(.98); }
.withdraw-button { border-color: rgba(255,255,255,.065); }

.account-tool-card { border-color: rgba(255,255,255,.075); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); transition: border-color .2s, background .2s; }
.account-tool-card:hover { border-color: rgba(193,176,255,.19); }
.account-tool-card h3 { letter-spacing: -.25px; }
.copy-link-row input { transition: border-color .18s, box-shadow .18s; }
.copy-link-row input[readonly] { text-overflow: ellipsis; }
.secondary-button { transition: border-color .18s, background .18s, transform .18s; }
.referral-stats > div, .promo-code-list li { transition: border-color .18s, background .18s; }
.referral-stats > div:hover, .promo-code-list li:hover { border-color: rgba(193,176,255,.15); background: rgba(255,255,255,.035); }
.promo-status { padding: 3px 6px; border: 1px solid rgba(120,235,196,.12); border-radius: 20px; background: rgba(120,235,196,.045); white-space: nowrap; }
.promo-status.is-used { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.025); }

.upgrader-card { border-color: rgba(183,162,255,.2); box-shadow: 0 14px 40px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.04); }
.upgrade-field select { transition: border-color .18s, box-shadow .18s, background .18s; }
.upgrade-preview { border-color: rgba(255,255,255,.075); }
.upgrade-preview strong { font-variant-numeric: tabular-nums; }
.upgrade-wheel { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 12px 30px rgba(0,0,0,.3); }
.upgrade-wheel-disc { box-shadow: inset 0 0 20px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.06); }
.upgrade-button { letter-spacing: .1px; }
.upgrade-button:not(:disabled):active { box-shadow: 0 3px 12px rgba(129,99,215,.15); }
.upgrade-outcome-dialog { border-color: rgba(194,174,255,.25); }
.upgrade-outcome-dialog .dialog-close { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; background: rgba(255,255,255,.035); transition: color .18s, background .18s, border-color .18s; }
.upgrade-outcome-dialog .dialog-close:hover { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hero-art, .hero-gem, .orbit-one, .orbit-two, .spark-one, .spark-two, .spark-three,
  .status-dot, .case-card, .opening-ring, .opening-case, .opening-spark, .opening-reveal,
  .result-glow, .inventory-item, .odds-list, .upgrade-result,
  .upgrade-outcome-dialog, .upgrade-outcome-art {
    animation: none !important;
  }
  .reveal-section { opacity: 1; transform: none; transition: none; }
  .open-button::after { display: none; }
}
