:root {
  font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
  color: #1c1917;
  background: linear-gradient(160deg, #f5f5f4 0%, #e7e5e4 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.card {
  width: min(700px, 100%);
  background: #ffffff;
  border-radius: 6px;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.12);
}

h1,
h2 {
  margin: 0 0 0.7rem;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #57534e;
  margin: 0 0 1.2rem;
}

.question-box {
  white-space: pre-wrap;
  line-height: 1.5;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  background: #fafaf9;
  padding: 1rem;
  margin-bottom: 1rem;
}

.input-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.answer-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.primary-btn {
  background: #1f2937;
  color: #fff;
  width: 100%;
}

.primary-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.primary-btn:hover:not(:disabled),
.secondary-btn:hover {
  filter: brightness(0.96);
}

.secondary-btn {
  background: #e7e5e4;
  color: #1c1917;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.share-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.attempts {
  margin-top: 0.8rem;
  text-align: center;
  color: #44403c;
}

.error {
  color: #b91c1c;
  text-align: center;
  margin-bottom: 0.8rem;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.38);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.popup {
  width: min(350px, 100%);
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.2);
}

.answered-block {
  margin-top: 1rem;
}

.trivia-box {
  margin-top: 1rem;
  border: 1px solid #d6d3d1;
  border-radius: 8px;
  background: #fafaf9;
  padding: 1rem;
}

.trivia-box h3 {
  margin: 0 0 0.6rem;
}

.trivia-box p {
  margin: 0;
  line-height: 1.5;
}
