*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #f7d9e8;
  font-family: 'Super Malibu', sans-serif;
  color: #800017;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

body.intro-active {
  overflow: hidden;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #F7D9E8;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.intro.intro--replay:not(.intro--playing) {
  opacity: 0;
}

.intro.intro--replay.intro--playing {
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.intro__confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro__confetti svg {
  width: 100%;
  height: 100%;
}

.intro--done {
  opacity: 0;
  visibility: hidden;
}

.sad-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff98ca;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.sad-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.sad-overlay__lottie {
  width: min(280px, 72vw);
  height: min(280px, 72vw);
}

.sad-overlay__lottie svg {
  width: 100%;
  height: 100%;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: calc(100% + 40px);
  margin-inline: -20px;
  padding: 20px;
  flex-shrink: 0;
}

.hero__balloons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__row--age {
  margin-top: -52px;
  padding-left: 24px;
}

.balloon {
  position: relative;
  display: block;
  width: auto;
  height: auto;
  flex-shrink: 0;
  transform-origin: center bottom;
  animation: balloon-float var(--float-duration, 4s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
}

.hero__row--name .balloon {
  max-height: 106px;
  position: relative;
left: 4px;
}

.hero__row--age .balloon {
  max-height: 130px;
}

.balloon--h {
  z-index: 1;
  --balloon-tilt: -2deg;
  --float-delay: 0s;
  --float-duration: 4.2s;
}

.balloon--a1 {
  z-index: 2;
  margin-left: -10px;
  --balloon-tilt: 4deg;
  --float-delay: 0.5s;
  --float-duration: 4.6s;
}

.balloon--n1 {
  z-index: 3;
  margin-left: -2px;
  --balloon-tilt: 4deg;
  --float-delay: 1s;
  --float-duration: 3.8s;
}

.balloon--n2 {
  z-index: 4;
  margin-left: 12px;
  --balloon-tilt: -4deg;
  --float-delay: 0.25s;
  --float-duration: 4.8s;
}

.balloon--a2 {
  z-index: 5;
  margin-left: 4px;
  --balloon-tilt: -4deg;
  --float-delay: 0.75s;
  --float-duration: 4.4s;
}

.balloon--3 {
  z-index: 6;
  --balloon-tilt: -8deg;
  --float-delay: 0.15s;
  --float-duration: 4.5s;
}

.balloon--0 {
  z-index: 7;
  margin-left: -36px;
  --balloon-tilt: 6deg;
  --float-delay: 0.6s;
  --float-duration: 4.1s;
}

.balloon--aring {
  margin-left: -4px;
    --balloon-tilt: -3deg;
    --float-delay: 1.1s;
    --float-duration: 4.7s;
    max-height: 145px !important;
    z-index: 8;
}

.balloon--r {
  z-index: 9;
  margin-left: -28px;
  --balloon-tilt: 5deg;
  --float-delay: 0.35s;
  --float-duration: 4s;
}

@keyframes balloon-float {
  0%, 100% {
    transform: translate(0, 0) rotate(var(--balloon-tilt, 0deg));
  }

  50% {
    transform: translate(1.5px, -4.5px) rotate(calc(var(--balloon-tilt, 0deg) + 1.1deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .balloon {
    animation: none;
    transform: rotate(var(--balloon-tilt, 0deg));
  }
}

.welcome {
  display: flex;
  justify-content: center;
  width: 100%;
}

.welcome__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(349px, 100%);
}

.welcome__gift {
  width: 245px;
  height: auto;
  margin-bottom: -92px;
  z-index: 1;
}

.welcome__gift.is-open {
  width: 245px;
  height: auto;
  margin-bottom: -70px;
  z-index: 1;
}

.welcome__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 88px 24px 36px;
  background: #fff;
  border-radius: 20px;
}

.welcome__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.welcome__hurra {
  margin: 0;
  color: #ff98ca;
  font-size: 26px;
  line-height: 1.2;
}

.welcome__label {
  margin: 0;
  color: #800017;
  font-size: 32px;
  line-height: 1.2;
  text-transform: uppercase;
}

.btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  border: none;
  background: transparent;
  padding: 0 0 8px;
}

.btn__shadow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #580010;
}

.btn__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: #800017;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn:active .btn__face {
  transform: translateY(6px);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
}

.btn--small {
  padding-bottom: 6px;
}

.btn--small .btn__shadow,
.btn--small .btn__face {
  border-radius: 10px;
}

.btn--small .btn__face {
  gap: 10px;
  padding: 10px 14px;
  font-size: 19px;
  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
}

.btn--small:active .btn__face {
  transform: translateY(5px);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
}

.btn__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.15));
}

.btn__icon--play {
  width: 28px;
  height: 28px;
}

.bonanza {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.bonanza__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.bonanza__paket {
  margin: 0;
  color: #ff98ca;
  font-size: 40px;
  line-height: 0.9;
}

.bonanza__name {
  margin: 0;
  color: #800017;
  font-size: clamp(52px, 15vw, 70px);
  line-height: 0.9;
}

.carousel {
  width: min(100vw, 700px);
  max-width: 700px;
  margin-inline: calc(50% - min(50vw, 350px));
  min-width: 0;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.carousel__track {
  width: 100%;
  max-width: 700px;
  min-width: 0;
  padding-block: 16px;
  padding-inline: calc(50% - 95px);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

#carousel-reel,
.carousel__reel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 30px;
  width: max-content;
  max-width: none;
  will-change: transform;
}

.paket-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 190px;
  width: 190px;
  max-width: 190px;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.paket-item--active {
  transform: scale(1.05);
}

.paket-item__flip {
  width: 190px;
  height: 190px;
  perspective: 900px;
}

.paket-item__flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.4s cubic-bezier(0.35, 0, 0.15, 1);
}

.paket-item--opened .paket-item__flip-inner {
  transform: rotateY(180deg);
}

.paket-item--instant .paket-item__flip-inner {
  transition: none;
}

.paket-item__flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}

.paket-item__flip-face--back {
  transform: rotateY(180deg);
}

.paket-item__circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #800017;
}

.paket-item__circle--opened {
  background: #f7d9e8;
}

.paket-item__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-top: 24px;
  color: #ff98ca;
  text-align: center;
  text-transform: uppercase;
}

.paket-item__level {
  font-size: 14px;
  line-height: 1;
}

.paket-item__name {
  font-size: 24px;
  line-height: 1;
  text-transform: none;
}

.paket-item__icon {
  width: auto;
  max-width: 72%;
  height: auto;
  margin-top: auto;
  padding-bottom: 10px;
  object-fit: contain;
  transform: rotate(6deg) translateY(14px);
}

.paket-item__icon--dejting {
  max-width: 68%;
  transform: rotate(6deg) translateY(14px);;
}

.paket-item__icon--utflykt {
  max-width: 79%;
  transform: translateY(20px);
}

.paket-item__reveal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 18px 14px;
  background-color: #f7d9e8;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.paket-item__reveal-text {
  margin: 0;
  color: #800017;
  font-size: clamp(17px, 4.8vw, 22px);
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.35);
}

.paket-item__reveal--present-1 {
  background-image: url('../assets/reveal-present-1.png');
}

.paket-item__reveal--present-2 {
  background-image: url('../assets/reveal-present-2.png');
}

.paket-item__reveal--dejting-1 {
  background-image: url('../assets/reveal-dejting-1.png');
}

.paket-item__reveal--dejting-2 {
  background-image: url('../assets/reveal-dejting-2.png');
}

.paket-item__reveal--utflykt-1 {
  background-image: url('../assets/reveal-utflykt-1.png');
}

.paket-item__reveal--utflykt-2 {
  background-image: url('../assets/reveal-utflykt-2.png');
}

.bonanza__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}

.bonanza__spin-note {
  width: 100%;
  max-width: 300px;
  margin: 0;
  color: #800017;
  font-size: 18px;
  text-align: center;
  line-height: 1.35;
  background-color: #fff;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 20px;
  border-radius: 10px;
}

.bonanza__spin-note:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bonanza__spin-note[hidden],
.bonanza__spin-note--hidden {
  display: none !important;
}

.bonanza__spin-note-line {
  display: block;
}

.btn--locked {
  opacity: 0.55;
}

.btn--locked .btn__face {
  cursor: not-allowed;
}

.bonanza__alt {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 10px;
  color: #800017;
  font-size: 18px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.bonanza__alt p {
  margin: 0;
}

.bonanza__code {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.modal {
  width: min(320px, calc(100% - 40px));
  padding: 0;
  border: none;
  border-radius: 20px;
  background: #fff;
  color: #800017;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.modal.modal--shake {
  animation: modal-shake 0.45s ease;
}

@keyframes modal-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.modal__content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 28px 28px;
}

.modal__title {
  margin: 0;
  color: #800017;
  font-size: 36px;
  line-height: 1;
  text-align: center;
}

.modal__text {
  margin: 0;
  color: #800017;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

.modal__input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #800017;
  border-radius: 12px;
  font: inherit;
  color: #800017;
  text-align: center;
  outline: none;
}

.modal__input::placeholder {
  color: rgba(128, 0, 23, 0.45);
}

.modal__input:focus {
  border-color: #800017;
}

.modal__buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}

.modal__buttons .btn {
  width: 100%;
}

.modal__buttons .btn__face {
  width: 100%;
}

.btn--modal {
  padding-bottom: 8px;
}

.btn--modal .btn__shadow,
.btn--modal .btn__face {
  border-radius: 12px;
}

.btn--modal .btn__face {
  padding: 14px 18px;
  font-size: 24px;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
}

.btn--modal:active .btn__face {
  transform: translateY(6px);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.2),
    inset 0 -2px 2px rgba(0, 0, 0, 0.1);
}

.modal__close {
  align-self: center;
  padding: 0;
  border: none;
  background: transparent;
  color: #800017;
  font: inherit;
  cursor: pointer;
  font-size: 18px;
  text-decoration: underline;
}

.carousel__track.is-spinning,
.carousel__track.is-settling {
  scroll-behavior: auto;
  pointer-events: none;
}

.welcome__card--opened {
  gap: 0;
}

.welcome__label--opened {
  font-size: 28px;
}

.welcome__gift.is-open {
  animation: gift-pop 0.5s ease;
}

@keyframes gift-pop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.08) rotate(-4deg); }
  60% { transform: scale(1.08) rotate(4deg); }
}
