/* Sæson-lag. Farver kun med data-fx-colors. Rekvisitter kun med data-fx-*. */

html[data-season="christmas"][data-fx-colors] {
    --season-berry: #c41e3a;
    --season-holly: #165b33;
    --season-gold: #d4a017;
}
html[data-season="christmas"][data-fx-colors] body {
    background:
        radial-gradient(circle at 10% 6%, rgba(196, 30, 58, 0.22), transparent 36%),
        radial-gradient(circle at 90% 8%, rgba(22, 91, 51, 0.24), transparent 38%),
        radial-gradient(circle at 50% 0%, rgba(212, 160, 23, 0.12), transparent 42%),
        var(--bg);
}
html[data-season="christmas"][data-fx-colors] .navbar {
    border-bottom-color: rgba(196, 30, 58, 0.45);
    box-shadow: 0 10px 28px rgba(22, 91, 51, 0.14);
}
html[data-season="christmas"][data-fx-colors] .season-mark {
    color: var(--season-berry);
}

html[data-season="newyear"][data-fx-colors] {
    --season-gold: #d4af37;
    --season-silver: #c5c9d1;
    --season-night: #070b16;
}
html[data-season="newyear"][data-fx-colors] body {
    background:
        radial-gradient(circle at 16% 4%, rgba(212, 175, 55, 0.2), transparent 34%),
        radial-gradient(circle at 84% 8%, rgba(197, 201, 209, 0.14), transparent 36%),
        radial-gradient(circle at 50% -8%, rgba(7, 11, 22, 0.55), transparent 46%),
        var(--bg);
}
html[data-season="newyear"][data-fx-colors] .navbar {
    border-bottom-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 28px rgba(7, 11, 22, 0.28);
}
html[data-season="newyear"][data-fx-colors] .season-mark {
    color: var(--season-gold);
}

html[data-season="easter"][data-fx-colors] {
    --season-cream: #fff6ea;
    --season-blush: #f4b6c2;
    --season-lilac: #cbb4e0;
    --season-yolk: #f6e27a;
}
html[data-season="easter"][data-fx-colors] body {
    background:
        radial-gradient(circle at 12% 8%, rgba(244, 182, 194, 0.2), transparent 38%),
        radial-gradient(circle at 88% 10%, rgba(203, 180, 224, 0.18), transparent 36%),
        radial-gradient(circle at 50% 0%, rgba(246, 226, 122, 0.14), transparent 42%),
        var(--bg);
}
html[data-season="easter"][data-fx-colors] .navbar {
    border-bottom-color: rgba(244, 182, 194, 0.42);
    box-shadow: 0 10px 24px rgba(203, 180, 224, 0.12);
}
html[data-season="easter"][data-fx-colors] .season-mark {
    color: #c98bb0;
}

html[data-season="halloween"][data-fx-colors] {
    --season-pumpkin: #e07012;
    --season-night: #120a06;
}
html[data-season="halloween"][data-fx-colors] body {
    background:
        radial-gradient(circle at 12% 8%, rgba(224, 112, 18, 0.26), transparent 38%),
        radial-gradient(circle at 88% 12%, rgba(18, 10, 6, 0.45), transparent 36%),
        radial-gradient(circle at 50% 0%, rgba(88, 40, 140, 0.08), transparent 44%),
        var(--bg);
}
html[data-season="halloween"][data-fx-colors] .navbar {
    border-bottom-color: rgba(224, 112, 18, 0.55);
    box-shadow: 0 10px 28px rgba(18, 10, 6, 0.35);
}
html[data-season="halloween"][data-fx-colors] .season-mark {
    color: var(--season-pumpkin);
}

.season-mark {
    font-size: 0.78rem;
    margin-left: 0.28rem;
    vertical-align: 2px;
    filter: drop-shadow(0 0 6px currentColor);
}

.season-fx,
.season-props {
    display: none;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

html[data-fx-snow] .season-fx-snow,
html[data-fx-fireworks] .season-fx-fireworks,
html[data-fx-pumpkins] .season-props-pumpkins,
html[data-fx-eggs] .season-props-eggs,
html[data-fx-nisser] .season-props-christmas {
    display: block;
}

.season-fx-snow span {
    position: absolute;
    top: -12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
    opacity: 0.7;
    animation: season-fall linear infinite;
}
.season-fx-snow span:nth-child(1) { left: 8%; animation-duration: 14s; animation-delay: -2s; }
.season-fx-snow span:nth-child(2) { left: 22%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: -8s; }
.season-fx-snow span:nth-child(3) { left: 37%; animation-duration: 12s; animation-delay: -4s; }
.season-fx-snow span:nth-child(4) { left: 51%; width: 4px; height: 4px; animation-duration: 16s; animation-delay: -11s; }
.season-fx-snow span:nth-child(5) { left: 64%; animation-duration: 20s; animation-delay: -1s; }
.season-fx-snow span:nth-child(6) { left: 78%; width: 3px; height: 3px; animation-duration: 13s; animation-delay: -6s; }
.season-fx-snow span:nth-child(7) { left: 91%; animation-duration: 17s; animation-delay: -9s; }
.season-fx-snow span:nth-child(8) { left: 14%; width: 2px; height: 2px; animation-duration: 22s; animation-delay: -15s; }

@keyframes season-fall {
    0% { transform: translate3d(0, -10vh, 0); opacity: 0; }
    12% { opacity: 0.7; }
    100% { transform: translate3d(18px, 110vh, 0); opacity: 0; }
}

.season-fx-fireworks .burst,
.season-fx-fireworks .spark {
    position: absolute;
    border-radius: 50%;
}
.season-fx-fireworks .burst {
    width: 5px;
    height: 5px;
    opacity: 0;
    animation: season-burst 3.4s ease-out infinite;
}
.season-fx-fireworks .b1 { left: 16%; top: 16%; color: #d4af37; animation-delay: 0s; }
.season-fx-fireworks .b2 { left: 78%; top: 12%; color: #c5c9d1; animation-delay: -1.1s; }
.season-fx-fireworks .b3 { left: 48%; top: 8%; color: #e23d3d; animation-delay: -2.2s; }
.season-fx-fireworks .b4 { left: 88%; top: 28%; color: #f3e5ab; animation-delay: -0.6s; }
.season-fx-fireworks .spark {
    width: 3px;
    height: 3px;
    background: #f3e5ab;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
    animation: season-fall 9s linear infinite;
    opacity: 0.75;
}
.season-fx-fireworks .s1 { left: 24%; animation-duration: 8s; animation-delay: -1s; }
.season-fx-fireworks .s2 { left: 62%; animation-duration: 11s; animation-delay: -4s; }
.season-fx-fireworks .s3 { left: 41%; animation-duration: 7s; animation-delay: -2s; background: #c5c9d1; }
.season-fx-fireworks .s4 { left: 83%; animation-duration: 10s; animation-delay: -6s; background: #e23d3d; }

@keyframes season-burst {
    0% {
        opacity: 0;
        transform: scale(0.25);
        box-shadow: 0 0 0 currentColor;
    }
    16% { opacity: 1; }
    100% {
        opacity: 0;
        transform: scale(1);
        box-shadow:
            0 -26px 0 currentColor,
            18px -18px 0 currentColor,
            26px 0 0 currentColor,
            18px 18px 0 currentColor,
            0 26px 0 currentColor,
            -18px 18px 0 currentColor,
            -26px 0 0 currentColor,
            -18px -18px 0 currentColor,
            10px -24px 0 currentColor,
            24px -10px 0 currentColor,
            -10px 24px 0 currentColor,
            -24px 10px 0 currentColor;
    }
}

.prop-pumpkin,
.prop-egg,
.prop-ghost,
.prop-bat,
.prop-spider,
.prop-moon,
.prop-web,
.prop-chick,
.prop-tree,
.prop-nisse {
    position: absolute;
    display: block;
}

.prop-pumpkin {
    width: 30px;
    height: 24px;
    border-radius: 50% 50% 46% 46%;
    background: radial-gradient(circle at 35% 32%, #ffb347, #e07012 58%, #b84d08);
    box-shadow:
        inset -5px -4px 0 rgba(0, 0, 0, 0.16),
        0 0 10px rgba(255, 140, 40, 0.35),
        0 2px 6px rgba(0, 0, 0, 0.25);
    animation: season-pumpkin-wobble 3.4s ease-in-out infinite;
    transform-origin: 50% 80%;
}
.prop-pumpkin::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 5px;
    height: 8px;
    transform: translateX(-50%) rotate(-10deg);
    background: #3d6b2f;
    border-radius: 2px;
}
.prop-pumpkin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 58%;
    width: 9px;
    height: 5px;
    background: #1a0800;
    border-radius: 0 0 9px 9px;
    transform: translateX(-50%);
    box-shadow:
        -6px -7px 0 -1px #1a0800,
        6px -7px 0 -1px #1a0800,
        0 0 6px rgba(255, 170, 40, 0.55);
}
.prop-pumpkin.p1 { left: 18px; bottom: 18px; }
.prop-pumpkin.p2 { right: 22px; bottom: 36px; width: 24px; height: 19px; animation-delay: -0.8s; animation-duration: 2.8s; }
.prop-pumpkin.p3 { left: 8%; bottom: 78px; width: 20px; height: 16px; animation-delay: -1.6s; animation-duration: 3.9s; }
.prop-pumpkin.p4 { right: 10%; top: 24%; width: 18px; height: 14px; animation-delay: -0.4s; animation-duration: 3.1s; }
.prop-pumpkin.p5 { left: 44%; bottom: 14px; width: 22px; height: 18px; animation-delay: -2.2s; animation-duration: 4.2s; }

.prop-ghost {
    width: 20px;
    height: 26px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px 12px 3px 3px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
    animation: season-ghost-float 6.5s ease-in-out infinite;
}
.prop-ghost::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 8px;
    background:
        radial-gradient(circle at 16% 0, rgba(255, 255, 255, 0.9) 5px, transparent 6px),
        radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.9) 5px, transparent 6px),
        radial-gradient(circle at 84% 0, rgba(255, 255, 255, 0.9) 5px, transparent 6px);
}
.prop-ghost::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 4px;
    width: 4px;
    height: 5px;
    background: #1b1420;
    border-radius: 50%;
    box-shadow: 8px 0 0 #1b1420;
}
.prop-ghost.g1 { left: 7%; top: 28%; animation-duration: 7.2s; }
.prop-ghost.g2 { right: 8%; top: 42%; width: 16px; height: 22px; animation-delay: -2.4s; animation-duration: 5.8s; }
.prop-ghost.g3 { left: 18%; top: 58%; width: 14px; height: 19px; opacity: 0.8; animation-delay: -4.1s; animation-duration: 8s; }

.prop-bat {
    width: 22px;
    height: 10px;
    background: #120c14;
    border-radius: 50% 50% 40% 40%;
    box-shadow:
        -11px 1px 0 -2px #120c14,
        11px 1px 0 -2px #120c14;
    animation: season-bat-fly 11s linear infinite;
    opacity: 0.85;
}
.prop-bat.bat1 { top: 16%; animation-duration: 12s; }
.prop-bat.bat2 { top: 32%; animation-delay: -4s; animation-duration: 9.5s; width: 16px; height: 8px; }
.prop-bat.bat3 { top: 22%; animation-delay: -7.5s; animation-duration: 14s; }

.prop-spider {
    top: 8px;
    left: 22%;
    width: 10px;
    height: 10px;
    background: #1a1210;
    border-radius: 50%;
    box-shadow:
        -7px 1px 0 -3px #1a1210,
        7px 1px 0 -3px #1a1210,
        -8px 5px 0 -3px #1a1210,
        8px 5px 0 -3px #1a1210;
    animation: season-spider-dangle 5.4s ease-in-out infinite;
}
.prop-spider::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    width: 1px;
    height: 42px;
    background: rgba(255, 255, 255, 0.28);
}

.prop-moon {
    top: 72px;
    right: 36px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 34% 32%, #f7ecd0, #d9b56a 70%);
    box-shadow: 0 0 22px rgba(247, 236, 208, 0.35);
    animation: season-moon-glow 5s ease-in-out infinite;
}

.prop-web {
    width: 88px;
    height: 88px;
    opacity: 0.22;
    background:
        radial-gradient(circle at 0 0, transparent 18%, rgba(255, 255, 255, 0.55) 19%, transparent 20%, transparent 34%, rgba(255, 255, 255, 0.4) 35%, transparent 36%, transparent 50%, rgba(255, 255, 255, 0.28) 51%, transparent 52%),
        linear-gradient(32deg, transparent 49%, rgba(255, 255, 255, 0.35) 50%, transparent 51%),
        linear-gradient(58deg, transparent 49%, rgba(255, 255, 255, 0.3) 50%, transparent 51%),
        linear-gradient(14deg, transparent 49%, rgba(255, 255, 255, 0.25) 50%, transparent 51%);
}
.prop-web.web-tl { top: 0; left: 0; }
.prop-web.web-tr { top: 0; right: 0; transform: scaleX(-1); }

.prop-egg {
    width: 16px;
    height: 22px;
    border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
    box-shadow: inset -3px -2px 0 rgba(0, 0, 0, 0.08), 0 2px 5px rgba(0, 0, 0, 0.18);
    animation: season-egg-hop 3.6s ease-in-out infinite;
    transform-origin: 50% 90%;
}
.prop-egg.e1 { left: 16px; bottom: 20px; background: linear-gradient(#f4b6c2, #f7d6dc); }
.prop-egg.e2 { right: 20px; bottom: 42px; background: linear-gradient(#cbb4e0, #e4d4f5); animation-delay: -0.7s; animation-duration: 4.1s; }
.prop-egg.e3 { left: 10%; bottom: 78px; background: linear-gradient(#f6e27a, #f8eeb0); animation-delay: -1.5s; animation-duration: 3.2s; width: 14px; height: 19px; }
.prop-egg.e4 { right: 12%; top: 20%; background: linear-gradient(#b8e0d2, #d7f0e8); animation-delay: -2.2s; animation-duration: 4.4s; }
.prop-egg.e5 { left: 48%; bottom: 16px; background: linear-gradient(#fff6ea, #f4d7b5); animation-delay: -1.1s; animation-duration: 3.8s; width: 13px; height: 18px; }

.prop-chick {
    width: 18px;
    height: 16px;
    background: radial-gradient(circle at 35% 35%, #ffe36a, #f0c22e 70%);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
    animation: season-chick-waddle 2.6s ease-in-out infinite;
    transform-origin: 50% 90%;
}
.prop-chick::before {
    content: "";
    position: absolute;
    right: -5px;
    top: 6px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 6px solid #ef7d1a;
}
.prop-chick::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 6px;
    width: 3px;
    height: 3px;
    background: #2a2010;
    border-radius: 50%;
    box-shadow: 10px 8px 0 -1px #ef7d1a;
}
.prop-chick.c1 { left: 28px; bottom: 46px; }
.prop-chick.c2 { right: 36px; bottom: 22px; animation-delay: -0.9s; animation-duration: 3.1s; }
.prop-chick.c3 { left: 12%; bottom: 24px; width: 14px; height: 13px; animation-delay: -1.7s; }

.prop-tree {
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 26px solid #1a6b3a;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
    animation: season-tree-sway 4.8s ease-in-out infinite;
    transform-origin: 50% 100%;
}
.prop-tree::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid #228c4c;
}
.prop-tree::after {
    content: "";
    position: absolute;
    left: -3px;
    bottom: -32px;
    width: 6px;
    height: 8px;
    background: #7a4a22;
    box-shadow: 0 -18px 0 1px #d4a017;
}
.prop-tree.t1 { left: 14px; bottom: 40px; }
.prop-tree.t2 { right: 18px; bottom: 52px; border-left-width: 11px; border-right-width: 11px; border-bottom-width: 20px; animation-delay: -1.4s; }
.prop-tree.t3 { left: 8%; bottom: 88px; border-left-width: 9px; border-right-width: 9px; border-bottom-width: 16px; animation-delay: -2.6s; }

.prop-nisse {
    width: 16px;
    height: 16px;
    background: #f3d2b5;
    border-radius: 50%;
    animation: season-nisse-walk 7.5s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.prop-nisse::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -12px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 14px solid #c41e3a;
    filter: drop-shadow(0 6px 0 #fff);
}
.prop-nisse::after {
    content: "";
    position: absolute;
    left: 3px;
    bottom: -4px;
    width: 10px;
    height: 7px;
    background: #fff;
    border-radius: 0 0 8px 8px;
}
.prop-nisse.n1 { left: 56px; bottom: 16px; }
.prop-nisse.n2 { right: 64px; bottom: 18px; animation-delay: -2.4s; animation-duration: 8.4s; }
.prop-nisse.n3 { left: 22%; bottom: 14px; width: 14px; height: 14px; animation-delay: -4.1s; }

html[data-fx-snow] .card,
html[data-fx-snow] .theme-group-card,
html[data-fx-snow] .theme-hero {
    position: relative;
}
html[data-fx-snow] .card:nth-child(odd)::after,
html[data-fx-snow] .theme-group-card:nth-child(odd)::after,
html[data-fx-snow] .theme-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 6%;
    right: 14%;
    height: 11px;
    pointer-events: none;
    z-index: 4;
    border-radius: 0 0 40% 40%;
    background:
        radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.92) 6px, transparent 7px),
        radial-gradient(circle at 24% 0, rgba(255, 255, 255, 0.95) 8px, transparent 9px),
        radial-gradient(circle at 46% 0, rgba(255, 255, 255, 0.88) 7px, transparent 8px),
        radial-gradient(circle at 68% 0, rgba(255, 255, 255, 0.94) 9px, transparent 10px),
        radial-gradient(circle at 88% 0, rgba(255, 255, 255, 0.86) 6px, transparent 7px);
}

@keyframes season-pumpkin-wobble {
    0%, 100% { transform: translate(0, 0) rotate(-8deg); }
    25% { transform: translate(4px, -10px) rotate(7deg); }
    50% { transform: translate(-3px, -3px) rotate(-5deg); }
    75% { transform: translate(5px, -12px) rotate(6deg); }
}

@keyframes season-egg-hop {
    0%, 100% { transform: translate(0, 0) rotate(-10deg); }
    18% { transform: translate(10px, -16px) rotate(8deg); }
    36% { transform: translate(14px, 0) rotate(-6deg); }
    54% { transform: translate(-4px, -12px) rotate(12deg); }
    72% { transform: translate(-10px, 0) rotate(-8deg); }
}

@keyframes season-ghost-float {
    0%, 100% { transform: translate(0, 0); opacity: 0.9; }
    35% { transform: translate(18px, -16px); opacity: 1; }
    70% { transform: translate(-10px, -6px); opacity: 0.75; }
}

@keyframes season-bat-fly {
    0% { transform: translate(-8vw, 0) scaleX(1); }
    48% { transform: translate(55vw, 14px) scaleX(1); }
    50% { transform: translate(58vw, 10px) scaleX(-1); }
    100% { transform: translate(108vw, -8px) scaleX(-1); }
}

@keyframes season-spider-dangle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(18px); }
}

@keyframes season-moon-glow {
    0%, 100% { opacity: 0.85; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.12); }
}

@keyframes season-chick-waddle {
    0%, 100% { transform: translate(0, 0) rotate(-8deg); }
    25% { transform: translate(8px, -7px) rotate(10deg); }
    50% { transform: translate(12px, 0) rotate(-6deg); }
    75% { transform: translate(4px, -9px) rotate(8deg); }
}

@keyframes season-tree-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(4deg); }
}

@keyframes season-nisse-walk {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(16px, -4px); }
    50% { transform: translate(28px, 0); }
    75% { transform: translate(10px, -5px); }
}

@media (prefers-reduced-motion: reduce) {
    .season-fx-snow span,
    .season-fx-fireworks .burst,
    .season-fx-fireworks .spark,
    .prop-pumpkin,
    .prop-egg,
    .prop-ghost,
    .prop-bat,
    .prop-spider,
    .prop-moon,
    .prop-chick,
    .prop-tree,
    .prop-nisse {
        animation: none;
    }
    .season-fx-snow span { opacity: 0.22; top: 12%; }
    .season-fx-fireworks .burst { opacity: 0.35; }
    .season-mark { filter: none; }
}

@media (max-width: 700px) {
    .season-fx-snow span:nth-child(n+6),
    .season-fx-fireworks .b4,
    .season-fx-fireworks .s4,
    .prop-pumpkin.p3,
    .prop-pumpkin.p5,
    .prop-egg.e3,
    .prop-egg.e5,
    .prop-ghost.g3,
    .prop-bat.bat3,
    .prop-moon,
    .prop-chick.c3,
    .prop-tree.t3,
    .prop-nisse.n3 {
        display: none;
    }
}
