:root {
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #fef3c7, #fde68a 35%, #fef9c3 70%);
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #111827;
}

.app {
  max-width: 480px;
  width: 100%;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card__header {
  text-align: center;
}

.card__header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.subtitle {
  margin: 8px 0 0;
  color: #4b5563;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 480px) {
  .choices {
    flex-direction: row;
  }
}

.choice {
  flex: 1;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  color: #78350f;
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.35);
}

.choice:hover,
.choice:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(251, 191, 36, 0.5);
}

.choice:active {
  transform: translateY(1px);
}

.choice--mean {
  background: linear-gradient(135deg, #fca5a5, #f87171);
  color: #7f1d1d;
  box-shadow: 0 10px 20px rgba(248, 113, 113, 0.35);
}

.view {
  display: none;
  text-align: center;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.view--active {
  display: flex;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 5px solid rgba(15, 23, 42, 0.15);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

.phrase {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.stats {
  margin: 0;
  color: #6b7280;
}

.share {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .share {
    display: none;
  }
}

.share__title {
  margin: 0;
  font-weight: 600;
  color: #1f2937;
}

.share__icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.share__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  color: #f9fafb;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.share__icon:hover,
.share__icon:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(17, 24, 39, 0.16);
  filter: brightness(1.05);
}

.share__icon:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 3px;
}

.share__icon-symbol {
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.share__icon--twitter {
  background: #111827;
}

.share__icon--facebook {
  background: #2563eb;
  font-size: 1.3rem;
}

.share__icon--linkedin {
  background: #0ea5e9;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.share__icon--native .share__icon-symbol {
  font-size: 1.1rem;
}

.share__icon--native {
  background: #111827;
}

.share__icon[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: none;
}

.retry {
  align-self: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #f9fafb;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.2);
}

.retry:hover,
.retry:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(17, 24, 39, 0.3);
}

.error {
  display: block;
  margin-top: 12px;
  color: #b91c1c;
  font-weight: 600;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
