/* ============================================
   SKAMNEGROV — МАКСИМАЛЬНЫЙ ХАОС
   ============================================ */

/* === СБРОС И БАЗОВЫЕ === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Arial Black", "Impact", "Trebuchet MS", sans-serif;
    text-align: center;
    color: #fff;
    animation: rgb-bg 0.5s linear infinite;
}

/* Chaos-mode: всё быстрее */
body.chaos {
    animation: rgb-bg 0.07s linear infinite;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

/* --- RGB фон --- */
@keyframes rgb-bg {
    0%   { background-color: #ff0000; }
    14%  { background-color: #ff8800; }
    28%  { background-color: #ffff00; }
    42%  { background-color: #00ff00; }
    57%  { background-color: #00ffff; }
    71%  { background-color: #0000ff; }
    85%  { background-color: #ff00ff; }
    100% { background-color: #ff0000; }
}

/* --- Тряска --- */
@keyframes shake {
    0%   { transform: translate(0,0)       rotate(0deg);   }
    10%  { transform: translate(-4px,-3px)  rotate(-1deg);  }
    20%  { transform: translate(3px,-2px)   rotate(1deg);   }
    30%  { transform: translate(-3px,4px)   rotate(0deg);   }
    40%  { transform: translate(4px,2px)    rotate(1deg);   }
    50%  { transform: translate(-2px,-4px)  rotate(-1deg);  }
    60%  { transform: translate(4px,1px)    rotate(0deg);   }
    70%  { transform: translate(-3px,-3px)  rotate(1deg);   }
    80%  { transform: translate(2px,4px)    rotate(-1deg);  }
    90%  { transform: translate(-4px,-1px)  rotate(0deg);   }
    100% { transform: translate(0,0)        rotate(0deg);   }
}

@keyframes shake-hard {
    0%   { transform: translate(0,0)         rotate(0deg);  }
    10%  { transform: translate(-14px,-10px) rotate(-5deg); }
    20%  { transform: translate(10px,-12px)  rotate(4deg);  }
    30%  { transform: translate(-12px,14px)  rotate(-3deg); }
    40%  { transform: translate(14px,10px)   rotate(5deg);  }
    50%  { transform: translate(-10px,-8px)  rotate(-4deg); }
    60%  { transform: translate(12px,14px)   rotate(3deg);  }
    70%  { transform: translate(-8px,-14px)  rotate(5deg);  }
    80%  { transform: translate(14px,8px)    rotate(-5deg); }
    90%  { transform: translate(-14px,-12px) rotate(4deg);  }
    100% { transform: translate(0,0)         rotate(0deg);  }
}

/* --- Мигание --- */
@keyframes blink {
    0%, 49%  { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes blink-fast {
    0%, 40% { opacity: 1; }
    41%, 70% { opacity: 0; }
    71%, 100% { opacity: 1; }
}

/* --- Пульсация --- */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.08); }
}

@keyframes mega-pulse {
    0%   { transform: scale(1);    box-shadow: 0 0 20px #fff, 0 0 40px #ff0, 0 0 80px #f00; }
    25%  { transform: scale(1.12); box-shadow: 0 0 30px #0ff, 0 0 60px #0f0, 0 0 100px #00f; }
    50%  { transform: scale(0.97); box-shadow: 0 0 25px #f0f, 0 0 50px #ff0, 0 0 90px #0ff;  }
    75%  { transform: scale(1.18); box-shadow: 0 0 35px #ff0, 0 0 70px #f00, 0 0 110px #f0f; }
    100% { transform: scale(1);    box-shadow: 0 0 20px #fff, 0 0 40px #ff0, 0 0 80px #f00; }
}

/* --- Радуга текста --- */
@keyframes rainbow {
    0%   { color: #ff0000; text-shadow: 0 0 15px #ff0000, 0 0 30px #ff0000; }
    16%  { color: #ff8800; text-shadow: 0 0 15px #ff8800, 0 0 30px #ff8800; }
    33%  { color: #ffff00; text-shadow: 0 0 15px #ffff00, 0 0 30px #ffff00; }
    50%  { color: #00ff00; text-shadow: 0 0 15px #00ff00, 0 0 30px #00ff00; }
    66%  { color: #00ffff; text-shadow: 0 0 15px #00ffff, 0 0 30px #00ffff; }
    83%  { color: #ff00ff; text-shadow: 0 0 15px #ff00ff, 0 0 30px #ff00ff; }
    100% { color: #ff0000; text-shadow: 0 0 15px #ff0000, 0 0 30px #ff0000; }
}

/* --- Глитч --- */
@keyframes glitch {
    0%, 100% { text-shadow: 3px 0 #f00, -3px 0 #0ff; transform: skewX(0deg);  }
    20%      { text-shadow: -4px 0 #f00,  4px 0 #0ff; transform: skewX(-2deg); }
    40%      { text-shadow: 4px 0 #f00, -4px 0 #0ff;  transform: skewX(1deg);  }
    60%      { text-shadow: -2px 0 #f00,  2px 0 #0ff;  transform: skewX(3deg);  }
    80%      { text-shadow: 5px 0 #f00, -5px 0 #0ff;   transform: skewX(-1deg); }
}

/* --- Бегущая строка --- */
@keyframes marquee-scroll {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
@keyframes marquee-scroll-rev {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Градиент кнопки --- */
@keyframes gradient-spin {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Летающий эмодзи --- */
@keyframes fly-up {
    0%   { transform: translateY(0) rotate(0deg) scale(1);   opacity: 1; }
    100% { transform: translateY(-120vh) rotate(720deg) scale(.4); opacity: 0; }
}

/* --- Вспышка --- */
@keyframes flash-pop {
    0%, 100% { opacity: 0; }
    50%      { opacity: .6; }
}

/* ============================================
   СТАРТОВЫЙ ОВЕРЛЕЙ
   ============================================ */
#start-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    animation: rgb-bg 1.2s linear infinite;
    cursor: pointer;
}

#start-overlay.hidden { display: none; }

.start-content { padding: 20px; }

.start-title {
    font-size: 2.8rem;
    animation: rainbow .4s linear infinite, pulse .5s ease infinite;
    margin-bottom: 20px;
}

.start-sub {
    font-size: 1.6rem;
    margin-bottom: 30px;
    animation: blink-fast .5s infinite;
}

.start-tap {
    font-size: 1.2rem;
    animation: blink .6s infinite, rainbow .3s linear infinite;
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */
#main {
    display: none;
    position: relative;
    min-height: 100vh;
    animation: shake .15s linear infinite;
}

#main.visible {
    display: block;
}

body.chaos #main {
    animation: shake-hard .06s linear infinite;
}

/* --- Обёртка с прокруткой --- */
.content-wrap {
    padding: 55px 12px 65px;
    overflow-y: auto;
    height: 100vh;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   БЕГУЩИЕ СТРОКИ
   ============================================ */
.marquee-bar {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,.75);
    padding: 7px 0;
    z-index: 500;
    overflow: hidden;
    white-space: nowrap;
}

.top-bar    { top: 0; }
.bottom-bar { bottom: 0; }

.marquee-inner {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 9s linear infinite;
    font-size: .85rem;
    font-weight: bold;
    color: #ff0;
    text-shadow: 0 0 8px #ff0;
}

.marquee-reverse {
    animation: marquee-scroll-rev 11s linear infinite;
    color: #f44;
    text-shadow: 0 0 8px #f44;
}

body.chaos .marquee-inner {
    animation-duration: 3s;
}

body.chaos .marquee-reverse {
    animation-duration: 4s;
}

/* ============================================
   ЗАГОЛОВОК
   ============================================ */
.main-title {
    font-size: 2.8rem;
    letter-spacing: 4px;
    margin: 15px 0;
    animation: glitch .12s infinite, rainbow .25s linear infinite;
}

body.chaos .main-title {
    font-size: 3.4rem;
    animation: glitch .05s infinite, rainbow .08s linear infinite, shake-hard .08s infinite;
}

/* ============================================
   БЛОКИ КОНТЕНТА
   ============================================ */
.congrats-box {
    font-size: 1.15rem;
    margin: 12px 0;
    padding: 10px;
    background: rgba(0,0,0,.45);
    border: 3px solid #ff0;
    border-radius: 12px;
    animation: blink-fast .35s infinite, shake .2s infinite, rainbow .5s linear infinite;
}

body.chaos .congrats-box {
    animation: blink-fast .12s infinite, shake-hard .08s infinite, rainbow .15s linear infinite;
    border-color: #f0f;
}

/* --- Таймер --- */
.timer-box {
    margin: 15px auto;
    padding: 10px 20px;
    background: rgba(0,0,0,.55);
    border: 2px solid #f00;
    border-radius: 12px;
    display: inline-block;
    animation: shake .3s infinite;
}

.timer-label {
    font-size: .9rem;
    margin-bottom: 4px;
}

.timer-value {
    font-size: 2.6rem;
    color: #f00;
    text-shadow: 0 0 20px #f00, 0 0 40px #f00;
    animation: blink .5s infinite;
    font-variant-numeric: tabular-nums;
}

body.chaos .timer-value {
    animation: blink .12s infinite;
    font-size: 3rem;
}

/* ============================================
   КНОПКА — ЗВЕЗДА ШОУ
   ============================================ */
.btn-section {
    margin: 25px 0;
}

.btn-heading {
    font-size: 1.35rem;
    animation: rainbow .3s linear infinite;
    margin-bottom: 14px;
}

.mega-btn {
    display: inline-block;
    width: 92%;
    max-width: 420px;
    padding: 26px 20px;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    border: 5px solid #fff;
    border-radius: 22px;
    cursor: pointer;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px #000, 0 0 10px #000;
    background: linear-gradient(135deg, #f00, #f80, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    background-size: 600% 600%;
    animation:
        mega-pulse   .35s ease infinite,
        gradient-spin .6s  linear infinite;
    position: relative;
    z-index: 50;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.mega-btn:active {
    transform: scale(.93) !important;
}

.btn-small {
    display: block;
    font-size: .8rem;
    margin-top: 6px;
    letter-spacing: 1px;
}

body.chaos .mega-btn {
    font-size: 1.7rem;
    padding: 32px 24px;
    border-width: 6px;
    animation:
        mega-pulse   .12s ease infinite,
        gradient-spin .2s  linear infinite,
        shake-hard   .08s linear infinite;
}

/* ============================================
   ОТЗЫВЫ
   ============================================ */
.reviews {
    margin: 20px 0;
    padding: 14px;
    background: rgba(0,0,0,.4);
    border-radius: 12px;
    text-align: left;
}

.review-item {
    margin: 7px 0;
    padding: 6px 0;
    font-size: .9rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    animation: shake .3s infinite;
}

.review-item:nth-child(even) { animation-delay: .05s; }

body.chaos .review-item {
    animation: shake-hard .1s infinite;
}

/* ============================================
   ПРЕДУПРЕЖДЕНИЕ
   ============================================ */
.warning-box {
    margin: 18px 0;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: bold;
    background: rgba(0,0,0,.55);
    border: 3px dashed #ff0;
    border-radius: 12px;
    animation: rainbow .2s linear infinite, blink-fast .4s infinite, shake .2s infinite;
}

body.chaos .warning-box {
    animation: rainbow .07s linear infinite, blink-fast .15s infinite, shake-hard .08s infinite;
    border-color: #0ff;
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЙ ТЕКСТ (после нажатия кнопки)
   ============================================ */
.extra-text {
    margin: 15px 0;
}

.extra-line {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 8px 0;
    padding: 6px;
    animation: rainbow .2s linear infinite, shake-hard .12s infinite;
}

/* ============================================
   ФУТЕР
   ============================================ */
.footer {
    margin: 25px 0 10px;
    font-size: .75rem;
    opacity: .7;
    animation: shake .25s infinite;
}

.footer p { margin: 4px 0; }

.footer-small {
    font-size: .6rem;
    opacity: .5;
}

/* ============================================
   ЭМОДЗИ СЛОЙ
   ============================================ */
#emoji-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 600;
    overflow: hidden;
}

.flying-emoji {
    position: absolute;
    bottom: -40px;
    animation: fly-up 2.2s linear forwards;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ============================================
   ВСПЫШКИ
   ============================================ */
#flash-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 550;
    opacity: 0;
    transition: opacity .03s;
}

/* ============================================
   ДЕСКТОП (ширина > 600)
   ============================================ */
@media (min-width: 600px) {
    .main-title        { font-size: 5rem; }
    body.chaos .main-title { font-size: 6rem; }
    .congrats-box      { font-size: 1.5rem; }
    .mega-btn          { font-size: 2rem; padding: 34px 40px; }
    .btn-heading       { font-size: 1.8rem; }
    .timer-value       { font-size: 3.5rem; }
    .start-title       { font-size: 4.5rem; }
    .start-sub         { font-size: 2rem; }
    .review-item       { font-size: 1.1rem; }
}