:root {
    --holiday-pink: #f54291;
    --holiday-gold: #f9b237;
    --holiday-forest: #0d3b2e;
    --holiday-ice: #e7f6ff;
    --holiday-berry: #b91c1c;
    --holiday-midnight: #0c1f3f;
    --holiday-snow: #f8fbff;
    --holiday-mint: #7bdcb5;
}

body.holiday-mode--seasonal {
    background-color: #ffffff;
}

body.holiday-mode--active .top-nav,
body.holiday-mode--active .nav-group {
    position: relative;
}

body.holiday-mode--active .top-nav::after,
body.holiday-mode--active .nav-group::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245,66,145,0.35), rgba(249,178,55,0.35));
    z-index: -1;
}

body.holiday-mode--active {
    background-color: var(--holiday-snow);
}

body.holiday-mode--active .tile,
body.holiday-mode--active .section,
body.holiday-mode--active .bot-card,
body.holiday-mode--active .subscription-status-banner {
    border: 1px solid rgba(12, 31, 63, 0.08);
    box-shadow: 0 12px 28px rgba(12, 31, 63, 0.18);
    position: relative;
}

body.holiday-mode--active .btn,
body.holiday-mode--active .nav-button,
body.holiday-mode--active .nav-link {
    background-color: var(--holiday-midnight);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

body.holiday-mode--active .btn::after,
body.holiday-mode--active .nav-button::after,
body.holiday-mode--active .nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 45%, transparent 90%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

body.holiday-mode--active .btn:hover::after,
body.holiday-mode--active .nav-button:hover::after,
body.holiday-mode--active .nav-link:hover::after {
    transform: translateX(110%);
}

body.holiday-mode--active .btn:hover,
body.holiday-mode--active .nav-button:hover,
body.holiday-mode--active .nav-link:hover {
    filter: brightness(1.08);
}

body.holiday-mode--active .nav-button.gift-btn,
body.holiday-mode--active .nav-button.gift-btn .nav-icon {
    color: #1f4ed8;
}

body.holiday-mode--active .nav-button.gift-btn {
    background: rgba(31, 78, 216, 0.12);
    border-color: rgba(31, 78, 216, 0.35);
}

body.holiday-mode--active .nav-button.gift-btn:hover {
    background: rgba(31, 78, 216, 0.22);
    border-color: rgba(31, 78, 216, 0.45);
    filter: none;
}

body.holiday-mode--active .mission-panel {
    border-color: rgba(185, 28, 28, 0.35);
    box-shadow: 0 15px 30px rgba(12, 31, 63, 0.28);
    position: relative;
    overflow: hidden;
}

body.holiday-mode--active .mission-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 10% 10%, rgba(255,255,255,0.8) 50%, transparent 50%),
        radial-gradient(2px 2px at 30% 25%, rgba(255,255,255,0.6) 50%, transparent 50%),
        radial-gradient(1px 1px at 50% 15%, rgba(255,255,255,0.7) 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 30%, rgba(255,255,255,0.5) 50%, transparent 50%),
        radial-gradient(1px 1px at 90% 20%, rgba(255,255,255,0.6) 50%, transparent 50%),
        radial-gradient(2px 2px at 20% 60%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.5) 50%, transparent 50%),
        radial-gradient(2px 2px at 60% 55%, rgba(255,255,255,0.6) 50%, transparent 50%),
        radial-gradient(1px 1px at 80% 65%, rgba(255,255,255,0.4) 50%, transparent 50%),
        radial-gradient(2px 2px at 15% 85%, rgba(255,255,255,0.5) 50%, transparent 50%),
        radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.6) 50%, transparent 50%),
        radial-gradient(2px 2px at 75% 80%, rgba(255,255,255,0.4) 50%, transparent 50%);
    background-size: 100% 200%;
    animation: mission-snow-fall 8s linear infinite;
    opacity: 0.7;
    z-index: 0;
}

body.holiday-mode--active .mission-panel > * {
    position: relative;
    z-index: 1;
}

@keyframes mission-snow-fall {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 100%;
    }
}

body.holiday-mode--active .holiday-elf-corner::after {
    content: '🧝‍♀️';
    position: absolute;
    top: -12px;
    right: -8px;
    font-size: 1.5rem;
}

.holiday-snow-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 600;
    mix-blend-mode: normal;
    opacity: 1;
}

body.holiday-mode--active .btn::after,
body.holiday-mode--active .nav-button::after,
body.holiday-mode--active .nav-link::after {
    display: none;
}

.holiday-snow-fallback::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0, transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(255,255,255,0.05) 0, transparent 50%);
    z-index: 90;
}

.holiday-snow.gift-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 600;
    mix-blend-mode: normal;
    opacity: 0.9;
}

/* Login-specific cheer */
.holiday-login .login-logo {
    position: relative;
    display: inline-block;
}

.holiday-login .login-logo img {
    display: block;
    width: 100%;
    max-width: 280px;
}

.holiday-login .login-logo img.login-logo__image--holiday {
    display: none;
}

body.holiday-login.holiday-mode--active .login-logo img.login-logo__image--holiday {
    display: block;
}

body.holiday-login.holiday-mode--active .login-logo img.login-logo__image--base {
    display: none;
}

.holiday-login .login-logo__hat {
    position: absolute;
    width: 120px;
    top: -30px;
    right: -40px;
    transform: rotate(15deg);
    display: none;
}

body.holiday-login.holiday-mode--active .login-logo__hat {
    display: block;
}

body.holiday-login.holiday-mode--active #login-container {
    border: 2px solid rgba(245, 66, 145, 0.35);
    box-shadow: 0 10px 28px rgba(15, 26, 74, 0.1);
}

body.holiday-login #login-container {
    transition: box-shadow 0.2s ease, border 0.2s ease;
}

.login-snow-layer {
    pointer-events: none;
}

/* Holiday specific dashboard flourishes */
body.holiday-mode--active .bot-card,
body.holiday-mode--active .tile {
    position: relative;
    /* overflow: hidden; Removed to allow icons to pop out */
    transition: all 0.2s ease;
}

/* Base styles for the Primary Icon (::before) */
body.holiday-mode--active .bot-card::before,
body.holiday-mode--active .tile::before {
    /* Content is set by nth-child rules below */
    position: absolute;
    font-size: 2rem;
    opacity: 0.25;
    transform: rotate(15deg);
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    z-index: 0;
    transition: all 0.3s ease;
}

/* Bot Card: Primary Icon at Top Right */
body.holiday-mode--active .bot-card::before {
    top: -8px;
    right: -8px;
}

/* Tile: Primary Icon at Bottom Right (to avoid Expand icon at Top Right) */
body.holiday-mode--active .tile::before {
    bottom: -8px;
    right: -8px;
    top: auto;
}

/* Hover States for Primary Icon */
body.holiday-mode--active .bot-card:hover::before {
    opacity: 0.95;
    top: -4px;
    right: -4px;
    transform: rotate(0deg) scale(1.1);
}

body.holiday-mode--active .tile:hover::before {
    opacity: 0.95;
    bottom: -4px;
    right: -4px;
    transform: rotate(0deg) scale(1.1);
}

/* Festive Border/Glow on Hover */
body.holiday-mode--active .bot-card:hover,
body.holiday-mode--active .tile:hover {
    border-color: rgba(245, 66, 145, 0.35); /* Holiday Pink */
    box-shadow: 0 15px 35px rgba(12, 31, 63, 0.25);
}

/* Vary the icons based on nth-child for variety */
/* TOP RIGHT ROTATION: Santa, Tree, Gift, Elf */
body.holiday-mode--active .bot-card:nth-child(4n+1)::before,
body.holiday-mode--active .tile:nth-child(4n+1)::before {
    content: '🎅'; /* Santa */
}

body.holiday-mode--active .bot-card:nth-child(4n+2)::before,
body.holiday-mode--active .tile:nth-child(4n+2)::before {
    content: '🎄'; /* Tree */
}

body.holiday-mode--active .bot-card:nth-child(4n+3)::before,
body.holiday-mode--active .tile:nth-child(4n+3)::before {
    content: '🎁'; /* Gift */
}

body.holiday-mode--active .bot-card:nth-child(4n+4)::before,
body.holiday-mode--active .tile:nth-child(4n+4)::before {
    content: '🧝'; /* Elf */
}

/* Add a second decoration to bottom-left for extra cheer (BOT CARDS ONLY) */
/* Tiles use ::after for expand icon, so we skip them here */
body.holiday-mode--active .bot-card::after {
    content: '❄️';
    position: absolute;
    bottom: -8px;
    left: -8px;
    font-size: 1.5rem;
    opacity: 0.15;
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

body.holiday-mode--active .bot-card:hover::after {
    opacity: 0.7;
    bottom: -2px;
    left: -2px;
    transform: rotate(0deg) scale(1.1);
}

/* BOTTOM LEFT ROTATION: Snowflake, Bell, Snowman, Reindeer */
body.holiday-mode--active .bot-card:nth-child(4n+1)::after {
    content: '❄️'; /* Snowflake */
}

body.holiday-mode--active .bot-card:nth-child(4n+2)::after {
    content: '🔔'; /* Bell */
}

body.holiday-mode--active .bot-card:nth-child(4n+3)::after {
    content: '⛄'; /* Snowman */
}

body.holiday-mode--active .bot-card:nth-child(4n+4)::after {
    content: '🦌'; /* Reindeer */
}

/* Ensure content sits above decorations */
body.holiday-mode--active .bot-card > *,
body.holiday-mode--active .tile > * {
    position: relative;
    z-index: 1;
}


.holiday-banner {
    display: none;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(120deg, #0c1f3f 0%, #b91c1c 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(12, 31, 63, 0.35);
    border: 1px solid rgba(255,255,255,0.18);
    margin-bottom: 1.5rem;
    justify-content: space-between;
}

.holiday-banner__content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.holiday-banner__emoji {
    font-size: 1.75rem;
}

.holiday-banner__dismiss {
    border: none;
    background-color: rgba(13, 26, 74, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #fff;
    font-size: 1.25rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gift-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
    z-index: 10000;
    pointer-events: auto;
}

.holiday-banner[hidden] {
    display: none;
}

body.holiday-mode--active .holiday-banner {
    display: flex;
}

.holiday-tagline {
    display: none;
    color: var(--holiday-midnight);
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

body.holiday-mode--active .holiday-tagline {
    display: block;
}

.holiday-footer-ornament {
    position: fixed;
    bottom: 18px;
    right: 18px;
    width: 160px;
    height: 160px;
    pointer-events: none;
    display: none;
}

.holiday-footer-ornament__gift {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), transparent 60%), linear-gradient(135deg, #0c1f3f, #173f77);
    border-radius: 20% 20% 10% 10%;
    position: relative;
    box-shadow: 0 15px 30px rgba(12,31,63,0.35);
}

.holiday-footer-ornament__gift::before,
.holiday-footer-ornament__gift::after {
    content: '';
    position: absolute;
    background: #f9b237;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.holiday-footer-ornament__gift::before {
    width: 18px;
    height: 100%;
}

.holiday-footer-ornament__gift::after {
    width: 80%;
    height: 14px;
    top: 40%;
    border-radius: 999px;
}

.holiday-footer-ornament p {
    margin: 0.5rem 0 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--holiday-midnight);
}

body.holiday-mode--active .holiday-footer-ornament {
    display: block;
}

.holiday-loading-message {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--holiday-midnight);
}

.holiday-loading-message::before {
    content: '🎁';
    margin-right: 0.5rem;
}

body:not(.holiday-mode--active) .holiday-loading-message {
    color: var(--holiday-forest);
}

body.holiday-mode--active .holiday-mode-hint {
    opacity: 1;
}

.holiday-mode-hint {
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.holiday-mode--active .holiday-create-cta {
    background: var(--holiday-berry);
    color: #fff;
}

body.holiday-mode--active .holiday-create-cta::after {
    content: '✨';
    margin-left: 0.35rem;
}
