:root,
body[data-theme="ghost"] {
  --bg-0: #071326;
  --bg-1: #0b2f58;
  --bg-2: #3daee9;
  --surface: rgba(10, 30, 64, 0.56);
  --surface-strong: rgba(8, 23, 50, 0.84);
  --surface-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(165, 224, 255, 0.22);
  --text: #f5fbff;
  --text-soft: #b6d0e9;
  --accent: #55cfff;
  --accent-strong: #15b4ff;
  --accent-faint: rgba(85, 207, 255, 0.22);
  --ok: #86efc6;
  --danger: #ff9ebb;
  --shadow: 0 22px 60px rgba(2, 10, 25, 0.42);
}

body[data-theme="dark"] {
  --bg-0: #07090d;
  --bg-1: #151a24;
  --bg-2: #2a3342;
  --surface: rgba(18, 23, 32, 0.74);
  --surface-strong: rgba(12, 15, 21, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(202, 214, 233, 0.13);
  --text: #f7f9fc;
  --text-soft: #9aa8bd;
  --accent: #dbe7f7;
  --accent-strong: #aab7cb;
  --accent-faint: rgba(219, 231, 247, 0.18);
  --ok: #8be3c5;
  --danger: #ff9cb3;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

body[data-theme="pink"] {
  --bg-0: #45102a;
  --bg-1: #9a3a68;
  --bg-2: #f2a4c9;
  --surface: rgba(137, 25, 82, 0.32);
  --surface-strong: rgba(104, 22, 68, 0.55);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 231, 241, 0.3);
  --text: #fff8fc;
  --text-soft: #ffd7e9;
  --accent: #ffd7ea;
  --accent-strong: #ffaed1;
  --accent-faint: rgba(255, 174, 209, 0.2);
  --ok: #98f1cc;
  --danger: #fff0f7;
  --shadow: 0 22px 60px rgba(79, 13, 47, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 720px at 0% 0%, rgba(100, 213, 255, 0.28), transparent 60%),
    radial-gradient(900px 700px at 100% 20%, rgba(255, 170, 208, 0.18), transparent 62%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  overflow-x: hidden;
}

.backdrop {
  position: fixed;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.48;
  z-index: 0;
  pointer-events: none;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: -90px;
  left: -80px;
  background: rgba(113, 219, 255, 0.82);
}

.orb-b {
  width: 320px;
  height: 320px;
  right: -120px;
  top: 22%;
  background: rgba(120, 160, 255, 0.45);
}

.orb-c {
  width: 280px;
  height: 280px;
  left: 32%;
  bottom: -120px;
  background: rgba(255, 162, 213, 0.26);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 14px 120px;
}

.liquid-glass-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.panel {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.08), var(--surface));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.12);
}

.panel-subtle {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface-strong);
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 68px 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(6, 15, 31, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 1.2rem;
}

.brand p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.theme-switcher {
  display: inline-flex;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  position: absolute;
  left: 50%;
  top: calc(50% + 12px);
  transform: translate(-50%, -50%);
  justify-self: center;
  align-self: center;
}

.theme-button,
.icon-action,
.ghost-button,
.primary-button,
.nav-button,
.chip-button,
.action-tile {
  font: inherit;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

.theme-button,
.icon-action {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: transparent;
  color: var(--text-soft);
}

.theme-button.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
}

.icon-action {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.support-link {
  position: absolute;
  top: 16px;
  right: 18px;
  justify-self: end;
  align-self: start;
  transform: none;
}

.theme-button:hover,
.icon-action:hover,
.ghost-button:hover,
.primary-button:hover,
.nav-button:hover,
.chip-button:hover,
.action-tile:hover,
.danger-button:hover {
  transform: translateY(-2px);
}

.theme-button:active,
.icon-action:active,
.ghost-button:active,
.primary-button:active,
.nav-button:active,
.chip-button:active,
.action-tile:active,
.danger-button:active {
  transform: scale(0.97);
  filter: saturate(1.06);
}

.empty-state {
  margin-top: 16px;
  padding: 28px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.access-denied-meta {
  margin-top: 18px;
  text-align: left;
}

.dashboard {
  margin-top: 16px;
}

.hero-card {
  padding: 20px;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(116, 214, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 2rem;
  font-weight: 800;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.hero-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hero-heading h2 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.02;
}

.hero-username,
.hero-subtitle {
  margin: 8px 0 0;
}

.hero-username {
  color: var(--text-soft);
  font-weight: 700;
}

.hero-subtitle {
  color: var(--text);
  opacity: 0.94;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  font-weight: 800;
  flex-shrink: 0;
}

.status-pill[data-status="active"],
.status-pill[data-status="trial"] {
  background: linear-gradient(145deg, var(--ok), #ddfff1);
  color: #062f27;
  border-color: transparent;
}

.status-pill[data-status="none"],
.status-pill[data-status="missing"] {
  background: linear-gradient(145deg, #ffc5d5, #ff96b0);
  color: #5a1227;
  border-color: transparent;
}

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

.stat-card {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 1.06rem;
  line-height: 1.24;
}

.tab-screen {
  margin-top: 16px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 260ms ease,
    transform 260ms ease,
    filter 260ms ease;
}

.tab-screen.hidden {
  display: block !important;
  opacity: 0;
  transform: translateY(22px) scale(0.986);
  filter: blur(8px);
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}

.home-stack {
  display: grid;
  gap: 16px;
  position: relative;
}

.section-stack {
  display: grid;
  gap: 14px;
}

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

.actions-grid-home {
  order: -1;
}

.action-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  text-align: left;
  box-shadow: 0 16px 38px rgba(4, 12, 28, 0.14);
}

.action-primary {
  background: linear-gradient(145deg, rgba(83, 209, 255, 0.22), rgba(15, 180, 255, 0.18));
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: var(--accent-faint);
  flex-shrink: 0;
}

.action-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.action-copy strong {
  font-size: 1rem;
}

.action-copy span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.device-list,
.referral-list,
.server-options {
  display: grid;
  gap: 12px;
}

.device-card,
.referral-item,
.server-option {
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.device-card-head,
.referral-item-head,
.server-option-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.device-card-title,
.referral-item-title,
.server-option-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.device-card-meta,
.referral-item-meta,
.server-option-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.device-card-line,
.referral-item-line,
.server-option-line {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.danger-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 158, 187, 0.24);
  background: rgba(255, 158, 187, 0.14);
  color: var(--danger);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.server-option {
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.server-option.active {
  border-color: rgba(85, 207, 255, 0.45);
  background: linear-gradient(145deg, rgba(83, 209, 255, 0.16), rgba(15, 180, 255, 0.1));
  transform: translateY(-1px);
}

.server-option-check {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-soft);
  flex-shrink: 0;
}

.server-option.active .server-option-check {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
  border-color: transparent;
}

.discount-note {
  margin-top: 8px;
  color: var(--ok);
  font-size: 0.82rem;
  line-height: 1.4;
}

.info-card,
.link-card {
  padding: 18px;
}

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

.card-head h3 {
  margin: 0;
  font-size: 1rem;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.data-list {
  display: grid;
  gap: 8px;
}

.data-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row span:first-child {
  color: var(--text-soft);
}

.data-row span:last-child {
  text-align: right;
  overflow-wrap: anywhere;
}

.link-text {
  margin: 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  overflow-wrap: anywhere;
}

.link-actions,
.buy-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.buy-actions {
  justify-content: center;
}

.buy-block + .buy-block {
  margin-top: 16px;
}

.purchase-fixed-card {
  margin-top: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.purchase-fixed-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-soft);
}

.purchase-fixed-line strong {
  color: var(--text);
  font-size: 1rem;
}

.buy-label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-button {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
}

.chip-button.active {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #04192d;
}

.purchase-preview {
  margin-top: 18px;
  padding: 16px;
}

.preview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
}

.preview-line + .preview-line {
  margin-top: 10px;
}

.preview-line strong {
  color: var(--text);
}

.preview-status {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-weight: 700;
}

.preview-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.preview-breakdown .preview-line {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ghost-button,
.primary-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.buy-actions .ghost-button,
.buy-actions .primary-button {
  min-width: 220px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 26px rgba(5, 12, 30, 0.12);
}

.primary-button {
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #03182d;
  box-shadow: 0 14px 30px rgba(8, 184, 255, 0.24);
}

.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(880px, calc(100% - 28px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.014);
  -webkit-backdrop-filter: url("#liquidGlassNav") blur(2.5px) saturate(1.08);
  backdrop-filter: url("#liquidGlassNav") blur(2.5px) saturate(1.08);
  border-radius: 30px;
  z-index: 10;
  isolation: isolate;
  overflow: hidden;
  box-shadow:
    0 10px 24px rgba(3, 11, 24, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.bottom-nav::before,
.bottom-nav::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.bottom-nav::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.035) 22%, rgba(255, 255, 255, 0) 52%),
    radial-gradient(110% 130% at 14% 0%, rgba(255, 255, 255, 0.16), transparent 34%),
    radial-gradient(95% 125% at 100% 100%, rgba(115, 214, 255, 0.028), transparent 44%);
  opacity: 0.62;
}

.bottom-nav::after {
  inset: 1px;
  border-radius: 29px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.72;
}

.nav-button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 62px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.004);
  color: var(--text-soft);
  overflow: hidden;
}

.nav-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 32%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.nav-button span {
  font-size: 1.15rem;
}

.nav-button small {
  font-size: 0.74rem;
  font-weight: 800;
}

.nav-button.active {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -4px 8px rgba(255, 255, 255, 0.025),
    0 4px 10px rgba(2, 12, 31, 0.03);
}

.nav-button.active::before,
.nav-button:hover::before {
  opacity: 1;
}

.nav-button.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 7px;
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.025));
  opacity: 0.58;
  filter: blur(0.7px);
}

@supports not (hanging-punctuation: first) {
  .bottom-nav {
    -webkit-backdrop-filter: url("#liquidGlassNav") blur(2.5px) saturate(1.08);
    backdrop-filter: url("#liquidGlassNav") blur(2.5px) saturate(1.08);
  }
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 50;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.purchase-success {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(152, 255, 196, 0.18);
  background:
    radial-gradient(circle at top left, rgba(130, 255, 187, 0.18), transparent 55%),
    rgba(10, 24, 25, 0.72);
}

.purchase-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: rgba(120, 255, 170, 0.14);
  box-shadow: inset 0 0 0 1px rgba(164, 255, 198, 0.18);
}

.purchase-success-copy {
  display: grid;
  gap: 4px;
}

.purchase-success-copy strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.purchase-success-copy p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.purchase-success .primary-button {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    padding-right: 62px;
  }

  .brand {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .support-link {
    top: 14px;
    right: 14px;
  }

  .hero-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-heading {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 560px) {
  .app-shell {
    padding: 14px 12px 118px;
  }

  .topbar {
    padding-bottom: 44px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .theme-switcher {
    gap: 6px;
    top: calc(50% + 34px);
  }

  .support-link {
    top: 12px;
    right: 12px;
  }

  .theme-button,
  .icon-action {
    width: 38px;
    height: 38px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .data-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-row span:last-child {
    text-align: left;
  }

  .bottom-nav {
    bottom: 12px;
    width: calc(100% - 20px);
  }

  .nav-button small {
    font-size: 0.7rem;
  }
}
