:root {
  --orange: #f28c00;
  --blue: #1e67a7;
  --brown: #8c5a1a;
  --line: #f08a00;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Tahoma, Arial, sans-serif;
  background: linear-gradient(180deg, #fffef8 0%, #fff 35%, #f7f9fc 100%);
  color: #1a1a1a;
  overflow-x: hidden;
}

.wait-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(16px, 4vw, 32px) clamp(14px, 4vw, 24px) 40px;
  max-width: 560px;
  margin: 0 auto;
}

.wait-hero {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  margin-bottom: clamp(20px, 5vw, 36px);
}

.wait-image {
  width: min(100%, 420px);
  height: auto;
  border-radius: 16px;
  box-shadow:
    0 12px 40px rgba(30, 103, 167, 0.18),
    0 4px 12px rgba(242, 140, 0, 0.12);
  object-fit: contain;
  animation: waitImageFloat 4.5s ease-in-out infinite,
    waitImageIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes waitImageIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes waitImageFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
}

.wait-content {
  width: 100%;
  text-align: center;
}

.wait-title {
  margin: 0 0 12px;
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  font-weight: 800;
  color: var(--brown);
  line-height: 1.35;
  animation: waitTextReveal 1s ease 0.35s both;
}

.wait-text {
  margin: 0 0 24px;
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  line-height: 1.75;
  color: #333;
  animation: waitTextReveal 1s ease 0.55s both;
}

.wait-text p {
  margin: 0 0 10px;
}

.wait-text p:last-child {
  margin-bottom: 0;
}

@keyframes waitTextReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.wait-progress-wrap {
  animation: waitTextReveal 1s ease 0.75s both;
}

.wait-progress-label {
  display: block;
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.wait-progress {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(30, 103, 167, 0.12);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wait-progress-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: right;
  background: linear-gradient(
    90deg,
    var(--blue) 0%,
    #2a8fd4 40%,
    var(--orange) 100%
  );
  animation: waitBarFill 9s cubic-bezier(0.45, 0, 0.15, 1) forwards;
}

.wait-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 45%,
    transparent 90%
  );
  background-size: 200% 100%;
  animation: waitBarShine 2s ease-in-out infinite;
}

@keyframes waitBarFill {
  to {
    transform: scaleX(1);
  }
}

@keyframes waitBarShine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.wait-accent-line {
  height: 3px;
  width: min(200px, 60%);
  margin: 20px auto 0;
  border-radius: 2px;
  background: linear-gradient(to left, #e67e22, var(--orange), #ffcf5a);
  opacity: 0;
  animation: waitTextReveal 0.8s ease 0.9s both;
}

@media (prefers-reduced-motion: reduce) {
  .wait-image,
  .wait-title,
  .wait-text,
  .wait-progress-wrap,
  .wait-progress-fill,
  .wait-progress-fill::after,
  .wait-accent-line {
    animation: none;
  }

  .wait-image {
    opacity: 1;
    transform: none;
  }

  .wait-title,
  .wait-text,
  .wait-progress-wrap,
  .wait-accent-line {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .wait-progress-fill {
    transform: scaleX(1);
  }

  .wait-progress-fill::after {
    display: none;
  }
}
