﻿@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --bg: #090909;
  --surface: #141414;
  --surface-2: #1d1d1d;
  --text: #f8fafc;
  --muted: #a1a1aa;
  --stroke: #333333;
  --brand: #a60505;
  --brand-light: #d91a1a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 8% 14%, rgba(217, 26, 26, 0.1), transparent 40%),
    linear-gradient(180deg, #070707 0%, #0b0b0b 42%, #070707 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.page-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  background: rgba(10, 10, 10, 0.8);
}

.page-nav__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-nav__logo img {
  height: 24px;
  width: auto;
}

.page-nav__links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.page-nav__links a {
  color: rgba(248, 250, 252, 0.9);
}

.page-nav__links a:hover {
  color: #ffd6d6;
}

.page-main {
  padding: 168px 0 70px;
}

.panel {
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.94), rgba(13, 13, 13, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.lead {
  margin: 16px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  max-width: 56ch;
}

.copy {
  margin-top: 24px;
  color: var(--muted);
  line-height: 1.6;
}

.copy p {
  margin: 0 0 14px;
}

.grid {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 14px;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-main .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid transparent;
}

.page-main .btn--primary {
  background: var(--brand);
  color: #fff;
}

.page-main .btn--primary:hover {
  background: var(--brand-light);
}

.page-main .btn--ghost {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.kv {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

.kv div {
  display: grid;
  gap: 2px;
}

.kv dt {
  color: #fda4a4;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kv dd {
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
}

.page-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 13px;
}

.page-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-footer__links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.page-footer__links a {
  color: #e2e8f0;
}

.page-footer__links a:hover {
  color: #ffd6d6;
}

.page-lang {
  margin-bottom: 10px;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.page-lang label {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.72);
}

.page-lang select {
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(38, 38, 38, 0.95);
  color: #f8fafc;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
}

.plans-panel {
  overflow: visible;
}

.container--plans {
  width: min(1580px, calc(100% - 36px));
}

.plans-kicker {
  margin: 0 0 10px;
  color: rgba(255, 184, 184, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 700;
}

.plans-account-state {
  margin: 14px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(166, 5, 5, 0.44);
  background: rgba(20, 5, 5, 0.76);
  color: #ffd5d5;
  font-size: 13px;
}

.plans-account-state.is-loading {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

.plans-account-state.is-error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.plans-account-state.is-success {
  border-color: rgba(166, 5, 5, 0.58);
  color: #ffe3e3;
}

.plans-account-state.is-muted {
  border-color: rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}

.plans-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(270px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 22px;
  padding: 24px 22px 20px;
  border: 1px solid #d8dee7;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.17);
}

.plan-card h2 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 28px;
  line-height: 0.98;
  color: #111827;
}

.plan-card--annual {
  border-color: rgba(166, 5, 5, 0.62);
  background: linear-gradient(180deg, #fff6f6 0%, #ffffff 100%);
  box-shadow: 0 24px 38px rgba(115, 2, 2, 0.24);
}

.plan-card--lifetime {
  border-color: rgba(166, 5, 5, 0.42);
  background: linear-gradient(180deg, #fff4f4 0%, #ffffff 100%);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.plan-price {
  margin: 14px 0 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(40px, 2.9vw, 52px);
  line-height: 0.96;
  color: #0f0f0f;
}

.plan-card--lifetime .plan-price {
  font-size: clamp(36px, 2.5vw, 46px);
}

.plan-card--annual .plan-price,
.plan-card--lifetime .plan-price {
  color: var(--brand);
}

.plan-price-note {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.42;
}

.plan-card__meta {
  min-height: 68px;
  display: grid;
  align-content: start;
  gap: 6px;
}

.plan-anchor {
  margin: 0;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(166, 5, 5, 0.24);
  background: rgba(166, 5, 5, 0.08);
  color: #7f1d1d;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.plan-card--monthly .plan-anchor,
.plan-card--free .plan-anchor {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.05);
  color: #4b5563;
}

.plan-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  flex: 1;
}

.plan-list li {
  position: relative;
  padding-left: 22px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.46;
}

.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand);
  font-weight: 700;
}

.plan-card__bottom {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.plan-card__cta {
  margin-top: 0;
  width: 100%;
}

.plan-card__cta:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.plan-card__cta.is-current {
  background: #1f2937;
  border-color: #1f2937;
}

.plan-support {
  margin: 0;
  min-height: 34px;
  color: #4b5563;
  font-size: 11px;
  line-height: 1.42;
}

.plans-value {
  margin-top: 28px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(166, 5, 5, 0.32);
  background: rgba(166, 5, 5, 0.08);
}

.plans-value h3 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 22px;
  line-height: 1.1;
  color: #fff5f5;
}

.plans-value p {
  margin: 6px 0 0;
  color: #fee2e2;
  font-size: 13px;
  line-height: 1.45;
}

.plans-checkout-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid rgba(166, 5, 5, 0.32);
  border-radius: 12px;
  background: rgba(166, 5, 5, 0.12);
  color: #fbe7e7;
  font-size: 14px;
  line-height: 1.45;
}

.plans-actions {
  margin-top: 16px;
}

.portal-panel {
  max-width: 860px;
  margin: 0 auto;
}

.account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-head .btn {
  margin-top: 6px;
}

.account-btn-logout {
  background: rgba(5, 5, 5, 0.92);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.account-btn-logout:hover {
  background: #0f0f0f;
  border-color: rgba(255, 255, 255, 0.35);
}

.account-btn-change-plan {
  color: #ffffff;
}

.auth-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.5);
}

.auth-tab {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  background: rgba(166, 5, 5, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffe4e6;
}

.auth-tab:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.58);
  outline-offset: 2px;
}

.portal-form {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.portal-form__row {
  display: grid;
  gap: 10px;
}

.portal-form__row[hidden] {
  display: none !important;
}

.portal-form label {
  font-size: 13px;
  color: #e5e7eb;
  font-weight: 600;
}

.portal-form input {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(17, 24, 39, 0.8);
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
}

.portal-form textarea {
  min-height: 120px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(17, 24, 39, 0.8);
  color: #f8fafc;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  resize: vertical;
}

.portal-form input:focus-visible,
.portal-form textarea:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.55);
  outline-offset: 1px;
}

.portal-inline-actions {
  margin-top: 2px;
}

.portal-link-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fda4a4;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.portal-link-btn:hover {
  color: #fecaca;
}

.portal-link-btn:disabled {
  opacity: 0.7;
  cursor: default;
  text-decoration: none;
}

.portal-feedback {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.4);
  font-size: 13px;
}

.portal-feedback:empty {
  display: none;
}

.portal-feedback.is-loading {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

.portal-feedback.is-success {
  border-color: rgba(34, 197, 94, 0.45);
  color: #bbf7d0;
}

.portal-feedback.is-warning {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.portal-feedback.is-error {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.portal-feedback.is-muted {
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.account-grid {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 10px;
  border: 1px solid rgba(166, 5, 5, 0.28);
  background: rgba(7, 7, 7, 0.9);
  padding: 11px 12px;
}

.account-row span {
  color: #c7a5a5;
  font-size: 13px;
}

.account-row strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

#account-status.portal-feedback,
#account-status.portal-feedback.is-success {
  border-color: rgba(166, 5, 5, 0.52);
  color: #ffd5d5;
  background: rgba(23, 5, 5, 0.78);
}

.provider-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.64);
  backdrop-filter: blur(7px);
}

.provider-modal[hidden] {
  display: none !important;
}

.provider-modal__dialog {
  width: min(560px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(166, 5, 5, 0.32);
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(166, 5, 5, 0.22);
}

.provider-modal__dialog h2 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #8f0707;
}

.provider-modal__subtitle {
  margin: 10px 0 0;
  color: #7f1d1d;
  font-size: 15px;
  font-weight: 600;
}

.provider-modal__actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.provider-modal__actions.is-single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.provider-modal__actions.is-single .provider-choice {
  width: min(248px, 100%);
}

.provider-choice {
  min-height: 92px;
  border-radius: 14px;
  border: 1px solid rgba(166, 5, 5, 0.24);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #111827;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.provider-choice img {
  height: 42px;
  max-width: 156px;
  width: auto;
}

.provider-choice:hover {
  border-color: rgba(166, 5, 5, 0.55);
  box-shadow: 0 12px 22px rgba(166, 5, 5, 0.18);
  transform: translateY(-1px);
}

.provider-choice:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.6);
  outline-offset: 2px;
}

.provider-close {
  margin-top: 16px;
  width: 100%;
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.provider-close:hover {
  background: #111827;
  border-color: #111827;
}

.portal-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1600;
  max-width: min(420px, calc(100% - 32px));
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(127, 29, 29, 0.95);
  color: #fee2e2;
  padding: 10px 12px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.portal-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-loading {
  cursor: wait;
}

@media (max-width: 1360px) {
  .container--plans {
    width: min(1220px, calc(100% - 40px));
  }

  .plans-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

@media (max-width: 860px) {
  .page-nav__inner {
    min-height: auto;
    padding: 14px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-nav__links {
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 13px;
  }

  .page-main {
    padding-top: 142px;
  }

  .lead {
    font-size: 16px;
  }

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

  .provider-modal__actions {
    grid-template-columns: 1fr;
  }

  .plan-card__meta,
  .plan-card__bottom {
    min-height: 0;
  }

  .account-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 560px) {
  .container {
    width: min(1180px, calc(100% - 28px));
  }

  .page-main {
    padding-top: 132px;
  }

  .container--plans {
    width: min(1420px, calc(100% - 28px));
  }
}
