:root {
  color-scheme: light;
  --bg: #f7f8ff;
  --card: rgba(255, 255, 255, 0.92);
  --card-strong: #ffffff;
  --border: rgba(19, 25, 39, 0.08);
  --text: #101424;
  --muted: #5b667b;
  --accent: #ff8a5c;
  --accent-2: #7aa2ff;
  --success: #34c59a;
  --shadow: 0 10px 20px rgba(25, 33, 48, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f7f8ff;
  color: var(--text);
  font-family:
    'Avenir Next', 'Avenir', 'Futura', 'Segoe UI', 'Inter', Arial, sans-serif;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(255, 199, 124, 0.25), transparent 55%),
    radial-gradient(
      circle at 10% 20%,
      rgba(122, 162, 255, 0.25),
      transparent 50%
    );
  opacity: 0.4;
  z-index: -1;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
}

.app-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  gap: 2px;
  align-items: center;
}

.emoji-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.brand-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
  font-weight: 600;
}

.brand-title .brand-yes {
  color: #1c6b54;
}

.brand-title .brand-no {
  color: #b84a2e;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.timer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.quiz {
  position: relative;
  padding-top: 56px;
  margin-top: auto;
  margin-bottom: auto;
}

.timer-float {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 6px 12px rgba(122, 162, 255, 0.18);
}

.countdown {
  font-family: 'ds-digitalbold', 'Segoe UI', monospace;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.timer.is-urgent {
  box-shadow: 0 0 12px rgba(255, 138, 92, 0.45);
}

.timer.is-urgent .countdown,
.timer.is-urgent .emoji-icon {
  animation: shake 0.6s infinite;
}

.question-area {
  margin: 24px 0;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.question {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.4;
}

.loading {
  font-size: 2rem;
  line-height: 1;
}

.loading.is-hidden {
  display: none;
}

.answers {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 16px rgba(122, 162, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(16, 20, 36, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-text {
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}

.create-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.create-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.create-title h2 {
  margin: 0;
}

.create-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: inherit;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: inherit;
  color: var(--muted);
}

.field.is-hidden {
  display: none;
}

.field input,
.field textarea {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(16, 20, 36, 0.03);
  color: var(--text);
  font-size: 1rem;
}

.field textarea {
  resize: vertical;
}

.create-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: inherit;
  margin-top: 12px;
}

.answers {
  justify-content: center;
}

.answers .btn {
  font-size: 1.1rem;
  padding: 14px 32px;
  min-width: 140px;
}

.answers [data-answer='yes'] {
  background: rgba(83, 209, 165, 0.18);
  border: 1px solid rgba(83, 209, 165, 0.4);
}

.answers [data-answer='no'] {
  background: rgba(255, 138, 92, 0.16);
  border: 1px solid rgba(255, 138, 92, 0.4);
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.link-row .btn {
  white-space: nowrap;
  padding-inline: 18px;
}

.link-row .btn.is-success {
  background: rgba(52, 197, 154, 0.2);
  border: 1px solid rgba(52, 197, 154, 0.5);
  color: #1c6b54;
}

.helper {
  color: var(--muted);
  font-size: 0.9rem;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 36, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.overlay.is-visible {
  display: flex;
}

.overlay-card {
  background: var(--card-strong);
  border-radius: 20px;
  padding: 24px;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.overlay-card h3 {
  margin-top: 0;
}

.eggs {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 12;
  display: none;
  animation: pop 0.6s ease;
  width: min(280px, 70vw);
  height: auto;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11;
}

.modal.is-visible {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 36, 0.45);
}

.modal-card {
  position: relative;
  width: min(720px, 90vw);
  background: var(--card);
  border-radius: 20px;
  padding: 22px 24px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  z-index: 1;
}

.create-header {
  align-items: center;
  margin-bottom: 4px;
  padding-right: 40px;
}

.create-title {
  gap: 10px;
}

.modal-card .form-grid {
  margin-top: 8px;
}

.modal-card .btn-text {
  position: absolute;
  top: 16px;
  right: 16px;
}

.eggs.is-visible {
  display: block;
}

.prank-note {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(120%);
  background: var(--card-strong);
  color: var(--text);
  border: 2px solid rgba(122, 162, 255, 0.4);
  border-radius: 24px;
  padding: 18px 20px;
  font-size: 1rem;
  box-shadow: 0 16px 32px rgba(25, 33, 48, 0.18);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  text-align: left;
  width: min(94vw, 560px);
}

.prank-note.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.prank-note .btn {
  padding: 16px 26px;
  font-size: 1.1rem;
  box-shadow: 0 10px 20px rgba(122, 162, 255, 0.35);
  white-space: nowrap;
}

.prank-note h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1f2a44;
  white-space: nowrap;
}

.prank-note span {
  flex: 1 1 220px;
  min-width: 0;
  line-height: 1.4;
}

.prank-note br {
  display: none;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes pop {
  0% {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 32px 16px 64px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .question {
    font-size: 1.4rem;
  }

  .answers {
    flex-direction: row;
    justify-content: center;
  }

  .answers .btn {
    min-width: 120px;
  }

  .prank-note br {
    display: inline;
  }
}
