:root {
  color-scheme: light;
  --promo-banner-height: 70px;
  --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;
  overflow-x: hidden;
}

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;
}

.promo-banner {
  min-height: var(--promo-banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(19, 25, 39, 0.1);
  backdrop-filter: blur(6px);
}

.promo-banner-text {
  color: #1f2a44;
  font-size: 1rem;
  font-weight: 600;
}

.promo-banner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(31, 42, 68, 0.18);
  background: #ffffff;
  color: #1f2a44;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(31, 42, 68, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
}

.promo-banner-link > * {
  pointer-events: none;
}

.promo-banner-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.promo-banner-link:hover {
  background: #f3f6ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(31, 42, 68, 0.18);
}

.promo-banner-link-text {
  letter-spacing: 0.01em;
}

.promo-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 66px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1f2a44;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 24px 136px;
  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;
  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;
  text-align: center;
}

.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;
}

.created-questions {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.created-questions-header h3 {
  margin: 0;
  font-size: 1rem;
}

.created-questions-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.created-questions-empty {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.created-questions-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.created-question-item {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.created-question-text {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.created-question-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.created-question-actions .btn {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.created-question-actions .btn.is-success {
  background: rgba(52, 197, 154, 0.2);
  border: 1px solid rgba(52, 197, 154, 0.55);
  color: #1c6b54;
}

.created-question-actions .btn.is-remove {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #b42318;
  min-width: 56px;
}

.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: translate3d(-50%, -50%, 0) scale(0.9);
  z-index: 10;
  min-width: min(320px, 84vw);
  padding: 24px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 20, 36, 0.08);
  box-shadow: 0 18px 34px rgba(25, 33, 48, 0.18);
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 0;
  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);
  margin: 0 auto;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  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: flex;
  animation: egg-pop 520ms cubic-bezier(0.16, 0.84, 0.24, 1);
}

.eggs-emoji {
  display: block;
  font-size: clamp(5.6rem, 13vw, 9rem);
  line-height: 0.95;
}

.eggs-text {
  display: block;
  font-size: clamp(1.7rem, 4.3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #12182a;
}

.party-popper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  overflow: hidden;
}

.party-popper-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  opacity: 0;
  animation: confetti-burst 1200ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.party-popper-piece.is-square {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.party-popper-piece.is-circle {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.prank-note {
  position: fixed;
  left: 50%;
  bottom: 12px;
  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;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  text-align: left;
  width: min(94vw, 560px);
}

.prank-note.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: prank-note-pop 620ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.prank-note-copy {
  padding-right: 20px;
}

.prank-note-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(31, 42, 68, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: #1f2a44;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prank-note-close:hover {
  background: #fff;
}

.prank-reopen {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 13;
  border: 1px solid rgba(122, 162, 255, 0.45);
  background: #fff;
  color: #1f2a44;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(25, 33, 48, 0.18);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.prank-reopen svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex-shrink: 0;
}

.prank-reopen.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.prank-share-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
}

.prank-share-actions::-webkit-scrollbar {
  display: none;
}

.share-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  height: 44px;
  padding: 0 15px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn:focus-visible {
  outline: 2px solid rgba(31, 42, 68, 0.35);
  outline-offset: 2px;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}

.share-btn-label {
  line-height: 1;
  letter-spacing: 0.01em;
}

.share-btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 8px 14px rgba(37, 211, 102, 0.32);
}

.share-btn-messenger {
  background: linear-gradient(135deg, #00b2ff, #006aff);
  color: #fff;
  box-shadow: 0 8px 14px rgba(0, 106, 255, 0.28);
}

.share-btn-copy {
  background: #fff;
  border-color: rgba(31, 42, 68, 0.16);
  color: #1f2a44;
  box-shadow: 0 6px 12px rgba(31, 42, 68, 0.12);
}

.share-btn-native {
  background: #eef3ff;
  border-color: rgba(31, 42, 68, 0.14);
  color: #1f2a44;
  box-shadow: 0 6px 12px rgba(31, 42, 68, 0.1);
}

.prank-create-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 1rem;
}

.prank-note-divider {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.prank-note h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  color: #1f2a44;
}

.prank-note span {
  display: block;
  margin-top: 4px;
  line-height: 1.4;
}

.prank-note br {
  display: none;
}

.site-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(233, 241, 255, 0.97);
  color: #1f2a44;
  border-top: 1px solid rgba(31, 42, 68, 0.14);
  box-shadow: 0 -8px 18px rgba(31, 42, 68, 0.14);
}

.site-notice-text {
  margin: 0;
  font-size: 0.96rem;
  text-align: center;
  line-height: 1.35;
}

.site-notice-link {
  color: #1f2a44;
  text-decoration: underline;
  font-weight: 700;
  margin-left: 6px;
}

.site-notice-follow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #0f1419;
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid #0f1419;
}

.site-notice-follow:hover {
  background: #1b232c;
  border-color: #1b232c;
}

.site-notice-follow:focus-visible {
  outline: 2px solid rgba(31, 42, 68, 0.35);
  outline-offset: 2px;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-1px);
  }
  50% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes egg-pop {
  0% {
    transform: translate3d(-50%, -50%, 0) scale(0.72);
    opacity: 0;
  }
  45% {
    transform: translate3d(-50%, -50%, 0) scale(1.08);
    opacity: 1;
  }
  72% {
    transform: translate3d(-50%, -50%, 0) scale(0.94);
    opacity: 1;
  }
  100% {
    transform: translate3d(-50%, -50%, 0) scale(0.9);
    opacity: 1;
  }
}

@keyframes confetti-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--confetti-x)),
        calc(-50% + var(--confetti-y))
      )
      rotate(var(--confetti-rotate)) scale(1);
  }
}

@keyframes prank-note-pop {
  0% {
    transform: translateX(-50%) translateY(120%) scale(0.92);
    opacity: 0;
  }
  45% {
    transform: translateX(-50%) translateY(-8px) scale(1.03);
    opacity: 1;
  }
  72% {
    transform: translateX(-50%) translateY(3px) scale(0.99);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .party-popper-piece {
    animation-duration: 1ms;
  }

  .prank-note.is-visible {
    animation: none;
  }
}

@media (max-width: 720px) {
  :root {
    --promo-banner-height: 70px;
  }

  .promo-banner {
    justify-content: space-around;
    gap: 0px;
    padding: 8px 12px;
  }

  .promo-banner-text {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .promo-banner-link {
    min-height: 42px;
    gap: 8px;
    padding: 4px 10px;
    font-size: 0.84rem;
  }

  .promo-banner-link-text {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .promo-banner-cta {
    height: 28px;
    min-width: 52px;
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .app {
    padding: 44px 16px 122px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .question {
    font-size: 1.4rem;
  }

  .answers {
    flex-direction: row;
    justify-content: center;
  }

  .answers .btn {
    min-width: 120px;
  }

  .created-question-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .created-question-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .prank-note br {
    display: inline;
  }

  .eggs {
    top: 42%;
    min-width: min(300px, 90vw);
    padding: 20px 22px;
    gap: 8px;
  }

  .prank-reopen {
    right: 10px;
    bottom: 12px;
  }

  .prank-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    overflow: visible;
    padding: 0;
  }

  .share-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0 16px;
  }

  .share-btn-whatsapp,
  .share-btn-messenger {
    grid-column: 1 / -1;
  }

  .site-notice {
    justify-content: center;
    padding: 10px 12px;
  }

  .site-notice-text {
    text-align: center;
    font-size: 0.9rem;
  }
}
