/* ===== WINTER THEME - The Long Night ===== */
/* Deadly GoT winter. Cold, harsh, visible. */

/* ===== SNOW - two layers for depth ===== */
body.winter::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    background-image:
        radial-gradient(1.5px 1.5px at 10% 8%, rgba(220, 230, 240, 0.35), transparent),
        radial-gradient(1px 1px at 25% 18%, rgba(200, 215, 230, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 42% 5%, rgba(220, 230, 240, 0.28), transparent),
        radial-gradient(1px 1px at 58% 22%, rgba(200, 215, 230, 0.32), transparent),
        radial-gradient(2px 2px at 72% 12%, rgba(220, 230, 240, 0.25), transparent),
        radial-gradient(1px 1px at 88% 3%, rgba(200, 215, 230, 0.3), transparent),
        radial-gradient(1.5px 1.5px at 15% 35%, rgba(220, 230, 240, 0.22), transparent),
        radial-gradient(1px 1px at 48% 40%, rgba(200, 215, 230, 0.28), transparent),
        radial-gradient(1.5px 1.5px at 65% 30%, rgba(220, 230, 240, 0.25), transparent),
        radial-gradient(1px 1px at 82% 45%, rgba(200, 215, 230, 0.2), transparent),
        radial-gradient(1px 1px at 35% 55%, rgba(220, 230, 240, 0.18), transparent),
        radial-gradient(1.5px 1.5px at 55% 50%, rgba(200, 215, 230, 0.22), transparent);
    animation: snowfall-slow 18s linear infinite;
}

body.winter::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9998;
    background-image:
        radial-gradient(1px 1px at 18% 12%, rgba(200, 215, 230, 0.25), transparent),
        radial-gradient(1.5px 1.5px at 38% 8%, rgba(220, 230, 240, 0.2), transparent),
        radial-gradient(1px 1px at 52% 28%, rgba(200, 215, 230, 0.22), transparent),
        radial-gradient(1px 1px at 78% 18%, rgba(220, 230, 240, 0.18), transparent),
        radial-gradient(1.5px 1.5px at 92% 32%, rgba(200, 215, 230, 0.2), transparent),
        radial-gradient(1px 1px at 8% 48%, rgba(220, 230, 240, 0.15), transparent),
        radial-gradient(1px 1px at 45% 62%, rgba(200, 215, 230, 0.18), transparent),
        radial-gradient(1px 1px at 68% 55%, rgba(220, 230, 240, 0.15), transparent),
        radial-gradient(1px 1px at 28% 75%, rgba(200, 215, 230, 0.12), transparent),
        radial-gradient(1px 1px at 85% 68%, rgba(220, 230, 240, 0.14), transparent);
    animation: snowfall-fast 12s linear infinite;
}

@keyframes snowfall-slow {
    0%   { transform: translateY(-5vh) translateX(0); }
    25%  { transform: translateY(22vh) translateX(6px); }
    50%  { transform: translateY(50vh) translateX(-4px); }
    75%  { transform: translateY(75vh) translateX(8px); }
    100% { transform: translateY(105vh) translateX(2px); }
}

@keyframes snowfall-fast {
    0%   { transform: translateY(-8vh) translateX(0); }
    25%  { transform: translateY(20vh) translateX(-5px); }
    50%  { transform: translateY(52vh) translateX(7px); }
    75%  { transform: translateY(78vh) translateX(-3px); }
    100% { transform: translateY(108vh) translateX(4px); }
}

/* ===== FROST MIST at bottom ===== */
.app-container::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25vh;
    pointer-events: none;
    z-index: 9997;
    background: linear-gradient(to top,
        rgba(107, 136, 148, 0.05),
        transparent
    );
}

/* ===== HEADER - cold shimmer ===== */
body.winter .game-header {
    border-color: rgba(var(--accent-rgb), 0.18);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

body.winter .game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--accent-rgb), 0.04),
        transparent
    );
    animation: header-shimmer 8s ease-in-out infinite;
}

@keyframes header-shimmer {
    0% { left: -50%; }
    50% { left: 100%; }
    100% { left: -50%; }
}

body.winter .logo-icon {
    filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.2));
}

body.winter .header-year,
body.winter .header-season {
    border-color: rgba(var(--accent-rgb), 0.18);
    background: rgba(var(--accent-rgb), 0.05);
}

body.winter .header-btn:hover {
    background: rgba(var(--accent-rgb), 0.08);
}

/* ===== ICE EDGE - header frost line ===== */
body.winter .game-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(var(--accent-rgb), 0.15),
        rgba(var(--accent-rgb), 0.25),
        rgba(var(--accent-rgb), 0.15),
        transparent
    );
    z-index: 1;
}

/* ===== CARDS ===== */
body.winter .card {
    border-color: rgba(var(--accent-rgb), 0.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

body.winter .card:hover {
    border-color: rgba(var(--accent-rgb), 0.22);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.35),
                0 0 20px rgba(var(--accent-rgb), 0.04);
}

body.winter .card-header {
    border-right-color: rgba(var(--accent-rgb), 0.35);
}

/* ===== STATUS BAR ===== */
body.winter .status-bar-new {
    border-color: rgba(var(--accent-rgb), 0.12);
}

body.winter .status-item:hover {
    background: rgba(var(--accent-rgb), 0.06);
}

/* ===== NAVIGATION ===== */
body.winter .bottom-nav {
    border-color: rgba(var(--accent-rgb), 0.1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
}

body.winter .nav-btn.active {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
}

body.winter .nav-btn:hover:not(.active) {
    color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
}

/* ===== MODALS ===== */
body.winter .modal-container {
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

body.winter .modal-container h3 {
    border-right-color: rgba(var(--accent-rgb), 0.3);
}

/* ===== BUTTONS ===== */
body.winter .btn-secondary {
    border-color: rgba(var(--accent-rgb), 0.25);
    background: rgba(var(--accent-rgb), 0.08);
}

body.winter .btn:hover {
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.12);
}

/* ===== INPUTS ===== */
body.winter input:focus,
body.winter select:focus,
body.winter textarea:focus {
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.1);
}

/* ===== TABLES ===== */
body.winter th {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent);
    border-bottom-color: rgba(var(--accent-rgb), 0.15);
}

body.winter tr:hover td {
    background: rgba(var(--accent-rgb), 0.03);
}

/* ===== TOGGLE ===== */
body.winter .toggle-switch span:first-child {
    background-color: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
}

/* ===== SCROLLBAR ===== */
body.winter ::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.2);
}

body.winter ::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-rgb), 0.3);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    body.winter::before,
    body.winter::after {
        animation: none;
    }
    body.winter .game-header::before {
        animation: none;
    }
}
