/* NexusTweak "Frost Night" – Weihnachtsdesign. Alles hängt an html.nx-xmas und wird von nexus-xmas.js gesteuert. */

/* ---------------------------------------------------------------- toggle (always available in season) */
/* Sits inside the site navigation, whose link styles would otherwise win: hence !important. */
.nx-xmas-toggle {
  width: 36px !important; height: 36px !important; min-width: 36px !important; flex: 0 0 36px; margin-right: 8px;
  display: inline-grid !important; place-items: center; cursor: pointer; padding: 0 !important;
  border-radius: 12px !important; border: 1px solid rgba(150, 205, 255, .34) !important;
  background: linear-gradient(160deg, rgba(20, 52, 92, .75), rgba(6, 16, 31, .85)) !important;
  color: #d7eeff !important; font-size: 17px !important; line-height: 1 !important;
  box-shadow: 0 0 16px rgba(120, 200, 255, .16);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .2s, opacity .2s;
}
.nx-xmas-toggle span { display: block; transform: translateY(-1px); }
.nx-xmas-toggle:hover { transform: rotate(60deg) scale(1.06); border-color: rgba(190, 230, 255, .6) !important; box-shadow: 0 0 22px rgba(120, 200, 255, .35); }
.nx-xmas-toggle:focus-visible { outline: 2px solid #8fd6ff; outline-offset: 2px; }
.nx-xmas-toggle[aria-pressed="false"] { opacity: .55; }
.nx-xmas-toggle.floating { position: fixed; left: 16px; bottom: 16px; z-index: 120; margin: 0; }

/* ---------------------------------------------------------------- sky: aurora, frost, canvas */
.nx-xmas-aurora { position: fixed; left: 0; right: 0; top: 0; height: 78vh; z-index: 0; pointer-events: none; overflow: hidden; }
.nx-xmas-aurora i {
  position: absolute; display: block; width: 70vw; height: 46vh; border-radius: 50%;
  will-change: transform; opacity: .8; mix-blend-mode: screen;
}
.nx-xmas-aurora i:nth-child(1) { left: -8vw; top: -10vh; background: radial-gradient(ellipse at 50% 60%, rgba(46, 230, 175, .22), rgba(46, 230, 175, .08) 38%, transparent 68%); animation: nx-xmas-aurora-a 23s ease-in-out infinite alternate; }
.nx-xmas-aurora i:nth-child(2) { left: 28vw; top: -16vh; background: radial-gradient(ellipse at 50% 55%, rgba(70, 150, 255, .22), rgba(70, 150, 255, .07) 40%, transparent 68%); animation: nx-xmas-aurora-b 29s ease-in-out infinite alternate; }
.nx-xmas-aurora i:nth-child(3) { left: 52vw; top: -6vh; background: radial-gradient(ellipse at 50% 50%, rgba(160, 100, 255, .18), rgba(160, 100, 255, .06) 40%, transparent 70%); animation: nx-xmas-aurora-c 26s ease-in-out infinite alternate; }
.nx-xmas-aurora i:nth-child(4) { left: 10vw; top: 6vh; width: 90vw; height: 22vh; background: linear-gradient(90deg, transparent, rgba(80, 255, 200, .10) 25%, rgba(110, 190, 255, .12) 55%, rgba(170, 120, 255, .08) 80%, transparent); filter: blur(18px); animation: nx-xmas-aurora-band 17s ease-in-out infinite alternate; }

@keyframes nx-xmas-aurora-a { from { transform: translate3d(0, 0, 0) rotate(-8deg) scale(1); } to { transform: translate3d(14vw, 4vh, 0) rotate(6deg) scale(1.18); } }
@keyframes nx-xmas-aurora-b { from { transform: translate3d(0, 0, 0) rotate(10deg) scale(1.1); } to { transform: translate3d(-16vw, 6vh, 0) rotate(-6deg) scale(.95); } }
@keyframes nx-xmas-aurora-c { from { transform: translate3d(0, 2vh, 0) rotate(-4deg) scale(.9); } to { transform: translate3d(-10vw, -3vh, 0) rotate(12deg) scale(1.15); } }
@keyframes nx-xmas-aurora-band { from { transform: translate3d(-6vw, 0, 0) skewY(-4deg); opacity: .55; } to { transform: translate3d(6vw, 3vh, 0) skewY(3deg); opacity: 1; } }

.nx-xmas-frost {
  position: fixed; inset: 0; z-index: 49; pointer-events: none;
  background:
    radial-gradient(ellipse 34vw 26vh at 0 0, rgba(215, 236, 255, .14), rgba(170, 210, 255, .05) 45%, transparent 70%),
    radial-gradient(ellipse 34vw 26vh at 100% 0, rgba(215, 236, 255, .14), rgba(170, 210, 255, .05) 45%, transparent 70%),
    radial-gradient(ellipse 30vw 22vh at 0 100%, rgba(215, 236, 255, .10), transparent 70%),
    radial-gradient(ellipse 30vw 22vh at 100% 100%, rgba(215, 236, 255, .10), transparent 70%);
}

.nx-xmas-canvas { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---------------------------------------------------------------- garland and baubles under the header */
.nx-xmas-positioned { position: relative; }
.nx-xmas .nx-xmas-header { overflow: visible; }
.nx-xmas-garland { position: absolute; left: 0; right: 0; top: calc(100% - 6px); height: 0; z-index: 6; pointer-events: none; }
.nx-xmas-wire { position: absolute; left: 0; top: 0; overflow: visible; }
.nx-xmas-wire path { fill: none; stroke: #0b1a2f; stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(120, 180, 240, .25)); }

.nx-xmas-bulb {
  position: absolute; width: 7px; height: 10px; margin: -2px 0 0 -3.5px; border-radius: 50% 50% 48% 48% / 40% 40% 60% 60%;
  background: var(--bulb); box-shadow: 0 0 6px 1px var(--bulb), 0 0 16px 3px var(--glow);
  animation: nx-xmas-twinkle 2.4s ease-in-out infinite;
}
.nx-xmas-bulb::before { content: ""; position: absolute; left: 1.5px; top: -3px; width: 4px; height: 3px; border-radius: 1px; background: #33465f; }
.nx-xmas-bulb.c1 { --bulb: #ff4d5e; --glow: rgba(255, 70, 90, .55); }
.nx-xmas-bulb.c2 { --bulb: #ffd166; --glow: rgba(255, 200, 90, .55); }
.nx-xmas-bulb.c3 { --bulb: #6cc8ff; --glow: rgba(90, 190, 255, .55); }
.nx-xmas-bulb.c4 { --bulb: #fff4e0; --glow: rgba(255, 245, 225, .5); }
@keyframes nx-xmas-twinkle { 0%, 100% { opacity: 1; filter: brightness(1.15); } 50% { opacity: .35; filter: brightness(.7); } }

.nx-xmas-bauble {
  position: absolute; width: 22px; margin-left: -11px; height: calc(var(--len) + 30px);
  transform-origin: 50% 0; animation: nx-xmas-swing 3.8s ease-in-out infinite;
}
.nx-xmas-bauble::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: var(--len); background: linear-gradient(rgba(205, 215, 235, .35), rgba(205, 215, 235, .85)); }
.nx-xmas-bauble i { position: absolute; left: 7px; top: var(--len); width: 8px; height: 6px; border-radius: 2px; background: linear-gradient(#f6dc8c, #b9862c); }
.nx-xmas-bauble::after {
  content: ""; position: absolute; left: 1px; top: calc(var(--len) + 5px); width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 33% 28%, var(--light) 0, var(--base) 42%, var(--dark) 100%);
  box-shadow: 0 0 14px var(--halo), inset -2px -3px 6px rgba(0, 0, 0, .35);
}
.nx-xmas-bauble.c1 { --light: #ffc2c9; --base: #e3283c; --dark: #4a0811; --halo: rgba(255, 60, 80, .4); }
.nx-xmas-bauble.c2 { --light: #fff0c2; --base: #f0b432; --dark: #4d3305; --halo: rgba(255, 200, 80, .4); }
.nx-xmas-bauble.c3 { --light: #c6e6ff; --base: #3289f0; --dark: #08214a; --halo: rgba(70, 160, 255, .45); }
.nx-xmas-bauble.c4 { --light: #e7d4ff; --base: #9459e6; --dark: #241048; --halo: rgba(160, 100, 255, .4); }
@keyframes nx-xmas-swing { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-7deg); } }

/* ---------------------------------------------------------------- snow caps with icicles on cards */
.nx-xmas-cap { display: block; position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; line-height: 0; }
.nx-xmas-cap svg { display: block; overflow: visible; }
.nx-xmas-cap .snow { fill: #f3f9ff; filter: drop-shadow(0 2px 2px rgba(0, 10, 30, .35)); }
.nx-xmas-cap .ice { fill: rgba(214, 236, 255, .72); }
.nx-xmas-cap.large .snow { fill: #f6fbff; }

/* Frost on the top edge of every capped card. */
.nx-xmas .nx-hero, .nx-xmas .nx-final-cta, .nx-xmas .nx-platform-section, .nx-xmas .nx-safety-section,
.nx-xmas .nx-flow-card, .nx-xmas .nx-mode-card, .nx-xmas .nx-tech-card, .nx-xmas .card {
  border-top-color: rgba(210, 235, 255, .42);
}

/* ---------------------------------------------------------------- brand mark gets a little snow */
.nx-xmas-brand { position: relative; overflow: visible !important; }
.nx-xmas-brand-cap {
  display: block; position: absolute; left: -3px; right: -3px; top: -6px; height: 10px; pointer-events: none;
  border-radius: 10px 10px 6px 6px / 8px 8px 4px 4px;
  background: radial-gradient(ellipse at 50% 20%, #ffffff, #e6f3ff 60%, #c9e2fb);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .3);
}
.nx-xmas-brand-cap::after { content: ""; position: absolute; left: 62%; top: 7px; width: 4px; height: 6px; border-radius: 0 0 4px 4px; background: #e6f3ff; }

/* ---------------------------------------------------------------- hero countdown chip */
.nx-xmas-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 9px; border-radius: 999px;
  font-size: 10px; letter-spacing: .08em; color: #fff2d2; white-space: nowrap; vertical-align: middle;
  border: 1px solid rgba(255, 210, 120, .45);
  background: linear-gradient(110deg, rgba(120, 30, 40, .55), rgba(40, 20, 60, .45) 45%, rgba(20, 60, 110, .5)), rgba(6, 14, 28, .6);
  box-shadow: 0 0 24px rgba(255, 190, 90, .16), inset 0 1px 0 rgba(255, 255, 255, .12);
  position: relative; overflow: hidden;
}
.nx-xmas-chip::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -50%;
  background: linear-gradient(100deg, transparent, rgba(255, 240, 200, .28), transparent);
  animation: nx-xmas-sweep 4.5s ease-in-out infinite;
}
.nx-xmas-chip b { font-weight: 900; color: #ffd57a; }
.nx-xmas-chip em { font-style: normal; font-weight: 700; letter-spacing: .02em; color: #e8f4ff; }
.nx-xmas-chip-star { color: #ffd57a; font-size: 12px; display: inline-block; animation: nx-xmas-spin 6s linear infinite; text-shadow: 0 0 10px rgba(255, 205, 90, .9); }
.nx-xmas-chip.standalone { margin: 0 0 14px; }
.nx-xmas-promo { margin: 12px 0 0; display: inline-block; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #fff2d2; border: 1px solid rgba(255, 210, 120, .35); background: rgba(80, 20, 30, .35); }
@keyframes nx-xmas-sweep { 0%, 55% { left: -50%; } 100% { left: 130%; } }
@keyframes nx-xmas-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- headline shimmer and festive buttons */
html.nx-xmas .webui-v2 .gradient-text {
  background-image: linear-gradient(100deg, #ffffff 0%, #9fe2ff 28%, #ffe5a8 46%, #ffffff 52%, #9fe2ff 70%, #4b92ff 100%);
  background-size: 260% 100%;
  animation: nx-xmas-shimmer 7s ease-in-out infinite;
}
@keyframes nx-xmas-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

html.nx-xmas .button.primary { animation: nx-xmas-glow 3.4s ease-in-out infinite; }
@keyframes nx-xmas-glow {
  0%, 100% { box-shadow: 0 10px 32px rgba(17, 116, 245, .22), 0 0 0 rgba(255, 205, 110, 0), inset 0 1px 0 rgba(255, 255, 255, .16); }
  50% { box-shadow: 0 10px 36px rgba(17, 116, 245, .32), 0 0 22px rgba(255, 205, 110, .28), inset 0 1px 0 rgba(255, 255, 255, .22); }
}

/* ---------------------------------------------------------------- finale: winter village at the end of every page */
.nx-xmas-defs-host { position: absolute; width: 0; height: 0; overflow: hidden; }
.nx-xmas-village { position: relative; z-index: 1; margin-top: clamp(26px, 5vw, 70px); overflow: hidden; text-align: center; }
.nx-xmas-village::before {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 120%; height: 70%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(255, 190, 110, .12), rgba(120, 170, 255, .06) 55%, transparent 75%);
}
.nx-xmas-finale { position: relative; z-index: 2; padding: 0 16px; }
.nx-xmas-finale-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: .1em; color: #ffe7b0; white-space: nowrap;
  border: 1px solid rgba(255, 210, 120, .42); background: rgba(10, 20, 40, .55);
  box-shadow: 0 0 26px rgba(255, 190, 90, .16), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.nx-xmas-finale-kicker i { font-style: normal; color: #ffd57a; text-shadow: 0 0 10px rgba(255, 205, 90, .9); display: inline-block; animation: nx-xmas-spin 6s linear infinite; }
.nx-xmas-finale-kicker b { font-weight: 900; color: #ffd57a; }
.nx-xmas-finale-kicker em { font-style: normal; font-weight: 700; letter-spacing: .03em; color: #e8f4ff; }
html.nx-xmas .nx-xmas-finale-title {
  margin: 16px 0 8px; padding: 0 .08em; font-size: clamp(40px, 6.6vw, 92px); line-height: 1.04; font-weight: 900; letter-spacing: -.035em;
  background: linear-gradient(100deg, #fff1c9 0%, #ffd36b 20%, #fffaf0 42%, #ffb85a 60%, #ffe7a6 78%, #fff1c9 100%);
  background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 186, 90, .32));
  animation: nx-xmas-shimmer 8s ease-in-out infinite;
}
.nx-xmas-finale-text { margin: 0; font-size: clamp(14px, 1.45vw, 18px); font-weight: 600; color: #dcebff; opacity: .92; }
.nx-xmas-finale-hint { margin: 10px 0 0; font-size: 11.5px; color: #9fc3ea; opacity: .75; }
.nx-xmas-scene { position: relative; width: 100%; margin-top: 22px; }
.nx-xmas-scene svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.nx-xmas-scene svg.fx { pointer-events: none; will-change: transform; }

.nx-xmas-scene .win { opacity: .06; transition: opacity 1s ease var(--d, 0s); }
.nx-xmas-village.lit .win { opacity: 1; }
.nx-xmas-village.lit .win.off { opacity: .12; transition-delay: 0s; transition-duration: .25s; }
.nx-xmas-scene .tl { opacity: 0; transition: opacity .45s ease var(--d, 0s); }
.nx-xmas-village.lit .tl { opacity: 1; }
.nx-xmas-village.lit .tl .b { animation: nx-xmas-blink 2.6s ease-in-out infinite; }
.nx-xmas-scene .nx-star { pointer-events: auto; cursor: pointer; opacity: 0; transition: opacity 1.2s ease; }
.nx-xmas-village.lit .nx-star { opacity: 1; }
.nx-xmas-scene .rays { transform-box: fill-box; transform-origin: center; animation: nx-xmas-spin 46s linear infinite; }
.nx-xmas-scene .halo { transform-box: fill-box; transform-origin: center; animation: nx-xmas-pulse 3.2s ease-in-out infinite; }
.nx-xmas-scene .core { transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.nx-xmas-scene .nx-star:hover .core { transform: scale(1.18) rotate(12deg); }
.nx-xmas-scene .puff { fill: url(#nxvSmoke); transform-box: fill-box; transform-origin: center; animation: nx-xmas-smoke 5.7s linear infinite; }
.nx-xmas-scene .sp { transform-box: fill-box; transform-origin: center; animation: nx-xmas-spark 3.4s ease-in-out infinite; }
.nx-xmas-scene .gift { cursor: pointer; }
.nx-xmas-scene .gift-in { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3, 1.7, .5, 1); }
.nx-xmas-scene .gift:hover .gift-in { transform: translateY(-5px) rotate(-3deg); }
.nx-xmas-scene .lid { transform-box: fill-box; transform-origin: 0% 100%; }
.nx-xmas-scene .gift.pop .lid { animation: nx-xmas-lid .9s cubic-bezier(.2, .9, .3, 1); }
.nx-xmas-village.instant .win, .nx-xmas-village.instant .tl, .nx-xmas-village.instant .nx-star { transition: none !important; }
.nx-xmas-village.idle *, .nx-xmas-village.idle .nx-xmas-finale-title { animation-play-state: paused !important; }
.nx-xmas-village.static *, html.nx-xmas .nx-xmas-village.static .nx-xmas-finale-title { animation: none !important; transition: none !important; }

@keyframes nx-xmas-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes nx-xmas-pulse { 0%, 100% { transform: scale(.88); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes nx-xmas-smoke { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(10px, -46px) scale(2.3); opacity: 0; } }
@keyframes nx-xmas-spark { 0%, 70%, 100% { transform: scale(0); opacity: 0; } 82% { transform: scale(1); opacity: 1; } }
@keyframes nx-xmas-lid { 0% { transform: none; } 35% { transform: translate(-2px, -18px) rotate(-16deg); } 70% { transform: translate(0, -4px) rotate(4deg); } 100% { transform: none; } }

/* ---------------------------------------------------------------- pine branches in the corners of wide screens */
.nx-xmas-branch { position: fixed; top: 0; z-index: 57; pointer-events: none; }
.nx-xmas-branch.left { left: 0; }
.nx-xmas-branch.right { right: 0; transform: scaleX(-1); }
.nx-xmas-branch svg { display: block; width: 100%; height: auto; overflow: visible; }
.nx-xmas-branch svg.fx { position: absolute; left: 0; top: 0; will-change: transform; }
.nx-xmas-branch .b { animation: nx-xmas-blink 2.6s ease-in-out infinite; }
.nx-xmas-branch .bb { transform-box: view-box; animation: nx-xmas-swing 4.6s ease-in-out infinite; }

/* ---------------------------------------------------------------- Santa's sleigh */
.nx-xmas-sleigh {
  position: fixed; left: 0; top: 0; z-index: 58; pointer-events: none; width: clamp(210px, 25vw, 400px);
  opacity: 0; transform: translate3d(-9999px, 0, 0); transform-origin: 50% 50%; will-change: transform;
  filter: drop-shadow(0 0 4px rgba(255, 214, 120, .9)) drop-shadow(0 0 16px rgba(255, 180, 70, .45));
}
.nx-xmas-sleigh.flying { opacity: 1; }
.nx-xmas-sleigh svg { display: block; width: 100%; height: auto; overflow: visible; }
.nx-xmas-sleigh .gold { fill: url(#nxXmasGold); }
.nx-xmas-sleigh .white { fill: #fffaf0; }
.nx-xmas-sleigh .trim { fill: #b8721f; opacity: .45; }
.nx-xmas-sleigh .line { fill: none; stroke: url(#nxXmasGold); stroke-linecap: round; stroke-linejoin: round; }
.nx-xmas-sleigh .rein { fill: none; stroke: #cfeaff; stroke-width: 1.1; stroke-linecap: round; opacity: .85; }
.nx-xmas-sleigh .bob { animation: nx-xmas-bob 1.7s ease-in-out infinite; }
.nx-xmas-sleigh .legs { transform-box: fill-box; animation: nx-xmas-gallop .42s ease-in-out infinite alternate; }
.nx-xmas-sleigh .legs.front { transform-origin: 100% 0; }
.nx-xmas-sleigh .legs.back { transform-origin: 0 0; animation-name: nx-xmas-gallop-back; }
.nx-xmas-sleigh .d2 .legs { animation-delay: -.14s; }
.nx-xmas-sleigh .d3 .legs { animation-delay: -.28s; }
@keyframes nx-xmas-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes nx-xmas-gallop { from { transform: rotate(-16deg); } to { transform: rotate(12deg); } }
@keyframes nx-xmas-gallop-back { from { transform: rotate(14deg); } to { transform: rotate(-12deg); } }
.nx-xmas-chip { cursor: pointer; }

/* ---------------------------------------------------------------- calmer on small screens, still on reduced motion */
@media (max-width: 720px) {
  .nx-xmas-bauble { display: none; }
  .nx-xmas-aurora i { width: 120vw; }
  .nx-xmas-chip { white-space: normal; }
  .nx-xmas-finale-kicker { white-space: normal; }
  .nx-xmas-finale-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nx-xmas-aurora i, .nx-xmas-bulb, .nx-xmas-bauble, .nx-xmas-chip::after, .nx-xmas-chip-star,
  html.nx-xmas .webui-v2 .gradient-text, html.nx-xmas .button.primary, .nx-xmas-branch .b, .nx-xmas-branch .bb,
  .nx-xmas-finale-kicker i { animation: none !important; }
}
