@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@700&family=Raleway&family=Caveat&display=swap');

body {
  margin: 0;
  font-family: sans-serif;
  background-color: #000b0d;
  background-image: url('images/background.jpg');
  background-repeat: no-repeat;
  background-position: top center;
  background-attachment: scroll;
  background-size: 100% auto;
}

.container {
  width: 100%;
  max-width: 400px;
  padding: 0 16px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
}

@media (min-width: 768px) { .container { max-width: 600px; } }
@media (min-width: 1024px) { .container { max-width: 680px; } }
@media (min-width: 1440px) { .container { max-width: 800px; } }

.block-1 {
  height: 135px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 45px;
  background-color: transparent;
}

.logo-wrapper {
  width: 95px;
  height: 95px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 100%);
  mask-size: cover;
  mask-repeat: no-repeat;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.25;
}

.block-2 {
  padding: 0;
  text-align: center;
  overflow: hidden;
}

.universe-text {
  font-family: 'Amatic SC', cursive;
  color: #ced4da;
  font-size: 47px;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.7px;
}

.block-3 {
  padding: 40px 16px 0;
  text-align: center;
}

.universe-subtext {
  font-family: 'Raleway', sans-serif;
  color: #ced4da;
  font-size: 18px;
  line-height: 30.6px;
  letter-spacing: 0.9px;
  max-width: 337px;
  margin: 0 auto;
}

.block-4 {
  padding: 40px 16px 0;
  text-align: center;
}

.wish-button {
  font-family: Roboto, sans-serif;
  font-size: 18px;
  letter-spacing: 0.5px;
  font-weight: 500;
  color: #5e4634;
  background-color: rgba(255, 234, 167, 0.9);
  border: none;
  border-radius: 40px;
  padding: 14px 37px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  transition: transform 1s ease;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

.wish-button:not(.pulse-fade-out) {
  animation: pulseGlow 4s infinite ease-in-out;
}

.wish-button:hover {
  background-color: #ffdd80;
}

.block-5 {
  padding: 35px 16px 0;
  text-align: center;
}

.price {
  font-family: Roboto, sans-serif;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.price-sub {
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  margin: 4px 0 0;
}

.block-6 {
  margin-top: 40px;
  text-align: center;
  position: relative;
  padding: 30px 16px 0;
}

.fade-text {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: #ced4da;
  line-height: 1.6;
  max-width: 350px;
  margin: 0 auto;
  font-weight: 400;
  opacity: 0.7;
}

.fade-line {
  height: 1px;
  width: 100%;
  margin: 20px auto;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
}

.block-7 {
  padding: 60px 16px 30px;
  text-align: center;
  color: #ced4da;
}

.universe-title {
  font-family: 'Raleway', sans-serif;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 400;
  margin: 0 0 40px;
  opacity: 0.8;
}

.wish-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.step-number {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}

.step-number svg {
  display: block;
  width: 100%;
  height: 100%;
}

.step-text {
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.75;
  max-width: 300px;
}

.block-8 {
  margin-top: 40px;
  text-align: center;
  position: relative;
  padding: 20px 16px 60px;
}

.wait-text {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: #ced4da;
  opacity: 0.6;
  margin: 0 auto;
}

/* === Пульсация — кнопка, фрейм, textarea === */
@keyframes pulseGlow {
  0%   { box-shadow: 0 0 1px rgba(255,255,255,0.5), 0 0 3px rgba(255,234,167,0.3); }
  50%  { box-shadow: 0 0 9px rgba(255,255,255,0.85), 0 0 19px rgba(255,234,167,0.5); }
  100% { box-shadow: 0 0 1px rgba(255,255,255,0.5), 0 0 3px rgba(255,234,167,0.3); }
}

.pulse-glow {
  animation: pulseGlow 4s infinite ease-in-out;
}

.pulse-fade-out {
  animation: none !important;
  box-shadow: none !important;
}

.wish-input:focus {
  animation: pulseGlow 4s infinite ease-in-out;
  border: none;
}

.logo-wrapper.rotating {
  animation: rotateAndShrink 4.5s linear infinite;
}

@keyframes rotateAndShrink {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(-180deg) scale(1.3); }
  100% { transform: rotate(-360deg) scale(1); }
}

.fade-out {
  opacity: 0 !important;
  transition: opacity 1.2s ease;
}

.main-wrapper {
  position: relative;
}

.wish-frame {
  position: absolute;
  padding: 0 20px;
  margin: 0 5px;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0;
  overflow: hidden;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  transition: height 2s ease;
  z-index: 0;
}
.wish-button,
.wish-button * {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
  outline: none;
}

.wish-button.move-up {
  transform: translateY(-25px);
  transition: transform 1s ease;
}

.wish-title,
.wish-input {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.wish-title {
  font-family: 'Amatic SC', cursive;
  font-size: 28px;
  color: #ffffff;
  margin: 20px;
  text-align: center;
  letter-spacing: 1px;
}

.wish-input {
  display: block;
  width: 100%;
  margin: 0 auto;
  border-radius: 16px;
  border: none;
  padding: 16px;
  font-size: 18px;
  font-family: 'Caveat', cursive;
  box-sizing: border-box;
  resize: none;
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  backdrop-filter: blur(2px);
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  .universe-text { font-size: 49px; }
  .block { font-size: 4vw; }
  .wish-steps {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
  .step-text { max-width: 100%; }
}

@media (min-width: 1024px) {
  .universe-text { font-size: 49px; }
  body { background-size: auto; }
}
