html.pricing-page,
body.pricing-page {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body.pricing-page .app-wrapper {
  min-height: 100vh;
  overflow: visible;
}

body.pricing-page header {
  position: sticky;
  top: 0;
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  z-index: 40;
}

.billing-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: -6px 0 18px;
}

.billing-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.billing-check input {
  appearance: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.billing-check input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.billing-check input:checked {
  background: #86efac;
  border-color: #86efac;
}

.billing-check input:checked::after {
  transform: translateX(16px);
}

.pricing-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.pricing-hero {
  text-align: center;
  margin: 12px 0 36px;
  animation: priceRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pricing-hero .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pricing-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.pricing-hero p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 16px;
}

.acc-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.acc-btn {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}

a.acc-btn { color: inherit; }

.acc-btn-primary {
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  border: none;
}

.acc-btn-primary:hover {
  background: #fff;
  transform: scale(1.03);
  color: #111;
}

.acc-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.acc-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.acc-btn:disabled {
  opacity: 0.55;
  transform: none;
  cursor: wait;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 56px;
}

.price-card {
  position: relative;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  animation: priceRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease,
              background 0.35s ease;
}

.price-card:nth-child(1) { animation-delay: 0.04s; }
.price-card:nth-child(2) { animation-delay: 0.1s; }
.price-card:nth-child(3) { animation-delay: 0.16s; }
.price-card:nth-child(4) { animation-delay: 0.22s; }

.price-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
}

.price-card.is-popular {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(40, 40, 46, 0.55);
}

.price-card.is-current {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.price-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.sale-ribbon {
  position: absolute;
  top: 16px;
  right: -34px;
  width: 132px;
  padding: 5px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transform: rotate(32deg);
  background: var(--sale, #ff4d6d);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  z-index: 2;
  pointer-events: none;
}

.price-card.has-sale .plan-name {
  padding-right: 42px;
}

.price-card .plan-price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin: 10px 0 2px;
  line-height: 1;
}

.price-card .plan-price s {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.sale-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--sale, #ff4d6d) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--sale, #ff4d6d) 38%, transparent);
  color: var(--sale, #ff4d6d);
}

.sale-banner strong {
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sale-banner span,
.sale-banner em {
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
}

.unlimited-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.28);
  color: #86efac;
}

.unlimited-banner strong {
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.unlimited-banner span {
  font-size: 12px;
  color: #d8f5e3;
}

.price-card .plan-yearly {
  color: var(--text-muted);
  font-size: 12px;
  min-height: 18px;
  margin-bottom: 8px;
}

.price-card .plan-yearly s { opacity: 0.55; margin-right: 4px; }

.price-card .plan-credits {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

.price-card .plan-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 14px;
  min-height: 36px;
}

.price-card ul {
  list-style: none;
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  flex: 1;
}

.price-card li {
  font-size: 13px;
  color: #d0d0d4;
  padding-left: 16px;
  position: relative;
}

.price-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.price-card li.feature-unlimited {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 2px 0 10px;
  padding: 10px 12px;
  padding-left: 12px;
  border-radius: 14px;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.28);
  color: #86efac;
  font-weight: 650;
}

.price-card li.feature-unlimited::before {
  display: none;
  content: none;
}

.price-card .acc-btn { width: 100%; height: 42px; }

.compare-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
  animation: priceRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.compare-head h2 {
  font-size: 28px;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.compare-head p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.cat-filters {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-filters button {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 650;
  color: #999;
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
}

.cat-filters button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: none;
}

.cat-filters button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.compare-wrap {
  overflow: auto;
  border-radius: 22px;
  animation: priceRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 820px;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(18, 18, 22, 0.96);
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compare-table .model-col,
.compare-table td.model-col {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(16, 16, 20, 0.96);
  min-width: 240px;
}

.compare-table thead .model-col { z-index: 3; }

.compare-table .cat-row td {
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  padding-top: 16px;
}

.model-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.model-meta b { font-size: 13px; font-weight: 650; color: #fff; }
.model-meta span { font-size: 11px; color: var(--text-muted); }

.cell-unlimited {
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.cell-modes {
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.cell-modes span {
  display: block;
  color: #fff;
}

.cell-modes em {
  display: inline-block;
  min-width: 78px;
  margin-right: 6px;
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #86efac;
}

.cell-empty { color: #555; }
.cell-count { font-variant-numeric: tabular-nums; font-weight: 650; }

.acc-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 25, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.acc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.acc-toast.ok { color: #34c759; }
.acc-toast.err { color: #ff5e5e; }

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.order-card,
.pay-card {
  padding: 22px;
  animation: priceRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.order-card h2,
.pay-card h2 {
  font-size: 18px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

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

.order-price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.05em;
  margin: 14px 0 4px;
}

.order-price span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
}

.order-list {
  list-style: none;
  margin: 18px 0;
  display: grid;
  gap: 8px;
}

.order-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.acc-field { margin-bottom: 12px; }
.acc-field label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 6px;
  font-weight: 700;
}

.acc-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.acc-field input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px;
}

.auth-tabs button {
  flex: 1;
  height: 34px;
  border: none;
  background: transparent;
  color: #888;
  font-weight: 650;
  transform: none;
}

.auth-tabs button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.auth-tabs button:hover { transform: none; }

.pay-card .acc-btn { width: 100%; height: 46px; margin-top: 8px; }

.checkout-success {
  text-align: center;
  padding: 28px 10px 10px;
}

.checkout-success h2 { font-size: 28px; margin: 10px 0 8px; }
.hidden { display: none !important; }

.skeleton {
  min-height: 180px;
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes priceRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .compare-head { flex-direction: column; align-items: start; }
  .pricing-shell { width: min(1180px, calc(100% - 28px)); }
}

@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .price-card { min-height: 0; }
}

.terms-accept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 14px;
  color: var(--text-main, #f5f5f7);
  font-size: 13px;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
}
.terms-accept input { margin-top: 4px; accent-color: #ff6a00; width: 16px; height: 16px; }
.terms-accept a { color: #ffb800; text-decoration: underline; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 28px 0 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.legal-links a { color: var(--text-muted); }
.legal-links a:hover { color: #ffb800; }
#cardNote a { color: #ffb800; }
