/**
 * FURSONA STUDIO - WINTER & HOLIDAYS PROTOCOL (ŚWIĘTA)
 * Festive snowflakes, frost aura, and cozy winter aesthetics for Rain City
 */

/* Header Theme Toggle Pill */
.header-theme-pill {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #38bdf8;
    padding: 6px 12px;
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .header-theme-pill {
        padding: 4px 8px !important;
        min-width: 32px !important;
        height: 32px !important;
        justify-content: center !important;
        border-radius: 8px !important;
        font-size: 1rem !important;
        gap: 0 !important;
    }
    .header-theme-pill #theme-pill-label {
        display: none !important;
    }
}

.header-theme-pill:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: #38bdf8;
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

.header-theme-pill:active {
    transform: scale(0.96);
}

/* ==========================================================================
   WINTER THEME PALETTE & VISUAL OVERRIDES
   ========================================================================== */
body.theme-winter {
    --bg-main: #060b19;
    --bg-secondary: #091326;
    --card-bg: rgba(11, 23, 46, 0.84);
    --card-hover: rgba(16, 32, 62, 0.94);
    --accent: #38bdf8;
    --accent-hover: #0284c7;
    --accent-sky: #7dd3fc;
    --accent-cyan: #38bdf8;
    --accent-bright: #e0f2fe;
    --accent-glow: rgba(56, 189, 248, 0.45);
    --accent-dim: rgba(56, 189, 248, 0.15);
    --border-color: rgba(56, 189, 248, 0.25);
    --border-hover: rgba(125, 211, 252, 0.6);
}

/* Header Glassmorphism in Winter Mode */
body.theme-winter .studio-header {
    background: rgba(6, 11, 25, 0.90) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.28) !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(2, 132, 199, 0.15);
}

/* Brand Title & Badge */
body.theme-winter .app-brand h1 {
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.6), 0 0 32px rgba(165, 243, 252, 0.4);
}

body.theme-winter .app-brand-badge {
    background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.55) !important;
    border: 1px solid rgba(224, 242, 254, 0.5) !important;
}

/* Primary Action Buttons */
body.theme-winter .btn-generate-main {
    background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(186, 230, 253, 0.5) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.theme-winter .btn-generate-main:hover {
    box-shadow: 0 6px 28px rgba(56, 189, 248, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-2px);
}

/* Active Nav Segment Pill */
body.theme-winter .nav-segment-btn.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.4), rgba(56, 189, 248, 0.25)) !important;
    border-color: #38bdf8 !important;
    color: #e0f2fe !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
}

/* Active Character Card Glow */
body.theme-winter .char-roster-pill.active {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45) !important;
}

/* Falling Snow Canvas Overlay */
#winter-snow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999990;
    opacity: 0.9;
}

/* Frost Vignette */
body.theme-winter::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 999980;
    background: radial-gradient(circle at 50% 50%, transparent 62%, rgba(56, 189, 248, 0.07) 100%);
    box-shadow: inset 0 0 90px rgba(56, 189, 248, 0.14);
}

/* Winter Easter Egg Sparkles */
.winter-sparkle {
    position: fixed;
    pointer-events: none;
    font-size: 18px;
    z-index: 999999;
    animation: winterSparkleFloat 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes winterSparkleFloat {
    0% { transform: translateY(0) scale(0.6); opacity: 1; }
    50% { transform: translateY(-28px) scale(1.25); opacity: 0.95; }
    100% { transform: translateY(-55px) scale(0.4); opacity: 0; }
}

/* Festive Santa Hat on Brand Logo */
body.theme-winter .app-brand-logo-wrap::after {
    content: '🎅';
    position: absolute;
    top: -11px;
    right: -9px;
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
    animation: santaHatBounce 3s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes santaHatBounce {
    0% { transform: rotate(-5deg) scale(1); }
    100% { transform: rotate(5deg) scale(1.08); }
}
