* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
}

.hero {
  background: linear-gradient(135deg, #0d1117, #1f2937 60%, #0f172a);
  padding: 4rem 6vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.hero h1 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1.2;
}

.hero .lead {
  max-width: 660px;
  color: #cbd5f5;
}

.eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.3rem;
  text-transform: uppercase;
  color: #7c8799;
}

.hero-device {
  font-size: 0.95rem;
  color: #94a3b8;
  align-self: center;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
}

.content {
  padding: 3rem 6vw 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

.content h2 {
  margin-top: 0;
}

.sequence-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sequence-form textarea {
  font-family: inherit;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
  border-radius: 0.8rem;
  padding: 1rem;
  min-height: 160px;
  resize: vertical;
}

.sequence-form button {
  align-self: flex-start;
  padding: 0.75rem 1.8rem;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  background: linear-gradient(135deg, #38bdf8, #06b6d4);
  cursor: pointer;
}

.loading-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  color: #cbd5f5;
}

.loading-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #38bdf8;
  animation: spin 1s linear infinite;
}

.loading-icon.hidden {
  display: none;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.results-card article {
  padding: 1rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(15, 118, 110, 0.4);
}

.label {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.value {
  margin: 0.2rem 0 0.6rem;
  font-size: 1rem;
}

.value.large {
  font-size: 1.5rem;
  font-weight: 700;
}

.probability {
  font-size: 0.9rem;
  color: #a5b4fc;
}

.info-card .image-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-frame {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem;
}

.image-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 0.8rem;
  object-fit: cover;
}

.caption {
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.error-notice {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  background: rgba(244, 63, 94, 0.15);
  color: #fecdd3;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.footer {
  text-align: center;
  padding: 2rem 0 3rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }
}

/* Wide image frame for 2276x1280 image */
.wide-feature-frame {
  margin-top: 2rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem;
}

.wide-feature-frame img {
  width: 100%;
  height: auto;
  border-radius: 0.8rem;
  display: block;
}