* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #1b102c 0%, #3a1654 50%, #8f1d58 100%);
  color: #fff;
  padding: 18px;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-block;
  background: rgba(255, 133, 179, 0.22);
  color: #ff9ec4;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

h1 {
  font-size: 1.55rem;
  line-height: 1.3;
  margin-bottom: 10px;
}

p.desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #f3dce9;
  margin-bottom: 22px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4b8b, #ff9a8b);
  transition: width 0.35s ease;
}

.question {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.98rem;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.option-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.option-btn.correct {
  background: rgba(46, 204, 113, 0.32);
  border-color: #2ecc71;
  font-weight: 600;
}

.option-btn.wrong {
  background: rgba(231, 76, 60, 0.32);
  border-color: #e74c3c;
}

.option-btn:disabled {
  cursor: default;
}

.feedback {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.92rem;
  line-height: 1.45;
  color: #ffe3ef;
  display: none;
}

.primary-btn {
  width: 100%;
  margin-top: 20px;
  background: linear-gradient(90deg, #ff4b8b, #ff758c);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 75, 139, 0.4);
  transition: transform 0.15s ease;
}

.primary-btn:active {
  transform: scale(0.97);
}

.gift-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px dashed rgba(255, 182, 213, 0.65);
  text-align: center;
}

.gift-box h3 {
  color: #ff9ec4;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.gift-message {
  font-size: 0.95rem;
  line-height: 1.5;
}

.heart {
  position: fixed;
  bottom: -20px;
  font-size: 22px;
  animation: floatUp 3s linear forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatUp {
  to {
    transform: translateY(-110vh) rotate(20deg);
    opacity: 0;
  }
}

.hidden {
  display: none;
}

.letter-wrapper {
  margin-top: 18px;
}

.letter-trigger {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 194, 220, 0.75);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease;
}

.letter-trigger:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.letter-trigger:active {
  transform: scale(0.98);
}

/* Kontejner animace rozbalení */
.letter-envelope {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.letter-envelope.open {
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 1;
  margin-top: 14px;
  padding-right: 4px;
}

/* Samotný papír dopisu */
.letter-paper {
  background: #fff9f5;
  color: #2c1824;
  border-radius: 16px;
  padding: 20px 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  border-left: 4px solid #ff4b8b;
  transform: translateY(-18px) scale(0.97);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: left;
}

.letter-envelope.open .letter-paper {
  transform: translateY(0) scale(1);
}

.letter-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b82963;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 41, 99, 0.15);
}

.letter-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 11px;
}

.letter-body p:last-child {
  margin-bottom: 0;
}

.letter-sign {
  margin-top: 14px;
  font-weight: 700;
  color: #8f1d58;
  text-align: right;
}