/* =========================================================
   🛷 Χριστούγεννα — «Το έλκηθρο των δώρων» (js/xmassleigh.js)
   Καμβάς WebGL σε όλη τη σκηνή + χιόνι (DOM) + HUD + αναδυόμενα μηνύματα + κάρτες αρχής/παύσης/τέλους.
   Κινήσεις ΜΟΝΟ με transform/opacity.
   ========================================================= */
.xg-wrap { position: absolute; inset: 0; overflow: hidden; border-radius: 18px; background: #0b1033; user-select: none; -webkit-user-select: none; }
.xg-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.xg-wrap.shake { animation: xgShake .45s ease-out; }
@keyframes xgShake { 20% { transform: translate(-10px, 4px) rotate(-.6deg); } 40% { transform: translate(9px, -3px) rotate(.5deg); } 60% { transform: translate(-6px, 2px); } 80% { transform: translate(3px, -1px); } }

/* χιόνι */
.xg-snow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.xg-snow i { position: absolute; top: -12px; width: var(--z); height: var(--z); border-radius: 50%; background: #fff; opacity: .85; animation: xgFall linear infinite; }
@keyframes xgFall { from { transform: translate(0, 0); } 50% { transform: translate(-30px, 55vh); } to { transform: translate(-70px, 105vh); } }

/* HUD */
.xg-hud { position: absolute; left: 12px; right: 12px; top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.xg-box { display: flex; align-items: center; gap: 12px; padding: 6px 14px; border-radius: 999px; background: rgba(10, 14, 50, .55); color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.xg-gifts b { color: #ffd54f; }
.xg-sack b { color: #ffd54f; }
.xg-sack.low b { color: #ff8a80; }
.xg-sack.low { animation: xgLow 1s ease-in-out infinite alternate; }
@keyframes xgLow { to { transform: scale(1.12); } }
html.th-lite .xg-sack.low { animation: none; }
.xg-hearts i { font-style: normal; margin-right: 2px; transition: opacity .3s, transform .3s; }
.xg-hearts i.lost { opacity: .25; transform: scale(.75); filter: grayscale(1); }
.xg-prog { flex: 1; max-width: 420px; gap: 8px; }
.xg-track { position: relative; flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.xg-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffd54f, #ff7043); border-radius: 999px; }
.xg-prog { position: relative; }
.xg-pi { display: inline-block; }
.xg-pts b { color: #ffd54f; }
.xg-pause { pointer-events: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); font-size: 18px; cursor: pointer; }
.xg-pause:hover { background: #fff8e1; }

/* μηνύματα */
.xg-fx { position: absolute; inset: 0; pointer-events: none; }
.xg-pop { position: absolute; transform: translate(-50%, -50%); padding: 5px 14px; border-radius: 999px; font-size: 22px; font-weight: 900; color: #fff; white-space: nowrap; text-shadow: 0 2px 4px rgba(0,0,0,.4); background: rgba(10,14,50,.55); animation: xgPop 1.5s ease-out forwards; }
.xg-pop.ok { background: linear-gradient(#66bb6a, #2e7d32); }
.xg-pop.gold { background: linear-gradient(#ffd54f, #f57f17); font-size: 26px; }
.xg-pop.bad { background: linear-gradient(#ef5350, #b71c1c); }
.xg-pop.meh { background: rgba(84, 110, 122, .85); font-size: 18px; }
@keyframes xgPop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%); } }
.xg-banner { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); max-width: 80%; padding: 10px 20px; border-radius: 18px; background: rgba(255,255,255,.94); color: #1a237e; font-size: 20px; font-weight: 800; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); animation: xgBanner .4s ease-out; }
.xg-banner.warn { background: #fff3e0; color: #e65100; }
.xg-banner.big { font-size: 30px; color: #c62828; }
@keyframes xgBanner { from { opacity: 0; transform: translate(-50%, -16px); } }

/* κάρτες αρχής / παύσης / τέλους */
.xg-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(8, 10, 40, .35); }
.xg-over.on, .xg-over:not(:empty) { display: flex; }
.xg-card { width: min(560px, 90%); padding: 20px 26px; border-radius: 24px; background: rgba(255,255,255,.96); color: #263238; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.45); animation: xgBanner .4s ease-out; }
.xg-card.small { width: min(460px, 90%); }
.xg-card h2 { margin: 0 0 8px; color: #c62828; font-size: 26px; }
.xg-card p { margin: 0 0 12px; font-size: 17px; line-height: 1.35; }
.xg-keys { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0 10px; }
.xg-keys div { display: flex; gap: 4px; }
.xg-keys .xg-mouse { font-size: 38px; line-height: 1; margin-bottom: 4px; animation: xgMouse 2.4s ease-in-out infinite; }
@keyframes xgMouse { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-14px); } 60% { transform: translateX(14px) scale(.92); } }
.xg-keys kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 40px; padding: 0 8px; border-radius: 9px; background: linear-gradient(#ffffff, #e3e8f0); box-shadow: 0 3px 0 #9aa7b8, 0 4px 8px rgba(0,0,0,.2); font: 800 20px/1 inherit; color: #37474f; animation: xgKey 2.4s ease-in-out infinite; }
.xg-keys .k-sp { min-width: 210px; font-size: 16px; animation-delay: 1.2s; }
.xg-keys .k-up { animation-delay: .3s; } .xg-keys .k-r { animation-delay: .6s; } .xg-keys .k-dn { animation-delay: .9s; }
@keyframes xgKey { 0%, 30%, 100% { transform: translateY(0); background: linear-gradient(#ffffff, #e3e8f0); } 12% { transform: translateY(3px); background: linear-gradient(#fff3c4, #ffd54f); } }
.xg-help { margin: 0 0 12px; padding: 0; list-style: none; font-size: 15px; line-height: 1.5; color: #455a64; }
.xg-go { padding: 12px 30px; border: 0; border-radius: 16px; background: linear-gradient(#66bb6a, #2e7d32); color: #fff; font: inherit; font-size: 22px; font-weight: 900; cursor: pointer; box-shadow: 0 4px 12px rgba(46,125,50,.45); animation: xfReady 1s ease-in-out infinite alternate; }
.xg-go small { font-size: 14px; opacity: .85; }
@keyframes xfReady { to { transform: scale(1.04); } }

/* Θέμα Lite: χωρίς κινήσεις */
html.th-lite .xg-snow { display: none; }
html.th-lite .xg-wrap.shake, html.th-lite .xg-pop, html.th-lite .xg-banner, html.th-lite .xg-card, html.th-lite .xg-keys kbd, html.th-lite .xg-keys .xg-mouse, html.th-lite .xg-go { animation: none !important; }

/* Χιονοθύελλα (επίπεδα 8 και 10): πολύ χιόνι που πέφτει λοξά και γρήγορα */
.xg-wrap.storm .xg-snow i { opacity: .95; animation-name: xgStorm; }
@keyframes xgStorm { from { transform: translate(0, 0); } to { transform: translate(-260px, 105vh); } }
