/* Frost / liquid glass кнопки для новогодних страниц
   Используется только на:
   - /public/newyear/index.html
   - /public/newyear/status.html
*/

.frost-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(10, 16, 40, 0.95);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96),
    rgba(186, 205, 255, 1)
  );
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 18px 40px rgba(4, 24, 100, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.frost-button span {
  position: relative;
  z-index: 5;
}

/* Блик, пробегающий по кнопке */
.frost-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -140%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent,
    rgba(255, 255, 255, 0.7),
    transparent
  );
  opacity: 0;
  transform: skewX(-15deg);
  transition:
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.55s ease-out;
  z-index: 2;
}

.frost-button:hover::before {
  opacity: 1;
  transform: translateX(260%) skewX(-15deg);
}

.frost-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1),
    rgba(214, 229, 255, 1)
  );
  box-shadow:
    0 22px 50px rgba(3, 20, 95, 1);
}

.frost-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    0 10px 26px rgba(8, 26, 90, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Слои морозных узоров */
.frost-layer-1,
.frost-layer-2,
.frost-layer-3,
.frost-texture {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease-in-out;
}

.frost-layer-1 {
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.06) 3px,
      rgba(255, 255, 255, 0.06) 6px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(200, 230, 255, 0.05) 3px,
      rgba(200, 230, 255, 0.05) 6px
    );
}

.frost-layer-2 {
  background-image:
    repeating-conic-gradient(
      from 0deg at 30% 30%,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0.18) 15deg,
      rgba(255, 255, 255, 0) 30deg
    ),
    repeating-conic-gradient(
      from 45deg at 70% 70%,
      rgba(200, 230, 255, 0) 0deg,
      rgba(200, 230, 255, 0.14) 15deg,
      rgba(200, 230, 255, 0) 30deg
    );
  filter: blur(0.4px);
}

.frost-layer-3 {
  background:
    radial-gradient(
      ellipse at 15% 20%,
      rgba(255, 255, 255, 0.32) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 85% 80%,
      rgba(200, 230, 255, 0.28) 0%,
      transparent 40%
    ),
    radial-gradient(
      circle at 50% 50%,
      transparent 30%,
      rgba(255, 255, 255, 0.18) 60%,
      transparent 72%
    );
  mix-blend-mode: screen;
}

.frost-texture {
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.06) 2px,
      rgba(255, 255, 255, 0.06) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.06) 2px,
      rgba(255, 255, 255, 0.06) 4px
    );
}

/* Активный "замороженный" режим */
.frost-button.frosting .frost-layer-1,
.frost-button.frosting .frost-layer-2,
.frost-button.frosting .frost-layer-3,
.frost-button.frosting .frost-texture {
  opacity: 1;
}

.frost-button.frosting {
  animation: shimmer 4s ease-in-out infinite;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1),
    rgba(214, 229, 255, 0.98)
  );
}

@keyframes shimmer {
  0%, 100% {
    filter: brightness(1) contrast(1);
  }
  50% {
    filter: brightness(1.08) contrast(1.06);
  }
}
