/* Мистеро — Калькулятор Матрицы Судьбы */

.mmtx-wrap {
  font-family: 'Inter', -apple-system, sans-serif;
  color: #1a1a2e;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ── Форма ─────────────────────────────────────────────── */
.mmtx-form-block {
  background: #fff;
  border: 1px solid #e0d5c0;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

.mmtx-form-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a2e;
}

.mmtx-form-subtitle {
  color: #666;
  margin: 0 0 32px;
}

.mmtx-fields {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.mmtx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.mmtx-field label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mmtx-field input {
  width: 80px;
  padding: 14px 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 18px;
  text-align: center;
  transition: border-color .2s;
  outline: none;
  -moz-appearance: textfield;
}

.mmtx-field--wide input { width: 110px; }

.mmtx-field input:focus { border-color: #B98A3E; }

.mmtx-field input::-webkit-outer-spin-button,
.mmtx-field input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Кнопки ────────────────────────────────────────────── */
.mmtx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 36px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}

.mmtx-btn:disabled { opacity: .6; cursor: not-allowed; }

.mmtx-btn--primary {
  background: #1a1a2e;
  color: #fff;
}
.mmtx-btn--primary:hover:not(:disabled) { background: #2a2a4e; transform: translateY(-1px); }

.mmtx-btn--gold {
  background: linear-gradient(135deg, #B98A3E 0%, #D4A853 100%);
  color: #fff;
  font-size: 17px;
  padding: 18px 40px;
  box-shadow: 0 4px 16px rgba(185,138,62,.35);
}
.mmtx-btn--gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(185,138,62,.45); }

.mmtx-btn--secondary {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 10px 24px;
  font-size: 14px;
}
.mmtx-btn--secondary:hover { background: #f5f5f5; }

/* ── Результат — Семь точек ────────────────────────────── */
.mmtx-result-header {
  text-align: center;
  padding: 32px 0 0;
}
.mmtx-result-header h2 { font-size: 28px; margin: 0 0 8px; }
.mmtx-result-date { color: #888; font-size: 15px; margin: 0 0 32px; }

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

.mmtx-point-card {
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: box-shadow .2s;
}
.mmtx-point-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

.mmtx-point-card--main {
  background: linear-gradient(135deg, #1a1a2e 0%, #2e2e4e 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(26,26,46,.25);
}
.mmtx-point-card--main .mmtx-point-arcana,
.mmtx-point-card--main .mmtx-point-label { color: #B98A3E; }
.mmtx-point-card--main .mmtx-point-brief { color: #ccc; }

.mmtx-point-num {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.mmtx-point-arcana {
  font-size: 14px;
  font-weight: 700;
  color: #B98A3E;
  margin-bottom: 4px;
}

.mmtx-point-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.mmtx-point-brief {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* ── Доп. расчёты ──────────────────────────────────────── */
.mmtx-extra-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
}

.mmtx-extra-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f5ee;
  border-radius: 12px;
  padding: 16px 24px;
  min-width: 140px;
}

.mmtx-extra-label { font-size: 11px; color: #888; text-transform: uppercase; margin-bottom: 4px; }
.mmtx-extra-num   { font-size: 32px; font-weight: 800; color: #1a1a2e; }
.mmtx-extra-arcana{ font-size: 13px; color: #B98A3E; font-weight: 600; }

.mmtx-basic-note {
  text-align: center;
  color: #888;
  font-size: 14px;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── CTA блок покупки ──────────────────────────────────── */
.mmtx-upgrade-block {
  background: linear-gradient(135deg, #1a1a2e 0%, #2a2040 100%);
  border-radius: 20px;
  padding: 40px;
  color: #fff;
}

.mmtx-upgrade-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.mmtx-upgrade-block h3 { font-size: 22px; margin: 0 0 12px; color: #B98A3E; }
.mmtx-upgrade-block p  { color: #ccc; margin: 0 0 20px; line-height: 1.6; }

.mmtx-upgrade-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  text-align: left;
}
.mmtx-upgrade-features li { font-size: 14px; color: #B0A080; }

.mmtx-buy-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mmtx-buy-fields input,
.mmtx-buy-fields select {
  flex: 1;
  min-width: 160px;
  padding: 14px 14px;
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 15px;
  outline: none;
}
.mmtx-buy-fields input::placeholder { color: rgba(255,255,255,.4); }
.mmtx-buy-fields input:focus,
.mmtx-buy-fields select:focus { border-color: #B98A3E; }
.mmtx-buy-fields select option { background: #1a1a2e; color: #fff; }

.mmtx-ai-check-notice {
  font-size: 13px;
  margin: 0 0 16px;
  color: #aaa;
}

.mmtx-buy-error {
  background: rgba(220,53,69,.15);
  border: 1px solid rgba(220,53,69,.4);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #ffb3b3;
  margin: 12px 0;
}

.mmtx-buy-note {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin: 12px 0 0;
}

/* ── Страница результата ───────────────────────────────── */
.mmtx-success-header {
  text-align: center;
  padding: 48px 24px 32px;
}
.mmtx-success-icon { font-size: 64px; margin-bottom: 16px; }
.mmtx-success-header h1 { font-size: 32px; margin: 0 0 12px; }
.mmtx-email-sent { color: #888; font-size: 14px; margin: 0; }

.mmtx-report-content {
  background: #fff;
  border: 1px solid #e0d5c0;
  border-radius: 16px;
  padding: 40px;
  line-height: 1.8;
  font-size: 16px;
}
.mmtx-report-content h1,
.mmtx-report-content h2,
.mmtx-report-content h3 { color: #B98A3E; margin-top: 28px; }
.mmtx-report-content h1 { font-size: 22px; }
.mmtx-report-content h2 { font-size: 19px; }
.mmtx-report-content h3 { font-size: 17px; }
.mmtx-report-content strong { color: #1a1a2e; }

.mmtx-processing {
  text-align: center;
  padding: 80px 24px;
}
.mmtx-spinner {
  width: 48px; height: 48px;
  border: 4px solid #e0d5c0;
  border-top-color: #B98A3E;
  border-radius: 50%;
  animation: mmtx-spin 1s linear infinite;
  margin: 0 auto 24px;
}
@keyframes mmtx-spin { to { transform: rotate(360deg); } }

.mmtx-error-block {
  background: #fff3f3;
  border: 1px solid #f5c6cb;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.mmtx-error-block h2 { color: #721c24; }

/* ── Ошибки ────────────────────────────────────────────── */
.mmtx-error {
  background: #fff3f3;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #721c24;
  margin: 8px 0;
}

/* ── Адаптив ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .mmtx-form-block { padding: 24px 16px; }
  .mmtx-fields { gap: 8px; }
  .mmtx-field input { width: 72px; font-size: 16px; }
  .mmtx-points-grid { grid-template-columns: repeat(2, 1fr); }
  .mmtx-upgrade-block { padding: 24px 16px; }
  .mmtx-upgrade-features { grid-template-columns: 1fr; }
  .mmtx-buy-fields { flex-direction: column; }
  .mmtx-report-content { padding: 24px 16px; }
  .mmtx-extra-cards { flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════════
   РАСШИРЕННЫЕ КОМПОНЕНТЫ — новые поля матрицы
   ═══════════════════════════════════════════════ */

.mmtx-section {
  margin-bottom: 28px;
}

.mmtx-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #B98A3E;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
}

/* ── Линии судьбы ─────────────────────────────── */
.mmtx-lines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.mmtx-line-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f5ee;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.mmtx-line-label  { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing:.05em; margin-bottom: 4px; }
.mmtx-line-num    { font-size: 28px; font-weight: 800; color: #1a1a2e; }
.mmtx-line-arcana { font-size: 12px; color: #B98A3E; font-weight: 600; }

/* ── Кармический хвост ───────────────────────── */
.mmtx-karma-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mmtx-karma-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f0eae0;
  border-radius: 10px;
  padding: 10px 14px;
}
.mmtx-karma-num    { font-size: 24px; font-weight: 800; color: #1a1a2e; }
.mmtx-karma-arcana { font-size: 12px; color: #B98A3E; }
.mmtx-karma-sep    { font-size: 20px; color: #ccc; }

/* ── Предназначение ──────────────────────────── */
.mmtx-purpose-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.mmtx-purpose-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid #e0d5c0;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}
.mmtx-purpose-period { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing:.05em; margin-bottom: 6px; }
.mmtx-purpose-num    { font-size: 26px; font-weight: 800; color: #1a1a2e; }
.mmtx-purpose-arcana { font-size: 12px; color: #B98A3E; font-weight: 600; }

/* ── Прогноз по годам ────────────────────────── */
.mmtx-forecast-grid {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.mmtx-forecast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f5ee;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 72px;
  flex-shrink: 0;
}
.mmtx-forecast-card--current {
  background: #1a1a2e;
  color: #fff;
}
.mmtx-forecast-card--current .mmtx-forecast-arcana { color: #B98A3E; }
.mmtx-forecast-year   { font-size: 11px; color: #888; margin-bottom: 4px; }
.mmtx-forecast-num    { font-size: 22px; font-weight: 800; }
.mmtx-forecast-arcana { font-size: 11px; color: #B98A3E; text-align: center; }

/* ── AI статус ───────────────────────────────── */
.mmtx-ai-status {
  display: block;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.mmtx-ai-status--ok   { background: rgba(40,167,69,.12); color: #155724; }
.mmtx-ai-status--fail { background: rgba(220,53,69,.12);  color: #721c24; }

@media (max-width: 600px) {
  .mmtx-purpose-grid { grid-template-columns: 1fr; }
  .mmtx-forecast-grid { flex-wrap: nowrap; }
}

/* ── Утилиты ──────────────────────────────────────── */
.mmtx-hidden         { display: none !important; }
.mmtx-success-center { text-align: center; padding: 48px 24px; }
.mmtx-success-icon   { font-size: 64px; margin-bottom: 16px; }
.mmtx-success-note   { color: #999; font-size: 13px; margin-top: 16px; }
.mmtx-recalc-row { text-align: center; margin-top: 24px; }
