:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI Variable Text", "Microsoft YaHei UI", sans-serif;
  font-synthesis: none;
  --bg: #101216;
  --surface: #1b1e23;
  --surface-raised: #22262c;
  --line: #343941;
  --line-strong: #4a535e;
  --text: #f5f7f9;
  --secondary: #c1c7ce;
  --muted: #858d96;
  --blue: #7fc7ef;
  --blue-strong: #3a94c7;
  --gold: #d3b56f;
  --teal: #79c8b6;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
.plan-name span,
.price strong,
.plan-action {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
}

button {
  font: inherit;
}

.pricing-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 58px 28px 34px;
  background: linear-gradient(180deg, #12151a 0%, #0d0f13 72%);
}

.orb-background {
  position: absolute;
  top: 45%;
  left: 50%;
  width: min(920px, 82vw);
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.orb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.68;
}

.pricing-shell::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(880px, 80vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(127, 199, 239, 0.8), rgba(211, 181, 111, 0.58), transparent);
  content: "";
  transform: translateX(-50%);
}

.pricing-header,
.plan-grid,
.pricing-footer {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin-inline: auto;
}

.pricing-header {
  text-align: center;
}

.brand-line {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  color: #e8edf1;
  font-size: 13px;
  font-weight: 700;
}

.brand-line a {
  color: inherit;
  text-decoration: none;
}

.brand-line a:hover {
  color: var(--blue);
}

.brand-line i {
  padding-left: 8px;
  border-left: 1px solid #454b54;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
  font-size: 36px;
  font-weight: 720;
  line-height: 1.25;
}

h1 span {
  opacity: 0;
  transform: translateY(15px);
  animation: title-in 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 85ms);
}

.pricing-header > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 21px;
  opacity: 0;
  animation: fade-up 500ms 340ms ease forwards;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.plan-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 515px;
  flex-direction: column;
  padding: 23px 22px 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(155deg, rgba(37, 41, 48, 0.82), rgba(23, 26, 31, 0.88));
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  backdrop-filter: blur(14px) saturate(1.08);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.26);
  opacity: 0;
  transform: translateY(18px);
  animation: card-in 540ms calc(520ms + var(--delay)) cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.plan-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 28px 62px rgba(0, 0, 0, 0.34);
}

.plan-card.featured {
  border-color: #527d98;
  box-shadow: 0 26px 70px rgba(25, 84, 118, 0.22);
}

.plan-card::after {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: #535b64;
  content: "";
}

.pro-card::after {
  background: linear-gradient(90deg, #4c96c0, #9bdcff, #4d91b8);
}

.ultra-card::after {
  display: none;
}

.ultra-card::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle),
    #bca66d,
    #76c6bc,
    #72b9df,
    #9b7bd1,
    #bca66d
  );
  content: "";
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-orbit 7s linear infinite;
}

.plan-name {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-name span {
  font-size: 26px;
  font-weight: 720;
}

.plan-name i {
  padding: 4px 7px;
  border: 1px solid #464d56;
  border-radius: 4px;
  color: #abb2ba;
  font-size: 9px;
  font-style: normal;
}

.beta-symbol {
  display: inline-grid;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid #c7ad6a;
  border-radius: 2px;
  background: linear-gradient(135deg, #4a4029, #29271f);
  box-shadow: 0 0 10px rgba(211, 181, 111, 0.22);
  transform: rotate(45deg);
}

.beta-symbol::after {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #f1d58d;
  box-shadow: 0 0 5px rgba(241, 213, 141, 0.7);
  content: "";
}

.beta-symbol.small {
  width: 9px;
  height: 9px;
  margin: 0 9px 1px 2px;
}

.beta-symbol.small::after {
  width: 2px;
  height: 2px;
}

.plan-card header > p {
  min-height: 42px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 18px;
}

.price {
  display: flex;
  min-height: 48px;
  align-items: baseline;
  gap: 7px;
  margin-top: 15px;
}

.price strong {
  font-size: 29px;
  font-weight: 720;
}

.price span,
.plan-card header > small {
  color: var(--muted);
  font-size: 10px;
}

.plan-card header > small {
  display: block;
  min-height: 15px;
}

.plan-action {
  position: relative;
  display: grid;
  min-height: 42px;
  margin: 20px 0 18px;
  overflow: hidden;
  border: 1px solid #4a5058;
  border-radius: 6px;
  background: #292d33;
  color: #f4f7f9;
  font-size: 12px;
  font-weight: 700;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.plan-action::after {
  position: absolute;
  top: -80%;
  left: -35%;
  width: 24%;
  height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  content: "";
  opacity: 0;
  transform: rotate(18deg);
}

.plan-action:hover::after {
  opacity: 1;
  animation: button-sheen 720ms ease;
}

.plan-action:hover {
  border-color: #626a74;
  background: #30353c;
  transform: translateY(-1px);
}

.plan-action.secondary {
  background: #292d33;
}

.plan-action.primary {
  border-color: #4a5058;
  background: #292d33;
  box-shadow: none;
}

.plan-action.beta-action {
  border-color: #4a5058;
  background: #292d33;
}

.feature-list {
  padding-top: 16px;
  border-top: 1px solid #333941;
}

.feature-list h2 {
  min-height: 20px;
  color: #dfe4e8;
  font-size: 11px;
  font-weight: 700;
}

.feature-list ul {
  display: grid;
  gap: 11px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 0;
  color: var(--secondary);
  font-size: 11px;
  line-height: 16px;
}

.feature-list li.muted-feature {
  color: #737b84;
}

.pricing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 24px;
  margin-top: 22px;
  color: #737b84;
  font-size: 10px;
}

.pricing-footer span + span::before {
  margin-right: 24px;
  color: #3d444c;
  content: "·";
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(7, 9, 12, 0.74);
}

.dialog-backdrop.open {
  display: grid;
}

.plan-dialog {
  position: relative;
  width: min(390px, 100%);
  padding: 25px;
  border: 1px solid #4b545e;
  border-radius: 8px;
  background: #20242a;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  animation: dialog-in 200ms ease;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #9da5ae;
  font-size: 18px;
  cursor: pointer;
}

.dialog-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.plan-dialog h2 {
  margin-top: 7px;
  font-size: 23px;
}

.plan-dialog p {
  margin-top: 10px;
  color: #aeb5bd;
  font-size: 12px;
  line-height: 20px;
}

.dialog-confirm {
  width: 100%;
  height: 38px;
  margin-top: 20px;
  border: 1px solid #547f98;
  border-radius: 5px;
  background: #315d73;
  color: #f5fbff;
  font-weight: 700;
  cursor: pointer;
}

@keyframes title-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes button-sheen {
  from { left: -35%; }
  to { left: 118%; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes border-orbit {
  to { --border-angle: 360deg; }
}

@media (max-width: 860px) {
  .pricing-shell { padding-inline: 18px; }
  .plan-grid { grid-template-columns: 1fr; width: min(520px, 100%); }
  .plan-card { min-height: auto; }
  .pricing-footer { flex-direction: column; align-items: center; }
  .pricing-footer span + span::before { content: none; }
}

@media (max-width: 520px) {
  .pricing-shell { padding: 36px 12px 26px; }
  h1 { font-size: 28px; }
  .plan-card { padding: 20px 18px; }
}

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