/* === 🎄 ЗИМНЯЯ ТЕМА NEWWONT v2 === */
:root {
  --winter-snow: #e8f4ff;
  --winter-ice: #a8d5ff;
  --winter-blue: #60a5fa;
  --winter-deep: #1e3a8a;
  --winter-glow: rgba(150, 200, 255, 0.6);
}

/* ====== ГИРЛЯНДА НА ШАПКЕ ====== */
.nwx-header-inner { position: relative; }
.nwx-header-inner::after {
  content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 6px;
  background-image:
    radial-gradient(circle at 10px 3px, #fff 2px, transparent 3px),
    radial-gradient(circle at 30px 3px, #ef4444 2px, transparent 3px),
    radial-gradient(circle at 50px 3px, #22c55e 2px, transparent 3px);
  background-size: 60px 6px;
  animation: nwx-garland 2s linear infinite;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.8));
  pointer-events: none;
}
@keyframes nwx-garland { 0% { background-position: 0px 0; } 100% { background-position: 60px 0; } }

/* Колпак на лого */
.nwx-logo-mark { position: relative; overflow: visible !important; }
.nwx-logo-mark::after {
  content: '🎅'; position: absolute; top: -15px; right: -10px; font-size: 22px;
  transform: rotate(20deg); z-index: 2; animation: nwx-bounce 2s infinite;
  pointer-events: none;
}
@keyframes nwx-bounce {
  0%,100% { transform: translateY(0) rotate(20deg); }
  50% { transform: translateY(-4px) rotate(20deg); }
}

/* ====== ГИРЛЯНДА ПРИ HOVER НА ВСЕХ КАРТОЧКАХ ====== */
.winter-frost .card:hover::before,
.winter-frost .nwx-hcard:hover::before,
.winter-frost .nwx-game-card:hover::before,
.winter-frost .sv-card:hover::before,
.winter-frost .listing-card:hover::before,
.winter-frost .mode-card:hover::before,
.winter-frost .hp-feat:hover::before,
.winter-frost .cn-card:hover::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
  background-image:
    radial-gradient(circle at 4px 1.5px, #fff 1.5px, transparent 2px),
    radial-gradient(circle at 14px 1.5px, #ef4444 1.5px, transparent 2px),
    radial-gradient(circle at 24px 1.5px, #22c55e 1.5px, transparent 2px),
    radial-gradient(circle at 34px 1.5px, #fbbf24 1.5px, transparent 2px);
  background-size: 40px 3px;
  animation: nwx-garland-hover 1s linear infinite;
  z-index: 10; border-radius: inherit; pointer-events: none;
}
@keyframes nwx-garland-hover {
  0% { background-position: 0 0; } 100% { background-position: 40px 0; }
}

/* ====== МОРОЗНЫЕ РАМКИ ====== */
.winter-frost .card,
.winter-frost .nwx-hcard,
.winter-frost .nwx-game-card,
.winter-frost .sv-card,
.winter-frost .listing-card,
.winter-frost .mode-card,
.winter-frost .hp-feat {
  position: relative;
  border-color: rgba(150, 200, 255, 0.2) !important;
}

/* ====== КУРСОР-СНЕЖИНКИ ====== */
.winter-cursor-flake {
  position: fixed; pointer-events: none; z-index: 99998;
  color: #fff; text-shadow: 0 0 10px rgba(150,200,255,0.8);
  animation: cursor-fall 1.2s linear forwards; will-change: transform, opacity;
}
@keyframes cursor-fall {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx,0px), var(--dy,40px)) rotate(360deg); opacity: 0; }
}

/* ====== БАННЕР ====== */
.winter-banner {
  background: linear-gradient(90deg, #1e3a8a, #3b82f6, #1e3a8a);
  background-size: 200% auto;
  color: #fff; text-align: center; padding: 10px 50px 10px 20px;
  font-size: 13px; font-weight: 600; position: relative; z-index: 1000;
  animation: banner-shine 4s linear infinite;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
}
@keyframes banner-shine { to { background-position: 200% center; } }
.winter-banner-text b {
  background: linear-gradient(90deg, #fff, #fcd34d, #fff);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: banner-shine 3s linear infinite; font-weight: 900;
}
.winter-banner-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 14px; line-height: 1; transition: 0.2s;
  font-family: inherit;
}
.winter-banner-close:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }

/* ====== ЁЛКА / СЧЁТЧИК / СНЕГОВИК ====== */
.winter-tree {
  position: fixed; bottom: 20px; right: 20px; font-size: 48px; z-index: 9997;
  cursor: pointer; filter: drop-shadow(0 4px 15px rgba(34,197,94,0.5));
  transition: transform 0.3s; user-select: none;
  animation: tree-bob 2.5s ease-in-out infinite;
}
.winter-tree:hover { transform: scale(1.15) rotate(-5deg); }
@keyframes tree-bob { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-6px);} }
.winter-tree::after {
  content: '🎁'; position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%); font-size: 20px;
  animation: tree-bob 2.5s ease-in-out infinite; animation-delay: 0.3s;
}

.winter-counter {
  position: fixed; bottom: 20px; left: 20px;
  background: linear-gradient(135deg, rgba(30,58,138,0.92), rgba(59,130,246,0.92));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(150,200,255,0.3); border-radius: 14px;
  padding: 12px 18px; color: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  z-index: 9997; box-shadow: 0 8px 25px rgba(59,130,246,0.3);
  display: flex; align-items: center; gap: 10px; transition: transform 0.3s;
}
.winter-counter:hover { transform: scale(1.05); }
.winter-counter-icon { font-size: 22px; }
.winter-counter-label { font-size: 9px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.winter-counter-val { font-size: 14px; font-weight: 900; color: #fcd34d; }

.winter-snowman {
  position: fixed; bottom: 90px; right: 20px; width: 60px; height: 60px;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, #fff, #e0ecf7);
  box-shadow: 0 8px 25px rgba(150,200,255,0.5), inset -5px -5px 10px rgba(150,200,255,0.3);
  z-index: 9996; cursor: pointer; display: grid; place-items: center;
  font-size: 30px; transition: all 0.3s;
  animation: snowman-wave 3s ease-in-out infinite;
}
.winter-snowman:hover { transform: scale(1.1); }
@keyframes snowman-wave {
  0%,100%{transform:rotate(0);} 25%{transform:rotate(-8deg);} 75%{transform:rotate(8deg);}
}
.winter-snowman-tooltip {
  position: fixed; bottom: 95px; right: 90px;
  background: #1e3a8a; color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600; white-space: nowrap; z-index: 9995;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); opacity: 0; transform: translateX(10px);
  transition: all 0.3s; pointer-events: none; line-height: 1.5;
}
.winter-snowman:hover + .winter-snowman-tooltip { opacity: 1; transform: translateX(0); }

.winter-floating-ornaments { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.winter-ornament {
  position: absolute; opacity: 0.4; animation: ornament-float linear infinite;
  filter: drop-shadow(0 2px 8px rgba(255,255,255,0.3)); will-change: transform;
}
@keyframes ornament-float {
  0%   { transform: translateY(110vh) rotate(0); }
  100% { transform: translateY(-10vh) rotate(360deg); }
}

.winter-click-flake {
  position: fixed; pointer-events: none; z-index: 99999;
  font-size: 20px; color: #fff; text-shadow: 0 0 15px rgba(150,200,255,1);
  animation: click-flake 1.5s ease-out forwards;
  will-change: transform, opacity;
}
@keyframes click-flake {
  0%   { transform: translate(-50%,-50%) scale(0) rotate(0); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx,0px)), calc(-50% + var(--dy,-100px))) scale(1.5) rotate(180deg); opacity: 0; }
}

.winter-frost .nwx-badge,
.winter-frost .nwx-game-badge { animation: badge-pulse 2s ease-in-out infinite; }
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0 5px currentColor; }
  50%     { box-shadow: 0 0 15px currentColor; }
}

.winter-snow-canvas {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 99990;
}

@media (max-width: 600px) {
  .winter-counter { bottom: 12px; left: 12px; padding: 8px 12px; font-size: 10px; }
  .winter-counter-icon { font-size: 16px; }
  .winter-counter-val { font-size: 11px; }
  .winter-tree { font-size: 38px; bottom: 12px; right: 12px; }
  .winter-snowman { width: 50px; height: 50px; font-size: 24px; bottom: 70px; right: 12px; }
  .winter-snowman-tooltip { display: none; }
  .winter-banner { font-size: 11px; padding: 8px 40px 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .winter-ornament, .winter-tree, .winter-tree::after, .winter-snowman,
  .winter-banner, .winter-banner-text b, .winter-frost .nwx-badge,
  .nwx-header-inner::after, .nwx-logo-mark::after { animation: none !important; }
}