:root {
  color-scheme: light;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10131a;
  color: #f8fafc;
  min-height: 100vh;
}

.screen {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0px 25px 60px rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.25);
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(135deg, #38bdf8, #9333ea);
  transition: width 0.3s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
}

.btn:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0px 12px 30px rgba(59, 130, 246, 0.35);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.level-meter {
  height: 20px;
  width: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.level-meter span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  transition: width 0.05s ease-out;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
  font-size: 0.85rem;
}

.status-pill.warn {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.clip-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.clip-card {
  background: rgba(30, 41, 59, 0.8);
  border-radius: 14px;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

a {
  color: #38bdf8;
}

.progress-motivation {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #cbd5f5;
  text-align: center;
}

.hero-badge-row-active {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.trm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.25);
  animation: trmPulse 3.2s ease-in-out infinite;
}

.trm-badge:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 3px;
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.6rem);
  transform: translateX(-50%);
  min-width: 240px;
  max-width: 320px;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.94);
  color: #e2e8f0;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 20;
}

.tooltip::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translate(-50%, 50%) rotate(45deg);
  bottom: -5px;
  left: 50%;
}

.badge-wrapper:hover .tooltip,
.badge-wrapper:focus-within .tooltip {
  opacity: 1;
}

.badge-wrapper:focus-within .tooltip {
  pointer-events: auto;
}

.modal-link {
  appearance: none;
  border: none;
  background: none;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.modal-link:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #cbd5f5;
}

.site-footer a {
  color: #38bdf8;
  text-decoration: underline;
}

.completion-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.9rem;
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.18);
}

.marketing-share {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
}

.share-heading {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #0b1120;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.share-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.35);
}

.share-button:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.share-button.secondary {
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal-overlay.hidden {
  display: none;
}

.modal-dialog {
  position: relative;
  width: min(520px, 100%);
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 2.5rem 2rem 2.25rem;
  box-shadow: 0 35px 80px rgba(8, 12, 20, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.modal-dialog h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #f8fafc;
}

.modal-dialog p {
  color: #cbd5f5;
  line-height: 1.55;
  margin-bottom: 0.9rem;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #cbd5f5;
}

.modal-close:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.modal-link-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
  font-weight: 600;
  text-decoration: none;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.signup-form label {
  font-weight: 600;
  color: #f8fafc;
}

.signup-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
}

.signup-form input:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.email-note {
  font-size: 0.8rem;
  color: #cbd5f5;
  margin-top: 0.25rem;
}

.signup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-link {
  appearance: none;
  background: none;
  border: none;
  color: #38bdf8;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-link:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.5rem;
  color: #facc15;
}

.form-success {
  margin-top: 1.5rem;
  font-size: 1rem;
  color: #bbf7d0;
}

.form-success.hidden {
  display: none;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .share-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .modal-dialog {
    padding: 2rem 1.5rem 1.75rem;
  }
}

@keyframes trmPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trm-badge {
    animation: none;
  }
  .tooltip {
    transition: none;
  }
}
