/* ==============================================
   Component: Warning — экран угрозы после скримера
   ============================================== */

.warning {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: #050005;
  text-align: center;
  overflow: hidden;
}

.warning--active {
  display: flex;
  animation: warningFadeIn 0.5s ease both;
}

@keyframes warningFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Красная мигающая виньетка по краям */
.warning::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 150px rgba(180, 0, 0, 0.4),
              inset 0 0 300px rgba(100, 0, 0, 0.2);
  animation: warningVignettePulse 2s ease-in-out infinite;
}

@keyframes warningVignettePulse {
  0%, 100% {
    box-shadow: inset 0 0 150px rgba(180, 0, 0, 0.4),
                inset 0 0 300px rgba(100, 0, 0, 0.2);
  }
  50% {
    box-shadow: inset 0 0 200px rgba(220, 0, 0, 0.6),
                inset 0 0 400px rgba(130, 0, 0, 0.3);
  }
}

/* Шум / статика на фоне */
.warning::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  opacity: 0.15;
  animation: warningNoise 0.1s steps(3) infinite;
}

@keyframes warningNoise {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2px, 1px); }
  66%  { transform: translate(1px, -2px); }
  100% { transform: translate(2px, 2px); }
}

/* ── Контент ── */

.warning__content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  animation: warningContentIn 0.8s ease 0.3s both;
}

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

/* Иконка */
.warning__icon {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: var(--space-lg);
  animation: warningIconPulse 1s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.5));
}

@keyframes warningIconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.8; }
}

/* Заголовок */
.warning__title {
  font-family: var(--font-family-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: var(--font-weight-extrabold);
  color: #ff1a1a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-lg);
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.5),
               0 0 40px rgba(255, 0, 0, 0.2);
}

/* Текст */
.warning__text {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #cc9999;
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

.warning__text strong {
  color: #ff4444;
  font-weight: var(--font-weight-semibold);
}

/* Статус-лейбл */
.warning__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-xl);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: #ff4444;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  animation: statusBlink 1.5s steps(2) infinite;
}

.warning__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff0000;
  box-shadow: 0 0 8px #ff0000;
}

@keyframes statusBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.4; }
}

/* ── Кнопки ── */

.warning__buttons {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* Кнопка «Да» — тёмная, подавленная */
.warning__btn {
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-family-display);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-base),
              background var(--transition-base);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.warning__btn:active {
  transform: scale(0.96);
}

.warning__btn--accept {
  background: rgba(255, 255, 255, 0.05);
  color: #666;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.warning__btn--accept:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #888;
}

/* Кнопка «Нет» — красная, угрожающая */
.warning__btn--deny {
  background: linear-gradient(135deg, #cc0000, #880000);
  color: #fff;
  border: 1px solid rgba(255, 0, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.2),
              0 0 40px rgba(255, 0, 0, 0.1);
}

.warning__btn--deny:hover {
  background: linear-gradient(135deg, #ee0000, #aa0000);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.4),
              0 0 60px rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* ── Чёрный экран ── */

.blackout {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: none;
  user-select: none;
}

.blackout--active {
  display: flex;
  animation: blackoutIn 1s ease both;
}

.blackout__text {
  font-family: var(--font-family-display);
  font-size: clamp(3rem, 15vw, 12rem);
  font-weight: 900;
  color: #ff0000;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.05em;
  text-shadow:
    0 0 20px rgba(255, 0, 0, 0.8),
    0 0 60px rgba(255, 0, 0, 0.5),
    0 0 120px rgba(255, 0, 0, 0.3);
  animation: blackoutTextIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
  padding: var(--space-md);
}

@keyframes blackoutIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes blackoutTextIn {
  from {
    opacity: 0;
    transform: scale(3);
    filter: blur(20px);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* ── Мобильная адаптация ── */

@media (max-width: 640px) {
  .warning__buttons {
    flex-direction: column;
    width: 100%;
  }

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