html.halloween-theme {
    background-image:
        linear-gradient(180deg, rgba(19, 12, 24, 0.1), rgba(12, 8, 13, 0.18)),
        url(../images/very_darkened.jpg);
    background-blend-mode: normal, normal;
}

.halloween-theme #timerDiv {
    color: #ffe0a3;
}

.halloween-theme #timerlabel {
    color: #ffb44a;
}

.halloween-theme .containerHome h4 {
    color: #f3c17d;
}

.halloween-theme .button img {
    filter: drop-shadow(0 0 4px rgba(226, 115, 40, 0.18));
    transition: filter 250ms ease, transform 250ms ease;
}

.halloween-theme .button:hover img {
    filter: drop-shadow(0 0 7px rgba(255, 153, 45, 0.38)) brightness(1.03);
}

.halloween-theme .logo img {
    filter: none;
}

.halloween-theme .header-btn {
    transition: color 180ms ease, filter 180ms ease;
}

.halloween-theme .header-btn:hover {
    color: #ffb44a;
    filter: none;
}

.halloween-theme .third-guess-streak-toast {
    border-color: rgba(190, 126, 55, 0.42);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.halloween-theme .third-guess-streak-toast-title {
    color: #e9ad60;
}

.halloween-theme .list-items {
    position: relative;
    border-color: rgba(190, 126, 55, 0.32);
    border-left: 3px solid rgba(190, 126, 55, 0.62);
    background-image: linear-gradient(90deg, rgba(99, 58, 29, 0.18), transparent 38%);
}

.halloween-theme .list-items.active,
.halloween-theme .list-items:hover {
    border-color: rgba(223, 157, 76, 0.62);
    background-color: #29231e;
    background-image: linear-gradient(90deg, rgba(124, 75, 35, 0.3), transparent 52%);
}

.halloween-theme .history {
    border-color: rgba(190, 126, 55, 0.48);
    background-color: rgba(69, 48, 34, 0.78);
    box-shadow: none;
}

.halloween-theme #nextgame {
    border-color: rgba(190, 126, 55, 0.38);
}

.halloween-theme #nextgame input {
    border-color: rgba(190, 126, 55, 0.52);
    color: #f0c58b;
}

.halloween-theme .inputAnswer:focus {
    border-color: rgba(223, 157, 76, 0.72);
    outline-color: rgba(223, 157, 76, 0.36);
}

.halloween-theme #killers-history td {
    border-color: #a87945;
}

.halloween-theme #killers-history .prvi-red {
    border-bottom-color: #a87945;
}

.halloween-theme #indexLoadDiv:has(img:not([style*="display: none"])) img,
.halloween-theme #survLoadDiv:has(img) img,
.halloween-theme #emojiLoadDiv:has(img) img,
.halloween-theme #mapLoadDiv:has(img) img,
.halloween-theme #terrorLoadDiv:has(img) img {
    filter: sepia(0.12) saturate(1.08);
}

.halloween-theme #indexLoadDiv:has(img:not([style*="display: none"]))::after,
.halloween-theme #survLoadDiv:has(img)::after,
.halloween-theme #emojiLoadDiv:has(img)::after,
.halloween-theme #mapLoadDiv:has(img)::after,
.halloween-theme #terrorLoadDiv:has(img)::after {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    color: #c28b51;
    content: "✦  ·  ✦";
    font: 14px/1 Arial, Helvetica, sans-serif;
    letter-spacing: 0.45em;
    white-space: nowrap;
    transform: translateX(-50%);
    animation: halloween-loader-flicker 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes halloween-loader-flicker {
    0%, 100% { opacity: 0.48; }
    50% { opacity: 0.9; }
}

.halloween-effects {
    display: none;
}

.halloween-theme .halloween-effects {
    display: block;
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 1000;
    pointer-events: none;
}

.halloween-theme .halloween-effects::before {
    content: "";
    position: absolute;
    top: 28%;
    left: -20%;
    width: 140%;
    height: 45%;
    background: radial-gradient(ellipse, rgba(194, 198, 212, 0.055), transparent 68%);
    filter: blur(38px);
    mix-blend-mode: screen;
    animation: halloween-fog-drift 45s ease-in-out infinite alternate;
}

.halloween-particle {
    position: absolute;
    top: -8vh;
    left: var(--particle-left);
    color: var(--particle-color);
    font-family: Arial, sans-serif;
    font-size: var(--particle-size);
    line-height: 1;
    opacity: 0;
    animation: halloween-drift var(--particle-duration) linear var(--particle-delay) infinite;
    will-change: transform, opacity;
}

@keyframes halloween-fog-drift {
    to {
        transform: translate3d(8%, 8px, 0) scale(1.08);
    }
}

@keyframes halloween-drift {
    0% {
        opacity: 0;
        transform: translate3d(0, -5vh, 0) rotate(0deg);
    }
    12% {
        opacity: 0.7;
    }
    85% {
        opacity: 0.55;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--particle-drift), 115vh, 0) rotate(300deg);
    }
}

.halloween-bat {
    position: absolute;
    left: -10vw;
    top: var(--bat-top);
    font-size: 25px;
    opacity: 0.85;
    animation: halloween-bat-flight 7s linear forwards;
}

@keyframes halloween-bat-flight {
    to {
        transform: translateX(120vw) translateY(-24px);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .halloween-particle,
    .halloween-bat,
    .halloween-theme .halloween-effects::before,
    .halloween-theme #indexLoadDiv::after,
    .halloween-theme #survLoadDiv::after,
    .halloween-theme #emojiLoadDiv::after,
    .halloween-theme #mapLoadDiv::after,
    .halloween-theme #terrorLoadDiv::after {
        animation: none;
        display: none;
    }

    .halloween-theme .button img,
    .halloween-theme .header-btn {
        transition: none;
    }
}
