:root {
  color-scheme: dark;
}

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

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

body.modal-open {
  overflow: 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;
}

.line-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #06c755;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(6, 199, 85, 0.32);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.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: 20px 16px;
}

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

.result-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 12, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.result-modal-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px 22px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(22, 24, 46, 0.96), rgba(8, 10, 20, 0.98));
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(139, 92, 246, 0.18);
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.result-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.result-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.result-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  background: linear-gradient(90deg, #67e8f9, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-break {
  display: block;
}

.result-note {
  margin-bottom: 18px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
}

.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) {
  display: flex;
}

@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;
  }
}
