:root {
  color-scheme: dark;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: #07080f;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open #preview-line-btn,
body.modal-open .preview-again {
  visibility: hidden;
}

.glass-panel {
  background: linear-gradient(180deg, rgba(22, 24, 46, 0.78), rgba(8, 10, 20, 0.9));
  border: 1px solid rgba(167, 139, 250, 0.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(139, 92, 246, 0.08);
}

.tech-tab {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.progress-line {
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.progress-line.progress-active {
  background: linear-gradient(90deg, #22d3ee, #a78bfa) !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
}

.neon-focus:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.35),
    0 0 22px rgba(139, 92, 246, 0.4);
}

.loader-ring {
  animation: spin 0.85s linear infinite;
}

.analysis-progress-bar {
  background: linear-gradient(90deg, #22d3ee, #8b5cf6);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.65);
  transition: width 0.12s linear;
}

.trust-note {
  margin: 0 0 22px;
  color: #8b97ab;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 0.01em;
}

.line-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 15px 18px;
  border-radius: 14px;
  background: #06c755;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(110, 231, 160, 0.28),
    0 10px 24px rgba(6, 199, 85, 0.32),
    0 0 22px rgba(6, 199, 85, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.line-cta-label {
  min-width: 0;
  text-align: center;
}

.line-cta-btn:hover {
  filter: brightness(1.06);
  transform: scale(1.02);
}

.line-cta-btn:active {
  transform: scale(0.98);
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.result-modal.hidden {
  display: none !important;
}

.result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 12, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.result-modal-card {
  position: relative;
  z-index: 1;
  width: min(528px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 42px 32px 30px;
  border-radius: 22px;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(126, 146, 176, 0.16), transparent 48%),
    linear-gradient(180deg, #171b23 0%, #0c0e13 100%);
  border: 1px solid rgba(214, 219, 226, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 28px 70px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 40px rgba(156, 170, 194, 0.16);
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(203, 210, 220, 0.32);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.result-close:hover,
.result-close:focus-visible {
  color: rgba(203, 210, 220, 0.62);
  background: transparent;
  outline: none;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(214, 186, 122, 0.28);
  background: rgba(214, 186, 122, 0.08);
  color: #d9c59a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.result-title {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(214, 186, 122, 0.28);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.5;
  color: #f4f1ea;
}

.result-break {
  display: block;
}

.report-sheet,
.page-report {
  text-align: left;
}

.report-sheet {
  margin-bottom: 16px;
}

.page-report {
  padding: 4px 2px 0;
}

.page-report .line-cta-btn {
  margin-top: 16px;
}

.page-report-title {
  margin: 0 0 14px;
  color: #f4f1ea;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}

.page-report-note {
  margin: 0 0 8px;
  color: #b7c0cc;
  font-size: 13px;
  line-height: 1.7;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.score-ring {
  --p: 72;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #12151c 58%, transparent 59%),
    conic-gradient(#c8b48a calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 18px rgba(200, 180, 138, 0.12);
}

.score-ring .score-value {
  color: #f4f1ea;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.score-kicker {
  margin: 0 0 4px;
  color: #d9c59a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.score-label {
  margin: 0;
  color: #f4f1ea;
  font-size: 15px;
  line-height: 1.4;
}

.score-max,
.score-trend {
  color: #aeb6c2;
  font-weight: 500;
}

.score-trend {
  margin: 3px 0 0;
  font-size: 13px;
}

.locked-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 0;
}

.locked-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: #9aa3b2;
  font-size: 13px;
}

.lock-tag {
  flex: 0 0 auto;
  color: rgba(217, 197, 154, 0.8);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.preview-again {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: rgba(174, 182, 194, 0.72);
  font-size: 12px;
  cursor: pointer;
}

.preview-again:hover,
.preview-again:focus-visible {
  color: #d5dbe3;
  outline: none;
}

.result-note {
  margin-bottom: 18px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(214, 219, 226, 0.1);
  text-align: left;
}

.result-safe {
  margin: 10px 0 0;
  color: #9aa6b5;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}

.result-note-lead,
.result-note-action {
  margin: 0;
  color: #cbd5e1;
}

.result-note-action {
  margin-top: 8px;
}

.result-note-hook {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 0;
  color: #f8fafc;
}

.result-note-gift::before {
  content: "🎁";
}

.result-line-btn {
  width: 100%;
}

#input-state:not(.hidden),
#loading-state:not(.hidden),
#preview-state:not(.hidden) {
  display: flex;
}

@media (max-width: 640px) {
  .result-modal-card {
    padding: 36px 18px 22px;
    border-radius: 18px;
  }

  .result-title {
    font-size: 18px;
  }

  .line-cta-btn {
    font-size: 13px;
    padding: 13px 12px;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .loader-ring,
  .result-modal-card,
  .animate-pulse,
  .animate-pulse-slow {
    animation: none !important;
  }
}
