:root {
  --bg: #080E1A;
  --card: #13203A;
  --accent: #4A9EFF;
  --accent-dim: rgba(74, 158, 255, 0.14);
  --gold: #C9A84C;
  --gold-dim: rgba(201, 168, 76, 0.16);
  --ok: #22D3A5;
  --text: #F3F6FC;
  --text-muted: #8CA0C4;
  --border: rgba(74, 158, 255, 0.16);
  --placeholder: rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(560px 320px at 50% -8%, rgba(74, 158, 255, 0.20), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 12px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 16px;
  height: 16px;
}

.logo-text {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(100deg, #dcebff 0%, var(--accent) 45%, #1c4faa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(74, 158, 255, 0.4);
}

/* ---------- Swipeable pages ---------- */

.viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}

.track {
  display: flex;
  width: 400%;
  height: 100%;
}

.page {
  width: 25%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 16px;
}

.eyebrow-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 2px 8px;
}

.eyebrow-label:first-child {
  margin-top: 4px;
}

/* ---------- Tab bar ---------- */

.tabbar {
  display: flex;
  flex-shrink: 0;
  margin: 0 14px max(14px, env(safe-area-inset-bottom));
  padding: 8px 6px;
  background: rgba(19, 32, 58, 0.72);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  padding: 8px 0 6px;
  cursor: pointer;
  border-radius: 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tab:active {
  transform: scale(0.94);
}

.tab.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.tab-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width 0.2s ease;
}

.tab.active .tab-icon {
  stroke-width: 2;
}

.tab-dot {
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tab.active .tab-dot {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Hero status card ---------- */

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(74, 158, 255, 0.16), rgba(19, 32, 58, 0.92) 55%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px 20px 20px;
  margin: 6px 0 14px;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.hero-icon-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 165, 0.28), transparent 72%);
  animation: heroPulse 2.6s ease-in-out infinite;
}

.hero-icon-ring.inactive {
  background: radial-gradient(circle, rgba(140, 160, 196, 0.2), transparent 72%);
  animation: none;
}

@keyframes heroPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}

.hero-icon {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent), #1c4faa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 22px rgba(74, 158, 255, 0.4);
}

.hero-icon svg {
  width: 26px;
  height: 26px;
}

.hero-icon.inactive {
  background: linear-gradient(160deg, #33445e, #1a2537);
  box-shadow: none;
}

.hero-status {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hero-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-metrics {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hero-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.hero-metric-value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Generic glass card ---------- */

.glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 14px;
}

.status-line span:first-child {
  color: var(--text-muted);
}

/* ---------- Big tariff card ---------- */

.big-tariff {
  background: linear-gradient(155deg, rgba(74, 158, 255, 0.2), var(--card) 60%);
  border: 1px solid var(--accent);
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.big-tariff:active {
  transform: scale(0.98);
}

.big-tariff-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.big-tariff-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.big-tariff-icon svg {
  width: 20px;
  height: 20px;
}

.big-tariff-title {
  font-size: 15.5px;
  font-weight: 700;
}

.big-tariff-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.big-tariff-price {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.big-tariff-price b {
  color: var(--gold);
  font-size: 14px;
}

.big-tariff-cta {
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(135deg, var(--accent), #1c4faa);
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 13px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(74, 158, 255, 0.32);
}

/* ---------- Row cards ---------- */

.row-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 15px;
  border-radius: 20px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.2s ease;
}

.row-card:active {
  transform: scale(0.97);
}

.row-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.row-icon.gold {
  background: var(--gold-dim);
  color: var(--gold);
}

.row-icon svg {
  width: 19px;
  height: 19px;
}

.row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.row-title {
  font-size: 14.5px;
  font-weight: 600;
}

.row-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-badge {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold);
}

.row-cta {
  flex-shrink: 0;
  background: var(--accent);
  color: #06101f;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 11px;
  padding: 8px 13px;
}

.row-chev {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.row-chev svg {
  width: 100%;
  height: 100%;
}

/* ---------- Tariffs / picker lists (inside sheet) ---------- */

.tariffs-list {
  padding-top: 2px;
}

.tariff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tariff-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(74, 158, 255, 0.25);
}

.tariff-card .price {
  color: var(--accent);
  font-weight: 700;
}

.tariff-card .discount {
  display: inline-block;
  margin-left: 7px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-dim);
  border-radius: 6px;
  padding: 1px 6px;
}

.pay-btn,
.share-btn,
.sheet-cta {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #1c4faa);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 6px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(74, 158, 255, 0.32);
  transition: transform 0.2s ease;
}

.pay-btn:active,
.share-btn:active,
.sheet-cta:active,
.copy-btn:active {
  transform: scale(0.97);
}

.copy-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #06101f;
  border: none;
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.referral-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.referral-link-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.amount-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  padding: 9px 14px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.amount-chip:active {
  transform: scale(0.97);
}

.amount-chip.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--accent);
}

.amount-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.amount-input-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-family: inherit;
}

.amount-input-box input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.amount-input-box span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Sheet (bottom modal) ---------- */

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
}

.sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
}

.sheet-overlay.open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
  margin: 8px auto 16px;
}

.sheet-content h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

/* ---------- Profile page ---------- */

.profile-head {
  text-align: center;
  padding: 14px 0 10px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--accent), #1c4faa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 28px;
  font-weight: 700;
  margin: 0 auto 12px;
  box-shadow: 0 8px 22px rgba(74, 158, 255, 0.35);
}

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

.profile-name {
  font-size: 18px;
  font-weight: 600;
}

.profile-username {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.refcode-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px 15px;
}

.refcode-value {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.refcode-copy {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.refcode-copy:active {
  transform: scale(0.92);
}

.refcode-copy svg {
  width: 16px;
  height: 16px;
}

.balance-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
  margin-top: 14px;
}

.balance-icon {
  flex-shrink: 0;
  width: 63px;
  height: 63px;
  border-radius: 19px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.balance-icon svg {
  width: 30px;
  height: 30px;
}

.balance-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.balance-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.balance-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.balance-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.balance-action {
  width: 57px;
  height: 57px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: transform 0.2s ease;
}

.balance-action:active {
  transform: scale(0.9);
}

.balance-action svg {
  width: 26px;
  height: 26px;
}

.balance-action.deposit {
  background: var(--accent);
  color: #06101f;
}

.balance-action.withdraw {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

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

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 8px;
  text-align: center;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-value.gold {
  color: var(--gold);
}

.stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.menu-list {
  margin-top: 2px;
}

.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.menu-row:last-child {
  border-bottom: none;
}

.menu-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-row-icon svg {
  width: 16px;
  height: 16px;
}

.menu-row-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.menu-row-chev {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---------- Support page ---------- */

.support-btn-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--accent), #1c4faa);
  border: none;
  border-radius: 22px;
  padding: 18px;
  margin-top: 8px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(74, 158, 255, 0.32);
  transition: transform 0.2s ease;
  text-align: left;
  font-family: inherit;
}

.support-btn-card:active {
  transform: scale(0.97);
}

.support-btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.support-btn-icon svg {
  width: 22px;
  height: 22px;
}

.support-btn-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.support-btn-sub {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 10px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
}

.faq-q-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-item.open .faq-q-icon {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
  max-height: 160px;
}

.faq-a p {
  margin: 0;
  padding: 0 15px 15px 41px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---------- Loading skeleton (shimmer) ---------- */

.main-content {
  display: none;
}

.skeleton-wrap {
  display: block;
}

.sk-hero {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px 20px 20px;
  margin: 6px 0 14px;
  text-align: center;
  background: linear-gradient(165deg, rgba(74, 158, 255, 0.08), var(--card) 55%);
}

.sk-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--placeholder);
}

.sk-line {
  height: 13px;
  border-radius: 6px;
  background: var(--placeholder);
  margin: 0 auto;
}

.sk-line.w1 {
  width: 120px;
}

.sk-line.w2 {
  width: 170px;
  margin-top: 8px;
  height: 10px;
}

.sk-metrics {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sk-metric .sk-line {
  width: 46px;
  height: 11px;
  margin-bottom: 5px;
}

.sk-metric .sk-line.small {
  width: 34px;
  height: 8px;
  margin: 0 auto;
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px 15px;
  margin-bottom: 10px;
}

.sk-row .sk-box {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--placeholder);
  flex-shrink: 0;
}

.sk-row .sk-lines {
  flex: 1;
}

.sk-row .sk-line.title {
  width: 62%;
  height: 12px;
  margin: 0;
}

.sk-row .sk-line.sub {
  width: 42%;
  height: 9px;
  margin: 7px 0 0;
}

.sk-circle,
.sk-line,
.sk-box {
  position: relative;
  overflow: hidden;
}

.sk-circle::after,
.sk-line::after,
.sk-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: skShimmer 1.6s ease-in-out infinite;
}

@keyframes skShimmer {
  to {
    transform: translateX(100%);
  }
}

/* ---------- Achievements ---------- */

.ach-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--gold-dim), var(--card) 60%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.ach-flame {
  font-size: 30px;
}

.ach-num {
  font-size: 21px;
  font-weight: 800;
}

.ach-label {
  font-size: 11px;
  color: var(--text-muted);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.ach-badge {
  position: relative;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 4px;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.ach-badge.done {
  opacity: 1;
  border-color: var(--ok);
}

.ach-badge.done::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  border: 1.5px solid var(--ok);
  animation: achPulse 1.8s ease-in-out infinite;
}

@keyframes achPulse {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 0 0 rgba(34, 211, 165, 0.35); }
  50% { opacity: 1; box-shadow: 0 0 10px 2px rgba(34, 211, 165, 0.25); }
}

.ach-icon {
  font-size: 20px;
}

.ach-name {
  font-size: 9.5px;
  margin-top: 6px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.25;
}

.ach-badge.done .ach-name {
  color: var(--text);
}

.reward-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.reward-banner.claimed {
  background: linear-gradient(135deg, var(--gold-dim), rgba(201, 168, 76, 0.03));
  border-color: var(--gold);
  animation: rewardPulse 1.8s ease-in-out infinite;
}

@keyframes rewardPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.3); }
  50% { box-shadow: 0 0 14px 2px rgba(201, 168, 76, 0.25); }
}

.reward-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.reward-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
}

.reward-text b {
  color: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  .ach-badge.done::before,
  .reward-banner.claimed {
    animation: none;
  }
}

/* ---------- Security score ---------- */

.score-wrap {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 14px;
}

.score-ring {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 2px auto 14px;
}

.score-ring svg {
  transform: rotate(-90deg);
}

#scoreRingFill {
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.score-num b {
  font-size: 26px;
  font-weight: 800;
}

.score-num span {
  font-size: 10px;
  color: var(--text-muted);
}

.score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.score-item:last-child {
  border-bottom: none;
}

.score-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-muted);
}

.score-item .dot.ok {
  background: var(--ok);
}

.score-item .dot.warn {
  background: var(--gold);
}

.score-item-sub {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .sk-circle::after,
  .sk-line::after,
  .sk-box::after {
    animation: none;
  }
}
