:root {
    --bg0: #070A12;
    --bg1: #0A1022;
    --card: #0D1630CC;
    --card2: #0B142BCC;
    --text: #EAF1FF;
    --muted: #A9B6D6;
    --line: #1C2A55;
    --glow: 0 0 18px rgba(120, 200, 255, .25);
    --shadow: 0 24px 80px rgba(0, 0, 0, .55);
    --radius: 22px;
    --maxw: 1040px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 700px at 65% -10%, rgba(80, 140, 255, .22), transparent 60%),
        radial-gradient(900px 600px at 10% 10%, rgba(255, 120, 160, .12), transparent 60%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
    overflow-x: hidden;
}

/* --- Background canvases --- */
canvas#sky,
canvas#snow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

canvas#snow {
    z-index: -1;
}

/* Soft vignette */
.vignette {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(900px 700px at 50% 10%, rgba(255, 255, 255, .05), transparent 60%),
        radial-gradient(1200px 900px at 50% 120%, rgba(0, 0, 0, .75), transparent 55%),
        radial-gradient(1000px 800px at 0% 100%, rgba(0, 0, 0, .45), transparent 60%);
    mix-blend-mode: screen;
    opacity: .55;
}

.bg-tree {
    position: fixed;
    right: 3%;
    bottom: -6px;
    width: clamp(200px, 26vw, 320px);
    height: clamp(220px, 28vw, 360px);
    pointer-events: none;
    z-index: 0;
    background: url('christmas-tree.png') no-repeat center / contain;
    filter:
        drop-shadow(0 22px 46px rgba(0, 0, 0, .48)) drop-shadow(0 0 26px rgba(60, 120, 60, .35)) drop-shadow(0 0 18px rgba(255, 200, 160, .14));
    animation: treeSway 8s ease-in-out infinite, treeGlow 6s ease-in-out infinite;
}

/* --- Header --- */
.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 42px 18px 64px;
}

header {
    position: relative;
    padding: 28px 22px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(13, 22, 48, .72), rgba(10, 16, 34, .60));
    box-shadow: var(--shadow), var(--glow);
    overflow: hidden;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--muted);
    font-size: 13px;
    letter-spacing: .2px;
    margin-bottom: 14px;
}

h1 {
    margin: 0 0 10px 0;
    font-weight: 800;
    letter-spacing: .2px;
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.1;
    text-shadow: 0 2px 22px rgba(0, 0, 0, .55);
}

.subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 72ch;
    line-height: 1.6;
}

/* Animated “tree lights” string on header */
.lights {
    position: absolute;
    left: -30px;
    right: -30px;
    top: 12px;
    height: 46px;
    pointer-events: none;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35));
    opacity: .95;
}

.neon-title {
    text-align: center;
    margin: 10px auto 18px;
    font-size: clamp(26px, 4.4vw, 48px);
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(120deg,
            #ff8fb1 0%,
            #ffd86f 28%,
            #7ef5ff 54%,
            #9b8bff 76%,
            #ff8fb1 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow:
        0 0 12px rgba(255, 255, 255, .65),
        0 0 22px rgba(255, 200, 150, .45),
        0 0 38px rgba(120, 200, 255, .38),
        0 0 56px rgba(140, 120, 255, .32);
    animation: neonPulse 4s ease-in-out infinite, hueShift 12s linear infinite;
    pointer-events: none;
}

@keyframes neonPulse {

    0%,
    100% {
        opacity: .96;
        filter: drop-shadow(0 0 26px rgba(255, 200, 180, .35));
    }

    45% {
        opacity: .82;
        filter: drop-shadow(0 0 18px rgba(120, 200, 255, .20));
    }

    60% {
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(180, 240, 255, .45));
    }
}

@keyframes hueShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.wire {
    position: absolute;
    left: 0;
    right: 0;
    top: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
    transform: rotate(-2deg);
}

.bulb {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 12px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .25) 25%, rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .14);
    animation: blink 2.4s infinite ease-in-out;
}

.bulb::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -6px;
    width: 10px;
    height: 8px;
    transform: translateX(-50%);
    border-radius: 4px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .12);
}

@keyframes blink {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: saturate(1);
        opacity: .75;
    }

    50% {
        transform: translateY(-1px) scale(1.03);
        filter: saturate(1.5);
        opacity: 1;
    }
}

/* --- Sections / tasks --- */
.tasks {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.task {
    position: relative;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(13, 22, 48, .68), rgba(10, 16, 34, .52));
    box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
    overflow: visible;
}

.task .inner {
    padding: 24px 18px 18px;
    display: grid;
    gap: 14px;
}

.task-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.task-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.task-title h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: .2px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
}

.pill b {
    color: var(--text);
    font-weight: 700;
}

.meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.desc {
    color: #D6E1FF;
    line-height: 1.75;
    margin: 0;
}

.hint {
    display: inline-block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
    margin: 2px 0 0;
}

/* Task-specific decorations */
.decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    border-radius: inherit;
    overflow: hidden;
}

/* candy cane stripes */
.decor.candy::before {
    content: "";
    position: absolute;
    left: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 52px;
    background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 10px, rgba(255, 80, 120, .18) 10px 20px);
    filter: blur(.2px);
    transform: rotate(10deg);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    opacity: .65;
}

/* snowflakes corner */
.decor.flakes::before,
.decor.flakes::after {
    content: "✶";
    position: absolute;
    color: rgba(255, 255, 255, .20);
    text-shadow: 0 0 18px rgba(160, 220, 255, .18);
    font-size: 92px;
    transform: rotate(12deg);
    filter: blur(.1px);
    animation: floaty 7.5s infinite ease-in-out;
}

.decor.flakes::before {
    right: 14px;
    top: 12px;
}

.decor.flakes::after {
    left: 16px;
    bottom: 8px;
    font-size: 74px;
    animation-duration: 9.3s;
    opacity: .6;
}

@keyframes floaty {

    0%,
    100% {
        transform: translateY(0) rotate(12deg);
        opacity: .55;
    }

    50% {
        transform: translateY(-8px) rotate(18deg);
        opacity: .85;
    }
}

/* “northern lights” ribbon */
.decor.aurora::before {
    content: "";
    position: absolute;
    inset: -80px -60px auto -60px;
    height: 220px;
    background: radial-gradient(closest-side at 25% 60%, rgba(80, 255, 200, .18), transparent 70%),
        radial-gradient(closest-side at 55% 40%, rgba(120, 140, 255, .20), transparent 70%),
        radial-gradient(closest-side at 85% 60%, rgba(255, 120, 200, .14), transparent 70%);
    filter: blur(14px);
    transform: rotate(-3deg);
    opacity: .85;
    animation: aurora 10s infinite ease-in-out;
}

@keyframes aurora {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(8px) rotate(-1deg);
    }
}

/* NEW DECOR: glitch (security / breach vibe) */
.decor.glitch::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg,
            rgba(255, 255, 255, .06) 0px,
            rgba(255, 255, 255, .06) 1px,
            transparent 2px,
            transparent 6px);
    opacity: .18;
    mix-blend-mode: screen;
    animation: scan 3.2s infinite linear;
}

.decor.glitch::after {
    content: "⚠";
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 64px;
    color: rgba(255, 90, 90, .22);
    text-shadow: 0 0 18px rgba(255, 90, 90, .18);
    transform: rotate(10deg);
    animation: pulse 2.8s infinite ease-in-out;
}

@keyframes scan {
    0% {
        transform: translateY(-6px);
        opacity: .12;
    }

    50% {
        opacity: .22;
    }

    100% {
        transform: translateY(6px);
        opacity: .12;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: rotate(10deg) scale(1);
        opacity: .5;
    }

    50% {
        transform: rotate(10deg) scale(1.06);
        opacity: .9;
    }
}


/* NEW DECOR: gift (present corner) */
.decor.gift::before {
    content: "";
    position: absolute;
    left: -60px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    border-radius: 56px;
    background:
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .14), transparent 60%),
        repeating-linear-gradient(90deg, rgba(255, 210, 80, .18) 0 10px, rgba(255, 80, 120, .16) 10px 20px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    transform: rotate(-8deg);
    opacity: .55;
}

.decor.gift::after {
    content: "🎁";
    position: absolute;
    left: 18px;
    bottom: 12px;
    font-size: 54px;
    opacity: .20;
    filter: blur(.1px);
}


/* NEW DECOR: frost (icy edges) */
.decor.frost::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(closest-side at 10% 10%, rgba(200, 240, 255, .18), transparent 60%),
        radial-gradient(closest-side at 90% 15%, rgba(200, 240, 255, .14), transparent 62%),
        radial-gradient(closest-side at 15% 90%, rgba(200, 240, 255, .14), transparent 62%),
        radial-gradient(closest-side at 90% 90%, rgba(200, 240, 255, .18), transparent 60%);
    opacity: .55;
    filter: blur(10px);
}

.decor.frost::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 0 1px rgba(190, 230, 255, .10),
        inset 0 0 22px rgba(170, 220, 255, .08);
    opacity: .9;
}


/* mini lights for each card */
.mini-lights {
    position: absolute;
    left: 14px;
    right: 14px;
    top: -6px;
    height: 26px;
    opacity: .95;
}

.mini-lights .wire {
    top: 12px;
    transform: rotate(1deg);
    opacity: .55;
}

.mini-lights .bulb {
    width: 10px;
    height: 10px;
    top: 6px;
    animation-duration: 2.1s;
}

/* Footer */
footer {
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    opacity: .9;
}

/* Santa flight animation */
.santa-flight {
    position: fixed;
    left: -40%;
    bottom: 14%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: clamp(22px, 3vw, 32px);
    text-shadow:
        0 0 12px rgba(255, 255, 255, .6),
        0 0 28px rgba(255, 180, 120, .35),
        0 0 48px rgba(120, 200, 255, .3);
    animation: flyAcross 18s linear infinite;
    z-index: 3;
    pointer-events: none;
}

.santa-flight .sleigh {
    filter: drop-shadow(0 0 6px rgba(255, 200, 160, .6));
}

.santa-flight .gift {
    position: absolute;
    top: 0;
    opacity: 0;
    font-size: clamp(18px, 2.5vw, 28px);
}

.santa-flight .gift.g1 {
    left: 32%;
    animation: giftDrop 4.6s ease-in infinite 0.6s;
}

.santa-flight .gift.g2 {
    left: 55%;
    animation: giftDrop 5.3s ease-in infinite 1.4s;
}

.santa-flight .gift.g3 {
    left: 78%;
    animation: giftDrop 4.9s ease-in infinite 2.2s;
}

@keyframes flyAcross {
    0% {
        transform: translateX(0) translateY(0);
    }

    40% {
        transform: translateX(65vw) translateY(-6px);
    }

    70% {
        transform: translateX(110vw) translateY(0);
    }

    100% {
        transform: translateX(140vw) translateY(8px);
    }
}

@keyframes giftDrop {

    0%,
    20% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    25% {
        opacity: 1;
    }

    100% {
        transform: translateY(130px) rotate(26deg);
        opacity: 0;
    }
}

/* Optional: reduced motion */
@media (prefers-reduced-motion: reduce) {

    .bulb,
    .decor.flakes::before,
    .decor.flakes::after,
    .decor.aurora::before {
        animation: none !important;
    }

    .santa-flight {
        animation: none;
    }

    .santa-flight .gift {
        animation: none;
        opacity: 0;
    }

    .bg-tree {
        animation: none;
    }
}

@keyframes treeGlow {

    0%,
    100% {
        filter: drop-shadow(0 22px 46px rgba(0, 0, 0, .48)) drop-shadow(0 0 18px rgba(120, 220, 255, .18)) drop-shadow(0 0 12px rgba(255, 200, 160, .12));
    }

    50% {
        filter: drop-shadow(0 22px 46px rgba(0, 0, 0, .48)) drop-shadow(0 0 26px rgba(90, 220, 255, .3)) drop-shadow(0 0 18px rgba(255, 210, 170, .18));
    }
}

/* Hacker Santa artwork */
.hacker-santa {
    position: fixed;
    left: 2%;
    bottom: -14px;
    width: clamp(180px, 24vw, 260px);
    height: clamp(180px, 24vw, 260px);
    background: url('santa.png') no-repeat center / contain;
    pointer-events: none;
    z-index: 0;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .45)) drop-shadow(0 0 12px rgba(255, 200, 160, .24));
}

/* Buttons (optional helpers) */
.actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    transition: transform .12s ease, background .12s ease;
    user-select: none;
}

.btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, .09);
}

.btn:active {
    transform: translateY(0px);
}

.btn small {
    color: var(--muted);
    font-weight: 600;
}

/* nice focus */
.btn:focus-visible {
    outline: 2px solid rgba(120, 200, 255, .65);
    outline-offset: 2px;
}

ul {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}