/* Winter and Christmas seasonal theming */
:root {
    --snowflake-size: 12px;
}

.winter-snowfall,
.christmas-lights,
.winter-banner,
.christmas-banner {
    display: none;
}

body.winter-theme,
body.christmas-theme {
    min-height: 100vh;
    background-attachment: fixed;
}

body.winter-theme {
    --winter-text-dark: #0f172a;
    --winter-text-light: #e8f4ff;
    --winter-link: #0ea5e9;
    --winter-link-strong: #0284c7;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.6), transparent 35%),
        radial-gradient(circle at 70% 15%, rgba(207, 233, 255, 0.35), transparent 45%),
        linear-gradient(180deg, #0b1b2b 0%, #0f2f4f 45%, #1b3550 100%);
    color: var(--winter-text-light);
}

body.winter-theme a {
    color: var(--winter-link);
    font-weight: 600;
}

body.winter-theme a:hover,
body.winter-theme a:focus {
    color: var(--winter-link-strong);
    text-decoration: underline;
}

body.winter-theme .navbar,
body.winter-theme .navbar a,
body.winter-theme .navbar .dropdown-content,
body.winter-theme .navbar .menu {
    color: var(--winter-text-light);
}

body.winter-theme .navbar {
    background: linear-gradient(90deg, rgba(7, 22, 40, 0.92), rgba(16, 39, 68, 0.92));
    border-bottom: 1px solid rgba(232, 244, 255, 0.18);
    box-shadow: 0 8px 24px rgba(9, 18, 30, 0.35);
}

body.winter-theme .navbar .menu a,
body.winter-theme .navbar summary {
    color: #e8f4ff;
}

body.winter-theme .navbar .menu a.bg-base-300,
body.winter-theme .navbar summary.bg-base-300 {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fbff;
}

body.winter-theme .navbar .menu a:hover,
body.winter-theme .navbar summary:hover,
body.winter-theme .navbar .menu a:focus,
body.winter-theme .navbar summary:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

body.winter-theme .navbar .dropdown-content,
body.winter-theme .menu.menu-sm.dropdown-content,
body.winter-theme .navbar .dropdown .dropdown-content {
    background: rgba(10, 24, 44, 0.96);
    border: 1px solid rgba(232, 244, 255, 0.18);
    color: #e8f4ff;
    box-shadow: 0 10px 28px rgba(9, 18, 30, 0.5);
}

body.winter-theme .navbar .dropdown-content a,
body.winter-theme .navbar .dropdown-content summary {
    color: #e8f4ff;
}

body.winter-theme .navbar .dropdown-content a:hover,
body.winter-theme .navbar .dropdown-content summary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

body.winter-theme .navbar .dropdown-content,
body.winter-theme .dropdown-content,
body.winter-theme .menu,
body.winter-theme .card,
body.winter-theme .modal-box,
body.winter-theme .bg-base-100,
body.winter-theme .bg-base-200,
body.winter-theme .bg-base-300 {
    color: var(--winter-text-dark);
}

body.winter-theme .navbar a:hover,
body.winter-theme .navbar a:focus {
    color: #ffffff;
}

body.winter-theme .btn:not(.btn-ghost):not(.btn-outline):not(.btn-link) {
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

body.winter-theme .btn:not(.btn-ghost):not(.btn-outline):not(.btn-link):hover,
body.winter-theme .btn:not(.btn-ghost):not(.btn-outline):not(.btn-link):focus {
    color: #ffffff;
}

body.winter-theme .btn[data-original-color],
body.winter-theme .btn[data-bright-color] {
    color: #f8fafc;
}

body.winter-theme .bg-primary,
body.winter-theme .bg-secondary,
body.winter-theme .bg-neutral,
body.winter-theme .bg-slate-800,
body.winter-theme .bg-slate-900,
body.winter-theme .bg-black,
body.winter-theme .hero,
body.winter-theme .hero-content {
    color: var(--winter-text-light);
}

body.winter-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 40%),
        radial-gradient(circle at 80% 25%, rgba(160, 210, 255, 0.08), transparent 45%),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.06), transparent 55%);
    z-index: -1;
}

body.winter-theme .winter-snowfall,
body.winter-theme .winter-banner {
    display: flex;
}

body.winter-theme .christmas-lights {
    display: none;
}

body.winter-theme .hero-carousel-shell {
    background: linear-gradient(135deg, rgba(26, 54, 92, 0.9), rgba(13, 36, 63, 0.92));
    border-color: rgba(191, 219, 254, 0.4);
    box-shadow: 0 15px 40px rgba(9, 18, 30, 0.55);
}

body.winter-theme .table-standard {
    color: #e8f4ff;
    background: rgba(7, 22, 40, 0.35);
    border-radius: 0.75rem;
    overflow: hidden;
}

body.winter-theme .table-standard thead th {
    background: rgba(255, 255, 255, 0.08);
    color: #f3fbff;
    border-bottom: 1px solid rgba(232, 244, 255, 0.28);
}

body.winter-theme .table-standard tbody tr {
    background: rgba(6, 18, 32, 0.45);
    border-bottom: 1px solid rgba(232, 244, 255, 0.14);
}

body.winter-theme .table-standard tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.winter-theme .table-standard td,
body.winter-theme .table-standard th {
    color: #e8f4ff;
}

body.winter-theme .dataTables_wrapper,
body.winter-theme table,
body.winter-theme table.dataTable,
body.winter-theme table.dataTable td,
body.winter-theme table.dataTable th {
    color: var(--winter-text-light);
    background: rgba(6, 18, 32, 0.45);
}

body.winter-theme .input,
body.winter-theme .select,
body.winter-theme input,
body.winter-theme select,
body.winter-theme textarea {
    background-color: rgba(255, 255, 255, 0.92);
    color: var(--winter-text-dark);
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

body.winter-theme input::placeholder,
body.winter-theme select::placeholder,
body.winter-theme textarea::placeholder,
body.winter-theme .input::placeholder,
body.winter-theme .select::placeholder {
    color: #334155 !important;
    opacity: 0.9;
}

body.winter-theme option {
    color: var(--winter-text-dark);
    background-color: #f8fafc;
}

body.winter-theme table.dataTable thead th,
body.winter-theme .dataTables_wrapper .dataTables_scrollHead th,
body.winter-theme .dataTables_wrapper .dataTables_scrollHead td {
    background: rgba(7, 22, 40, 0.92);
    color: #e8f4ff;
    border-bottom: 1px solid rgba(232, 244, 255, 0.18);
}

body.winter-theme table.dataTable thead tr {
    background: rgba(7, 22, 40, 0.92);
}

body.winter-theme .dataTables_wrapper .dataTables_length,
body.winter-theme .dataTables_wrapper .dataTables_filter,
body.winter-theme .dataTables_wrapper .dataTables_info {
    color: #e8f4ff;
}

body.winter-theme .list-group-item {
    color: var(--winter-text-dark);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
}

body.winter-theme .list-group-item:nth-child(even) {
    background: rgba(232, 244, 255, 0.9);
}

body.winter-theme .list-group-item .badge {
    color: var(--winter-text-dark);
}

body.winter-theme .progress-stat {
    background-color: rgba(255, 255, 255, 0.14);
}

body.winter-theme .progress-stat-bar {
    background: linear-gradient(90deg, #7dd3fc, #38bdf8);
}

body.winter-theme .seasonal-season-banner {
    color: #e6f6ff;
}

body.winter-theme .season-banner__content span {
    color: #e6f6ff;
    text-shadow: 0 2px 8px rgba(9, 18, 30, 0.4);
}

.winter-snowfall {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 30;
    overflow: hidden;
    justify-content: center;
    gap: 1rem;
}

.winter-snowfall span {
    width: var(--snowflake-size);
    height: var(--snowflake-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border-radius: 0;
    color: #bde5ff;
    filter: drop-shadow(0 0 12px rgba(189, 229, 255, 0.45));
    animation: snowfall 12s linear infinite;
    opacity: 0.9;
}

.winter-snowfall span::after {
    content: "❄";
    font-size: calc(var(--snowflake-size) * 0.9);
    line-height: 1;
    opacity: 0.95;
}

.winter-snowfall span:nth-child(odd) {
    animation-duration: 14s;
    width: calc(var(--snowflake-size) * 0.8);
    height: calc(var(--snowflake-size) * 0.8);
    opacity: 0.75;
}

.winter-snowfall span:nth-child(3n) {
    animation-duration: 10s;
    width: calc(var(--snowflake-size) * 1.2);
    height: calc(var(--snowflake-size) * 1.2);
    opacity: 1;
}

.winter-snowfall span:nth-child(3n)::after {
    content: "❆";
}

.winter-snowfall span:nth-child(4n)::after {
    content: "✻";
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, -10%, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(0, 110vh, 0) rotate(360deg);
    }
}

.winter-banner,
.christmas-banner {
    background: linear-gradient(90deg, rgba(29, 53, 87, 0.95), rgba(41, 92, 135, 0.95));
    color: #e6f6ff;
    border-bottom: 2px solid rgba(173, 216, 230, 0.6);
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(9, 18, 30, 0.3);
    display: none;
}

.winter-banner::before,
.winter-banner::after {
    font-size: 1.5rem;
    animation: seasonal-bounce 5s ease-in-out infinite;
}

.winter-banner::before {
    content: "❄️";
}

.winter-banner::after {
    content: "⛸️";
}

.winter-banner a {
    color: #dff2ff;
    text-decoration: underline;
}

.winter-banner a:hover,
.winter-banner a:focus {
    color: #b6e0ff;
}

body.christmas-theme {
    background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.4), transparent 35%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.3), transparent 40%),
        linear-gradient(180deg, #0f1f17 0%, #123123 45%, #0b1a13 100%);
    color: inherit;
}

body.christmas-theme .christmas-banner,
body.christmas-theme .christmas-lights,
html[data-theme="christmas"] .christmas-lights {
    display: flex;
}

html[data-theme]:not([data-theme="christmas"]) .christmas-lights {
    display: none;
}

.christmas-banner {
    background: linear-gradient(90deg, rgba(24, 63, 38, 0.95), rgba(116, 21, 32, 0.95));
    color: #fff7e6;
    border-bottom: 2px solid rgba(255, 215, 125, 0.6);
    align-items: center;
    min-height: 3.25rem;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 -2px 0 rgba(255, 215, 125, 0.4);
}

.christmas-banner::before,
.christmas-banner::after {
    font-size: 1.5rem;
    animation: seasonal-bounce 4s ease-in-out infinite;
}

.christmas-banner::before {
    content: "🎄";
}

.christmas-banner::after {
    content: "🎁";
}

.christmas-banner a {
    color: #ffe6a7;
    text-decoration: underline;
}

.christmas-banner a:hover,
.christmas-banner a:focus {
    color: #ffd166;
}

body.christmas-theme .christmas-lights {
    top: 5.25rem;
}

.christmas-lights {
    position: fixed;
    top: 5.5rem;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0 6vw;
    pointer-events: none;
    z-index: 40;
}

.christmas-lights__strand {
    display: flex;
    gap: 0.5rem;
}

.christmas-lights__gap {
    flex: 1 1 22rem;
    min-width: 12rem;
}

.christmas-lights span {
    width: 18px;
    height: 28px;
    border-radius: 50% 50% 45% 45%;
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
        #e63946;
    position: relative;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25), 0 8px 12px rgba(0, 0, 0, 0.25);
    animation: light-twinkle 2.8s ease-in-out infinite;
}

.christmas-lights span::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 8px;
    background: #2b2b2b;
    border-radius: 2px 2px 0 0;
}

.christmas-lights span:nth-child(3n + 1) {
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
        #06d6a0;
}

.christmas-lights span:nth-child(3n + 2) {
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
        #ffd166;
}

.christmas-lights span:nth-child(5n) {
    animation-delay: 0.6s;
}

.christmas-lights span:nth-child(4n + 2) {
    animation-delay: 0.9s;
}

@keyframes seasonal-bounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes light-twinkle {
    0%,
    100% {
        opacity: 0.85;
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 14px rgba(255, 229, 180, 0.75));
    }
}

@media (max-width: 768px) {
    .winter-snowfall {
        gap: 0.5rem;
    }

    .christmas-lights {
        top: 6.5rem;
        gap: 1rem;
    }

    .christmas-lights span {
        width: 16px;
        height: 24px;
    }

    .christmas-lights__gap {
        flex-basis: 12rem;
        min-width: 8rem;
    }
}
