/* AJC Ideas - small hand-written stylesheet (replaces the Tailwind CDN so the app works offline) */

:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-400: #94a3b8;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --orange: #f97316;
  --orange-100: #ffedd5;
  --red-400: #f87171;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--slate-50);
  color: var(--slate-100);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--orange); color: #fff; }

/* Card */
.card {
  position: relative;
  width: 100%;
  max-width: 56rem;
  padding: 2rem;
  overflow: hidden;
  background: var(--slate-900);
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@media (min-width: 768px) { .card { padding: 4rem; } }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 32rem;
  height: 100%;
  transform: translate(-50%, -50%);
  background: rgba(249, 115, 22, 0.2);
  filter: blur(100px);
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
}

.inner {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top icon */
.badge {
  width: 4rem;
  height: 4rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: var(--slate-800);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}
.badge svg { width: 2rem; height: 2rem; fill: currentColor; }

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}
.spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid rgba(249, 115, 22, 0.3);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-400);
}

/* Content */
.content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.content.is-visible { opacity: 1; transform: scale(1); }

.main-text {
  margin: 0;
  width: 100%;
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 2;
  color: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (min-width: 768px)  { .main-text { font-size: 1.5rem; } }
@media (min-width: 1024px) { .main-text { font-size: 1.875rem; } }
.main-text.is-error { color: var(--red-400); font-family: inherit; font-size: 1.25rem; font-weight: 500; line-height: 1.6; }

.meta {
  width: 100%;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sub-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--orange);
}
@media (min-width: 768px) { .sub-text { font-size: 1rem; } }

.context-text {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 300;
  color: var(--slate-400);
}
@media (min-width: 768px) { .context-text { font-size: 0.875rem; } }

.additional {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  white-space: pre-wrap;
  color: var(--orange-100);
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-left: 4px solid var(--orange);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25);
}

/* Footer */
.footer {
  width: 100%;
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--slate-400);
  border-top: 1px solid rgba(51, 65, 85, 0.5);
}
.footer .status { font-weight: 500; }

.next-btn {
  position: relative;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.next-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.next-btn:focus-visible { outline: 2px solid rgba(249, 115, 22, 0.6); outline-offset: 2px; }
.next-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; }
.next-btn span { font-weight: 500; letter-spacing: 0.025em; }

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .content { transition: none; }
  .spinner { animation-duration: 2.5s; }
}
