.plans-main {
  padding-bottom: 52px;
}

.plan-shell {
  margin-top: 8px;
  border-radius: 34px;
  border: 1px solid rgba(181, 201, 238, 0.72);
  background: linear-gradient(165deg, rgba(238, 244, 255, 0.96), rgba(232, 240, 255, 0.94));
  padding: 52px 28px 30px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 52px rgba(16, 40, 92, 0.12);
}

.plans-bg-grain-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grain-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 48% 22%, rgba(255, 255, 255, 0.6), transparent 36%),
    radial-gradient(circle at 18% 72%, rgba(189, 208, 246, 0.28), transparent 44%),
    radial-gradient(circle at 82% 68%, rgba(186, 214, 255, 0.24), transparent 46%),
    linear-gradient(155deg, rgba(216, 230, 255, 0.22), rgba(255, 255, 255, 0.14) 42%, rgba(200, 224, 255, 0.2));
}

.grain-noise {
  display: none;
}

.plan-shell > *:not(.plans-bg-grain-wrap) {
  position: relative;
  z-index: 1;
}

.plan-shell::before,
.plan-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.plan-shell::before {
  width: 520px;
  height: 520px;
  left: -260px;
  bottom: -310px;
  background: radial-gradient(circle, rgba(160, 188, 243, 0.22), transparent 68%);
}

.plan-shell::after {
  width: 460px;
  height: 460px;
  right: -230px;
  top: -280px;
  background: radial-gradient(circle, rgba(176, 214, 255, 0.22), transparent 70%);
}

.plans-hero-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.plans-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5b79b2;
}

.plans-hero-copy h1 {
  margin-top: 12px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #1a3363;
}

.plans-hero-copy p {
  margin-top: 14px;
  font-size: 1.08rem;
  color: #5b75a2;
}

.billing-toggle {
  margin: 28px auto 0;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 190, 236, 0.7);
  background: rgba(255, 255, 255, 0.92);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.billing-label {
  font-size: 0.96rem;
  font-weight: 600;
  color: #6a86b8;
  transition: color 0.22s ease;
}

.billing-label.active {
  color: #20467f;
}

.billing-switch {
  width: 50px;
  height: 28px;
  border: 1px solid rgba(102, 142, 232, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #2558d0, #2b64ea);
  position: relative;
  cursor: pointer;
}

.billing-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  left: 3px;
  top: 3px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
  transition: transform 0.24s ease;
}

.billing-toggle.yearly .billing-knob {
  transform: translateX(22px);
}

.billing-save {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #26518c;
  background: rgba(123, 166, 246, 0.24);
}

.plans-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  border-radius: 24px;
  border: 1px solid rgba(176, 198, 236, 0.85);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.88), rgba(247, 251, 255, 0.84));
  padding: 24px 20px 20px;
  box-shadow:
    0 16px 28px rgba(27, 57, 117, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  display: grid;
  gap: 14px;
}

.plan-card.featured {
  transform: translateY(-8px);
  border-color: rgba(84, 135, 241, 0.66);
  background:
    radial-gradient(circle at 84% 14%, rgba(112, 165, 255, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(238, 246, 255, 0.9), rgba(247, 251, 255, 0.86));
}

.plan-card.premium {
  border-color: rgba(176, 198, 236, 0.85);
}

.plan-badge {
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #eaf2ff;
  background: linear-gradient(135deg, #3c6eff, #5d56ff);
}

.plan-card h2 {
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
  color: #1d3969;
}

.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-top: 1px solid rgba(171, 194, 233, 0.75);
  padding-top: 12px;
  color: #1c3768;
}

.plan-currency {
  font-size: 1.28rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.plan-amount {
  font-family: "Sora", sans-serif;
  font-size: 2.65rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.plan-period {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #4f6691;
}

.plan-list {
  display: grid;
  gap: 9px;
}

.plan-list li {
  list-style: none;
  position: relative;
  padding-left: 22px;
  color: #4f6691;
  line-height: 1.38;
}

.plan-list li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.33em;
  background: radial-gradient(circle at 35% 35%, #bfe6ff, #4c8eff);
  box-shadow: 0 0 0 2px rgba(110, 156, 240, 0.22);
}

.plan-cta {
  margin-top: auto;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(104, 149, 243, 0.62);
  background: linear-gradient(130deg, #2c67ee, #497dff);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(27, 86, 218, 0.32);
}

@media (max-width: 1100px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }

  .plan-card.featured {
    transform: none;
  }
}

@media (max-width: 640px) {
  .plan-shell {
    padding: 34px 14px 16px;
    border-radius: 24px;
  }

  .plans-hero-copy p {
    font-size: 0.98rem;
  }

  .billing-toggle {
    padding: 8px 10px;
    gap: 8px;
  }

  .billing-label {
    font-size: 0.9rem;
  }

  .billing-save {
    display: none;
  }

  .plan-card {
    border-radius: 18px;
    padding: 18px 14px 14px;
  }

  .plan-amount {
    font-size: 2.2rem;
  }
}


body[data-theme="dark"] .plan-shell {
  border: 1px solid rgba(120, 152, 225, 0.24);
  background: linear-gradient(165deg, rgba(8, 18, 38, 0.86), rgba(8, 18, 38, 0.82));
  box-shadow: 0 24px 56px rgba(5, 13, 36, 0.46);
}

body[data-theme="dark"] .grain-gradient {
  background:
    radial-gradient(circle at 48% 20%, rgba(198, 178, 255, 0.22), transparent 36%),
    radial-gradient(circle at 18% 72%, rgba(83, 120, 220, 0.24), transparent 44%),
    radial-gradient(circle at 82% 68%, rgba(88, 138, 222, 0.22), transparent 46%),
    linear-gradient(160deg, rgba(18, 31, 56, 0.9), rgba(16, 29, 52, 0.88));
}

body[data-theme="dark"] .plans-kicker {
  color: #89a7e8;
}

body[data-theme="dark"] .plans-hero-copy h1 {
  color: #f2f7ff;
}

body[data-theme="dark"] .plans-hero-copy p {
  color: #9fb8e8;
}

body[data-theme="dark"] .billing-toggle {
  border: 1px solid rgba(128, 158, 232, 0.32);
  background: rgba(16, 31, 58, 0.84);
}

body[data-theme="dark"] .billing-label {
  color: #8da8d8;
}

body[data-theme="dark"] .billing-label.active {
  color: #e8f0ff;
}

body[data-theme="dark"] .billing-save {
  color: #dbebff;
  background: rgba(67, 126, 243, 0.34);
}

body[data-theme="dark"] .plan-card {
  border: 1px solid rgba(118, 149, 224, 0.35);
  background: linear-gradient(165deg, rgba(14, 29, 58, 0.74), rgba(15, 32, 64, 0.68));
  box-shadow:
    0 16px 30px rgba(4, 11, 31, 0.4),
    inset 0 1px 0 rgba(154, 180, 245, 0.18);
}

body[data-theme="dark"] .plan-card.featured {
  border-color: rgba(95, 155, 255, 0.72);
  background:
    radial-gradient(circle at 84% 14%, rgba(104, 165, 255, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(16, 41, 82, 0.8), rgba(14, 34, 70, 0.76));
}

body[data-theme="dark"] .plan-card.premium {
  border-color: rgba(111, 145, 232, 0.56);
}

body[data-theme="dark"] .plan-card h2,
body[data-theme="dark"] .plan-price,
body[data-theme="dark"] .plan-amount {
  color: #f2f7ff;
}

body[data-theme="dark"] .plan-period,
body[data-theme="dark"] .plan-list li {
  color: #c8d9f8;
}

body[data-theme="dark"] .plan-price {
  border-top-color: rgba(131, 163, 236, 0.3);
}
