/* Winter-Modus – wird nur geladen, wenn der Owner ihn auf /owner aktiviert hat. Alles an body.winter gebunden. */

/* 1) Kühle Blau-/Weiß-/Eistöne */
body.winter {
  --accent: #6FC3FF;
  --accent-purple: #9AD8FF;
  --accent2: #A8F0FF;
  --cyan: #CFF4FF;
  --info: #7FB8FF;
  --bg: #060E1C;
  --card: #0D1930;
  --card-hover: #122343;
  --border: rgba(185, 225, 255, .16);
  --border-hover: rgba(185, 225, 255, .32);
  --muted: #9DB4D0;
  --accent-gradient: linear-gradient(135deg, #58B4FF 0%, #BDEBFF 100%);
  --glass-bg: rgba(13, 25, 48, .62);
  --glass-strong: rgba(14, 28, 54, .92);
  --frost: rgba(200, 235, 255, .55);
}
body.winter.theme-light {
  --accent: #2A8BE0;
  --accent-purple: #4FA9F0;
  --bg: #EAF3FC;
  --card: #FFFFFF;
  --card-hover: #F1F8FF;
  --border: rgba(40, 100, 160, .18);
  --border-hover: rgba(40, 100, 160, .34);
  --muted: #4F6B8A;
  --glass-bg: rgba(255, 255, 255, .6);
  --frost: rgba(120, 190, 240, .5);
}
body.winter .aurora i:nth-child(1) { filter: hue-rotate(-45deg); }
body.winter .aurora i:nth-child(3) { filter: hue-rotate(-105deg); }

/* 2) Banner */
.wn-banner {
  position: relative; z-index: 2; margin: 0 auto; max-width: 1480px; text-align: center;
  padding: .45rem 1rem; font-size: .85rem; font-weight: 600; letter-spacing: .02em; color: #08203a;
  background: linear-gradient(90deg, #BFE6FF, #F4FBFF 50%, #BFE6FF);
  box-shadow: 0 6px 24px -8px rgba(110, 195, 255, .7);
}
.wn-banner .wn-opt {
  margin-left: .6rem; padding: .15rem .65rem; border-radius: 999px; border: 1px solid rgba(8, 32, 58, .35);
  background: rgba(255, 255, 255, .55); color: #08203a; font: inherit; font-size: .75rem; cursor: pointer;
}
.wn-banner .wn-opt:hover { background: #fff; }
.wn-banner .wn-fl { display: inline-block; animation: wn-spin 9s linear infinite; }
@keyframes wn-spin { to { transform: rotate(360deg); } }

/* 3) Schnee-, Frost- & Eis-Effekte */
body.winter::after {                     /* Frostrand um den Bildschirm */
  content: ""; position: fixed; inset: 0; z-index: 5; pointer-events: none;
  box-shadow: inset 0 0 110px rgba(190, 230, 255, .16), inset 0 0 18px rgba(220, 244, 255, .22);
}
body.winter .elite-header::after {       /* Eiszapfen unter der Leiste */
  content: ""; position: absolute; left: 6%; right: 6%; bottom: -13px; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='14' viewBox='0 0 46 14'%3E%3Cpath d='M0 0h10L5 11zM12 0h14l-7 16zM28 0h10l-5 8zM40 0h6v0l-2 12z' fill='%23d6efff' fill-opacity='.9'/%3E%3C/svg%3E") repeat-x top left / 46px 14px;
  filter: drop-shadow(0 0 5px rgba(140, 205, 255, .7));
}
body.winter .s-foot::before {            /* Schneewehe über dem Footer, über die volle Breite (überschreibt die schmale Standard-Linie aus site.css) */
  content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px; width: auto; translate: none; opacity: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18'%3E%3Cpath d='M0 18V11q15-14 30-2t30-2 30 3 30-4v12z' fill='%23eaf6ff' fill-opacity='.9'/%3E%3C/svg%3E") repeat-x bottom left / 120px 18px;
}

/* 4) Glow- & Lichteffekte */
body.winter .card, body.winter .o-card, body.winter .elite-header {
  border-color: var(--border-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 34px -14px rgba(100, 185, 255, .38);
}
body.winter .card:hover, body.winter .o-card:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 40px -12px rgba(120, 200, 255, .55); }
body.winter .logo-text { text-shadow: 0 0 20px rgba(140, 205, 255, .55); }
body.winter .logo-emoji { position: relative; filter: drop-shadow(0 0 8px rgba(140, 205, 255, .8)); }
body.winter .logo-emoji::after { content: "❄️"; position: absolute; top: -9px; right: -8px; font-size: .7em; animation: wn-twinkle 2.8s ease-in-out infinite; }
body.winter .nav-link.active { color: #06203a; box-shadow: 0 0 20px rgba(120, 200, 255, .6); }
body.winter a:not(.btn):not(.nav-link):not(.logo):hover { text-shadow: 0 0 10px rgba(150, 215, 255, .5); }
@keyframes wn-twinkle { 0%, 100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }

/* 5) Schneefall (Canvas, per winter.js) */
#wn-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }

/* 4) Startseiten-Szene: Berg, Skifahrer, Rentiere mit Geschenke-Schlitten */
.wn-scene-sec { margin-top: clamp(1.5rem, 4vw, 3rem); }
.wn-scene { max-width: 1200px; margin: 0 auto; border-radius: 24px; overflow: hidden; border: 1px solid rgba(190, 225, 255, .35);
  box-shadow: 0 18px 50px -20px rgba(80, 160, 230, .55); line-height: 0; background: #091a38; }
.wn-scene svg { width: 100%; height: auto; display: block; }
.wn-ski { animation: wn-ski-r linear infinite; opacity: 0; }
.wn-ski.l { animation-name: wn-ski-l; }
@keyframes wn-ski-r { 0% { transform: translate(0, 0); opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translate(330px, 202px); opacity: 0; } }
@keyframes wn-ski-l { 0% { transform: translate(0, 0); opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translate(-300px, 206px); opacity: 0; } }
.wn-run { animation: wn-run linear infinite; }
@keyframes wn-run { from { transform: translateX(-230px); } to { transform: translateX(1330px); } }
.wn-bob { animation: wn-bob .55s ease-in-out infinite alternate; }
.wn-bob.big { animation-duration: 1.6s; }
@keyframes wn-bob { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-5px) rotate(1.5deg); } }
.wn-leg { transform-box: fill-box; transform-origin: 50% 0; animation: wn-leg .28s ease-in-out infinite alternate; }
.wn-leg.b { animation-direction: alternate-reverse; }
@keyframes wn-leg { from { transform: rotate(-28deg); } to { transform: rotate(28deg); } }
.wn-nose { animation: wn-glow 1.2s ease-in-out infinite alternate; }
@keyframes wn-glow { from { opacity: .55; } to { opacity: 1; } }
.wn-star { animation: wn-tw 3s ease-in-out infinite alternate; }
.wn-star.d2 { animation-delay: -1s; } .wn-star.d3 { animation-delay: -2s; }
@keyframes wn-tw { from { opacity: .25; } to { opacity: 1; } }
.wn-win { animation: wn-tw 2.4s ease-in-out infinite alternate; }
@media (max-width: 600px) { .wn-scene { border-radius: 16px; } }

/* 5) Ausbau: Ski-Lift, Vorplatz mit Hütten, Glühwein, Weihnachtsbaum, Eisbahn, Himmel */
.wn-lift { opacity: 0; animation: wn-lift-up 25s linear infinite; }
.wn-lift.down { animation-name: wn-lift-down; }
@keyframes wn-lift-up { 0% { transform: translate(0, 0); opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { transform: translate(-300px, -185px); opacity: 0; } }
@keyframes wn-lift-down { 0% { transform: translate(0, 0); opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { transform: translate(300px, 185px); opacity: 0; } }
.wn-gear { transform-box: fill-box; transform-origin: 50% 50%; animation: wn-spin 6s linear infinite; }
.wn-steam { animation: wn-steam 3s ease-out infinite; opacity: 0; }
@keyframes wn-steam { 0% { transform: translateY(0) scale(.7); opacity: 0; } 20% { opacity: .75; } 100% { transform: translateY(-13px) scale(1.7); opacity: 0; } }
.wn-sip { transform-origin: 5px -30px; animation: wn-sip 5s ease-in-out infinite; }
@keyframes wn-sip { 0%, 55%, 100% { transform: rotate(0); } 65%, 80% { transform: rotate(-38deg) translateY(-1px); } }
.wn-smoke { animation: wn-smoke 4.2s ease-out infinite; opacity: 0; }
@keyframes wn-smoke { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .8; } 100% { transform: translate(10px, -34px) scale(2.2); opacity: 0; } }
.wn-bulb { animation: wn-bulb 1.8s ease-in-out infinite alternate; }
.wn-bulb.b1 { animation-delay: -.6s; } .wn-bulb.b2 { animation-delay: -1.2s; }
@keyframes wn-bulb { from { opacity: .3; } to { opacity: 1; } }
.wn-lamp { animation: wn-lamp 2.6s ease-in-out infinite alternate; }
@keyframes wn-lamp { from { opacity: .65; } to { opacity: 1; } }
.wn-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: wn-flame .45s ease-in-out infinite alternate; }
.wn-flame.b { animation-duration: .32s; }
@keyframes wn-flame { from { transform: scale(1, .8); } to { transform: scale(.9, 1.15); } }
.wn-wave { transform-box: fill-box; transform-origin: 0 100%; animation: wn-wave 1.1s ease-in-out infinite alternate; }
@keyframes wn-wave { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
.wn-skate { animation: wn-skate 6.5s ease-in-out infinite alternate; }
.wn-skate.r { animation-direction: alternate-reverse; }
@keyframes wn-skate { from { transform: translateX(-24px); } to { transform: translateX(52px); } }
.wn-bell { transform-box: fill-box; transform-origin: 50% 0; animation: wn-bell 1.6s ease-in-out infinite alternate; }
@keyframes wn-bell { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.wn-startop { transform-box: fill-box; transform-origin: 50% 50%; animation: wn-starpulse 1.6s ease-in-out infinite alternate; }
@keyframes wn-starpulse { from { transform: scale(.85); opacity: .75; } to { transform: scale(1.15); opacity: 1; } }
.wn-cloud { animation: wn-run linear infinite; }
.wn-aurora { animation: wn-aur 9s ease-in-out infinite alternate; }
@keyframes wn-aur { from { opacity: .35; transform: translateX(-25px); } to { opacity: .85; transform: translateX(25px); } }
.wn-shoot { animation: wn-shoot 11s linear infinite; opacity: 0; }
@keyframes wn-shoot { 0%, 88% { transform: translate(760px, 30px); opacity: 0; } 90% { opacity: 1; } 98% { transform: translate(560px, 120px); opacity: 0; } 100% { opacity: 0; } }

/* Schneewehe als Segmente (von winter.js erzeugt): lassen sich mit der Maus herunterschieben, ein Neuladen stellt sie wieder her */
body.winter .s-foot.wn-drift-on::before { display: none; }
.wn-drift { position: absolute; left: 0; right: 0; top: -17px; height: 18px; display: flex; pointer-events: none; z-index: 2; overflow-x: clip; overflow-y: visible; }
.wn-seg { flex: 0 0 30px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18'%3E%3Cpath d='M0 18V11q15-14 30-2t30-2 30 3 30-4v12z' fill='%23eaf6ff' fill-opacity='.9'/%3E%3C/svg%3E") repeat-x 0 100% / 120px 18px; background-position: calc(var(--i, 0) * -30px) 100%; }
.wn-seg.fall { animation: wn-segfall var(--t, .9s) cubic-bezier(.4, 0, .9, .5) var(--dl, 0s) forwards; }
.wn-seg.gone { visibility: hidden; }
@keyframes wn-segfall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(var(--fy, 70px)) rotate(var(--r, 12deg)); opacity: 0; } }
/* Schnee fällt von Schneewehe und Eiszapfen, wenn die Maus darüberfährt (siehe winter.js) */
.wn-drop { position: fixed; z-index: 9; pointer-events: none; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(200, 235, 255, .9);
  opacity: 0; animation: wn-drop 1.2s cubic-bezier(.35, 0, .85, .55) forwards; }
@keyframes wn-drop { 0% { transform: translate(0, 0) scale(1); opacity: .95; } 80% { opacity: .85; } 100% { transform: translate(var(--dx, 0), var(--dy, 90px)) scale(.55); opacity: 0; } }
body.winter .s-foot.wn-shake::before { animation: wn-shake .35s ease-out; }
body.winter .elite-header.wn-shake::after { animation: wn-shake .35s ease-out; }
@keyframes wn-shake { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(2px) scaleY(.92); } 60% { transform: translateY(-1px); } }

@media (prefers-reduced-motion: reduce) {
  .wn-banner .wn-fl, body.winter .logo-emoji::after { animation: none; }
  #wn-snow { display: none; }
  .wn-scene * { animation: none !important; }
  .wn-slope-r, .wn-slope-l, .wn-lift { display: none; }
}
@media (max-width: 600px) {
  body.winter .elite-header::after { height: 10px; bottom: -9px; background-size: 34px 10px; }
  body.winter::after { box-shadow: inset 0 0 60px rgba(190, 230, 255, .14); }
}
