/* ============================================================
   V14 — Secret Santa snow + the Random Person Picker.
   Pure CSS + the inline SVG in pages/picker.php. No images,
   no libraries. Green-on-black, same as the rest of the site.
   ============================================================ */

/* --- Gentle falling snow (Secret Santa page only) --- */
.mm-snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}
.mm-snow span {
    position: absolute;
    top: -6%;
    color: #FFFFFF;
    opacity: 0.5;
    animation: mm-snow-fall linear infinite;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}
@keyframes mm-snow-fall {
    0%   { transform: translateY(0) translateX(0); }
    50%  { transform: translateY(55vh) translateX(14px); }
    100% { transform: translateY(110vh) translateX(-10px); }
}

/* --- Random Person Picker --- */
.mm-pick-go {
    font-size: 1.15em;
    padding: 12px 26px;
}
.mm-pick-go:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* The stage: a tall box the mutant can pop up inside of.
 * overflow:hidden is what hides the mutant while it is "in" the
 * tube — it starts translated 460px down (fully below the box)
 * and springs up to its resting place astride the rim. */
.mm-pick-stage {
    margin: 18px auto 0;
    max-width: 420px;
    text-align: center;
}
.mm-pick-tube {
    position: relative;
    height: 470px;
    max-width: 340px;
    margin: 0 auto;
    overflow: hidden;
}
.mm-pick-glass {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 330px;
    width: auto;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.35));
}
/* The names, floating in the potion. */
.mm-pick-chips {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    width: 150px;
    height: 170px;
    overflow: hidden;
    z-index: 2;
}
.mm-pick-chip {
    position: absolute;
    display: inline-block;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 7px;
    background: #001a08;
    border: 1px solid var(--accent, #00FF66);
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 0.82em;
    border-radius: 10px;
    animation: mm-pick-float 2.2s ease-in-out infinite;
}
/* While the tube is mixing, the chips swirl faster and the whole
 * tube shakes a little — pure theatre, the winner is already
 * chosen by the time the fizzing starts. */
.mm-pick-mixing .mm-pick-chip {
    animation-name: mm-pick-swirl;
    animation-duration: 0.9s;
}
.mm-pick-mixing .mm-pick-tube {
    animation: mm-pick-shake 0.45s ease-in-out infinite;
}
.mm-pick-mixing .mm-pick-glass {
    filter: drop-shadow(0 0 16px rgba(0, 255, 102, 0.55));
}
@keyframes mm-pick-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-9px) rotate(2deg); }
}
@keyframes mm-pick-swirl {
    0%   { transform: translate(0, 0) rotate(-6deg); }
    25%  { transform: translate(6px, -12px) rotate(5deg); }
    50%  { transform: translate(-5px, -4px) rotate(-4deg); }
    75%  { transform: translate(5px, -14px) rotate(6deg); }
    100% { transform: translate(0, 0) rotate(-6deg); }
}
@keyframes mm-pick-shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(-2px) rotate(-0.6deg); }
    75%      { transform: translateX(2px) rotate(0.6deg); }
}
/* Fizz bubbles rising through the potion. */
.mm-pick-bubble {
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25) 60%, rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: mm-pick-bubble-rise 1.8s linear infinite;
}
@keyframes mm-pick-bubble-rise {
    0%   { transform: translateY(0); opacity: 0; }
    15%  { opacity: 0.95; }
    100% { transform: translateY(-170px); opacity: 0; }
}
/* When the mixing ends the chips fade away — the tube has spoken. */
.mm-pick-reveal .mm-pick-chips {
    opacity: 0;
    transition: opacity 0.4s ease;
}
/* The mutant: hidden down inside the tube until the reveal, when
 * it springs up astride the rim, holding the winner's name. */
.mm-pick-mutant {
    position: absolute;
    left: 50%;
    bottom: 300px;
    width: 150px;
    z-index: 3;
    transform: translate(-50%, 460px);
    text-align: center;
}
.mm-pick-mutant svg {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 102, 0.5));
}
.mm-pick-reveal .mm-pick-mutant {
    transform: translate(-50%, 0);
    transition: transform 0.7s cubic-bezier(0.2, 1.4, 0.4, 1);
}
/* The little sign the mutant holds up. */
.mm-pick-sign {
    display: inline-block;
    margin-top: 2px;
    padding: 5px 12px;
    background: #001a08;
    border: 2px solid var(--accent, #00FF66);
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 1.05em;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.4);
    max-width: 100%;
    overflow-wrap: break-word;
}
.mm-pick-sign:empty {
    display: none;
}
/* The big result banner under the tube. */
.mm-pick-result {
    margin: 14px auto 0;
    padding: 12px 16px;
    border: 1px solid var(--accent, #00FF66);
    background: #001a08;
    color: var(--text, #00FF66);
    font-family: monospace;
    font-size: 1.1em;
    line-height: 1.5;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.3);
    min-height: 1.6em;
}
.mm-pick-result:empty {
    display: none;
}

@media (max-width: 600px) {
    .mm-pick-tube { height: 430px; }
    .mm-pick-glass { height: 300px; }
    .mm-pick-mutant { bottom: 270px; }
    .mm-pick-go { font-size: 1em; padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .mm-snow { display: none; }
    .mm-pick-chip, .mm-pick-bubble { animation: none !important; }
    .mm-pick-mixing .mm-pick-tube { animation: none; }
    .mm-pick-reveal .mm-pick-mutant { transition: none; }
}
