:root {
  color-scheme: dark;
  --background: #0f1823;
  --background-soft: #131f2b;
  --surface: #192635;
  --surface-light: #223143;
  --surface-hover: #28394d;
  --border: #2c3d50;
  --border-light: #3a4e64;
  --text: #f4f7fc;
  --text-soft: #b2c1d2;
  --text-muted: #7f94aa;
  --primary: #7067f0;
  --primary-hover: #8179ff;
  --primary-soft: rgba(112, 103, 240, 0.16);
  --success: #42c78a;
  --success-soft: rgba(66, 199, 138, 0.14);
  --warning: #f3bd55;
  --warning-soft: rgba(243, 189, 85, 0.14);
  --danger: #f16f7d;
  --danger-soft: rgba(241, 111, 125, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --header-height: 68px;
  --content-width: 1240px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 50% -30%,
      rgba(112, 103, 240, 0.22),
      transparent 38%
    ),
    var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.container {
  width: min(
    calc(100% - 40px),
    var(--content-width)
  );
  margin: 0 auto;
}

.page-main {
  min-height:
    calc(100vh - var(--header-height));
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: rgba(18, 29, 41, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background:
    linear-gradient(
      145deg,
      #8279ff,
      #5046d9
    );
  box-shadow:
    0 10px 30px
    rgba(112, 103, 240, 0.35);
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.logo-accent {
  color: #8e86ff;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 6px;
}

.navigation-link {
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
}

.navigation-link:hover,
.navigation-link.active {
  color: var(--text);
  background: var(--surface-light);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-balance {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.header-balance strong {
  color: var(--text);
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
}

.mobile-menu-icon,
.mobile-menu-icon::before,
.mobile-menu-icon::after {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: var(--text);
}

.mobile-menu-icon {
  position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  position: absolute;
  left: 0;
  content: "";
}

.mobile-menu-icon::before {
  top: -6px;
}

.mobile-menu-icon::after {
  top: 6px;
}

.mobile-navigation {
  position: fixed;
  z-index: 120;
  inset: var(--header-height) 0 0;
  display: none;
  padding: 16px 20px 30px;
  background: rgba(15, 24, 35, 0.98);
  overflow-y: auto;
}

.mobile-navigation.open {
  display: block;
}

.mobile-navigation-list {
  display: grid;
  gap: 8px;
}

.mobile-navigation-link {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 650;
  text-decoration: none;
}

.mobile-navigation-link:hover,
.mobile-navigation-link.active {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface-light);
}

.mobile-navigation-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s,
    background 0.2s,
    border-color 0.2s,
    opacity 0.2s;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow:
    0 10px 25px
    rgba(112, 103, 240, 0.22);
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-secondary {
  border-color: var(--border);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: var(--border-light);
  background: var(--surface-light);
}

.button-danger {
  border-color: rgba(241, 111, 125, 0.35);
  background: var(--danger-soft);
  color: #ffadb6;
}

.button-block {
  width: 100%;
}

.button-large {
  min-height: 50px;
  padding: 0 24px;
  border-radius: 13px;
  font-size: 15px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 76px;
}

.hero::before {
  position: absolute;
  width: 560px;
  height: 560px;
  top: -260px;
  left: calc(50% - 280px);
  border-radius: 50%;
  background: rgba(112, 103, 240, 0.22);
  filter: blur(100px);
  content: "";
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(420px, 0.95fr);
  align-items: center;
  gap: 68px;
}

.hero-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 8px 13px;
  border: 1px solid rgba(129, 121, 255, 0.34);
  border-radius: 999px;
  background: var(--primary-soft);
  color: #b9b4ff;
  font-size: 13px;
  font-weight: 700;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d85ff;
  box-shadow: 0 0 16px #8d85ff;
}

.hero-title {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -3px;
}

.gradient-text {
  color: transparent;
  background:
    linear-gradient(
      105deg,
      #ffffff,
      #aaa4ff 55%,
      #6dd9ff
    );
  background-clip: text;
  -webkit-background-clip: text;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.hero-preview {
  position: relative;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(34, 49, 67, 0.96),
      rgba(20, 31, 44, 0.96)
    );
  box-shadow: var(--shadow);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.preview-title {
  font-size: 14px;
  font-weight: 750;
}

.preview-dots {
  display: flex;
  gap: 5px;
}

.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-light);
}

.preview-models {
  display: grid;
  gap: 9px;
}

.preview-model {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 24, 35, 0.65);
}

.model-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.model-logo.orange {
  background: #e98200;
}

.model-logo.blue {
  background: #347df1;
}

.preview-model-name {
  font-size: 14px;
  font-weight: 750;
}

.preview-model-description {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.preview-model-price {
  color: #b9b4ff;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.section {
  padding: 74px 0;
}

.section-soft {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(19, 31, 43, 0.58);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-eyebrow {
  margin-bottom: 10px;
  color: #958eff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -1.4px;
}

.section-description {
  margin: 15px 0 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: #aaa4ff;
  font-size: 20px;
  font-weight: 800;
}

.feature-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.feature-text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.model-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.model-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  background: var(--surface-light);
}

.model-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-card-logo {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.model-card-name {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.model-card-provider {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
}

.model-card-description {
  min-height: 72px;
  margin: 16px 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.65;
}

.model-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.model-price {
  padding: 10px;
  border-radius: 10px;
  background: var(--background-soft);
}

.model-price-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.model-price-value {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.models-loading,
.models-empty {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--text-muted);
  text-align: center;
}

.credit-box {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 34px;
  border: 1px solid rgba(129, 121, 255, 0.3);
  border-radius: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(112, 103, 240, 0.17),
      rgba(34, 49, 67, 0.7)
    );
}

.credit-box h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.credit-box p {
  max-width: 720px;
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.auth-page {
  min-height:
    calc(100vh - var(--header-height));
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.auth-shell {
  width: 100%;
  max-width: 470px;
}

.auth-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(25, 38, 53, 0.96);
  box-shadow: var(--shadow);
}

.auth-heading {
  margin-bottom: 26px;
  text-align: center;
}

.auth-title {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.7px;
}

.auth-subtitle {
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.form {
  display: grid;
  gap: 17px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: var(--background-soft);
  color: var(--text);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form-input::placeholder {
  color: #667b92;
}

.form-input:hover {
  border-color: var(--border-light);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px
    rgba(112, 103, 240, 0.15);
}

.form-input.invalid {
  border-color: var(--danger);
}

.field-error {
  min-height: 18px;
  color: #ff9aa5;
  font-size: 12px;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-input {
  padding-right: 76px;
}

.password-toggle {
  position: absolute;
  top: 5px;
  right: 6px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-light);
}

.form-checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.form-link {
  color: #a9a3ff;
  font-weight: 650;
  text-decoration: none;
}

.form-link:hover {
  text-decoration: underline;
}

.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.form-message {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--background-soft);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.form-message.error {
  border-color: rgba(241, 111, 125, 0.4);
  background: var(--danger-soft);
  color: #ffadb6;
}

.form-message.success {
  border-color: rgba(66, 199, 138, 0.4);
  background: var(--success-soft);
  color: #85e1b3;
}

.form-message.warning {
  border-color: rgba(243, 189, 85, 0.4);
  background: var(--warning-soft);
  color: #ffd98b;
}

.auth-footer {
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.password-rules {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
}

.password-rule.valid {
  color: var(--success);
}

.status-card {
  text-align: center;
}

.status-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: #aaa4ff;
  font-size: 28px;
  font-weight: 800;
}

.status-card h1 {
  margin: 0 0 12px;
  font-size: 28px;
}

.status-card p {
  margin: 0 0 24px;
  color: var(--text-soft);
  line-height: 1.7;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--border);
  background: var(--background-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.footer-text {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.footer-link {
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
}

.toast-container {
  position: fixed;
  z-index: 300;
  top: 84px;
  right: 20px;
  width: min(390px, calc(100% - 40px));
  display: grid;
  gap: 10px;
}

.toast {
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  background: var(--surface-light);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 14px;
  animation: toast-in 0.22s ease-out;
}

.toast.error {
  border-color: rgba(241, 111, 125, 0.5);
}

.toast.success {
  border-color: rgba(66, 199, 138, 0.5);
}

.skeleton {
  overflow: hidden;
  position: relative;
  background: var(--surface-light);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.06),
      transparent
    );
  content: "";
  transform: translateX(-100%);
  animation: skeleton 1.4s infinite;
}

@keyframes skeleton {
  to {
    transform: translateX(100%);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .main-navigation,
  .header-actions {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    padding: 68px 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-preview {
    max-width: 680px;
  }

  .features-grid,
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .credit-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 62px;
  }

  .container {
    width: min(
      calc(100% - 28px),
      var(--content-width)
    );
  }

  .logo {
    font-size: 19px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero {
    padding: 52px 0;
  }

  .hero-title {
    font-size: 42px;
    letter-spacing: -2px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-preview {
    padding: 12px;
    border-radius: 18px;
  }

  .preview-model {
    grid-template-columns: 38px 1fr;
  }

  .preview-model-price {
    grid-column: 2;
    text-align: left;
  }

  .features-grid,
  .models-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

  .section-title {
    font-size: 31px;
  }

  .feature-card,
  .model-card {
    padding: 19px;
  }

  .model-card-description {
    min-height: 0;
  }

  .credit-box {
    padding: 24px;
  }

  .auth-page {
    display: block;
    padding: 28px 14px;
  }

  .auth-card {
    padding: 23px 18px;
    border-radius: 18px;
  }

  .auth-title {
    font-size: 25px;
  }

  .form-row-between {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .toast-container {
    top: 72px;
    right: 14px;
    width: calc(100% - 28px);
  }
}