:root {
    --bs-body-bg: #F4F0EC;
    --bs-body-color: #2C221E;
}
body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.card {
    background-color: #FFFFFF;
    border: 1px solid #E6DFD5 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(44, 34, 30, 0.04) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(44, 34, 30, 0.08) !important;
}
.btn-dark {
    background-color: #2C221E !important;
    border-color: #2C221E !important;
}
.btn-dark:hover {
    background-color: #3F322D !important;
    border-color: #3F322D !important;
}
.form-select, .form-control {
    background-color: #FFFFFF !important;
    border: 1px solid #D9CEBF !important;
    color: #2C221E !important;
}


/* ===== НОВОГОДНЕЕ ОФОРМЛЕНИЕ ВКУСНЯКИ ===== */
:root {
    --holiday-green: #173d32;
    --holiday-green-light: #245846;
    --holiday-gold: #d8b66a;
    --holiday-cream: #fffaf0;
    --holiday-red: #9f3d36;
}

.holiday-navbar {
    background: linear-gradient(110deg, #15372e, #245342 65%, #17372f) !important;
    border-bottom: 2px solid var(--holiday-gold);
    box-shadow: 0 5px 20px rgba(20, 48, 37, .18);
}

.holiday-navbar .navbar-brand {
    color: #f5d994 !important;
    font-weight: 800;
    letter-spacing: .4px;
}

.holiday-navbar .nav-link {
    color: #fffaf0 !important;
    transition: color .2s ease;
}

.holiday-navbar .nav-link:hover {
    color: #f3d58d !important;
}

.holiday-banner {
    position: relative;
    overflow: hidden;
    margin: -24px 0 28px;
    padding: 34px 16px 30px;
    color: var(--holiday-cream);
    text-align: center;
    background:
        radial-gradient(ellipse at 12% 15%, rgba(255,255,255,.12), transparent 32%),
        radial-gradient(ellipse at 88% 85%, rgba(216,182,106,.15), transparent 35%),
        linear-gradient(120deg, #15392f, #286047 55%, #173c31);
    border-bottom: 3px solid var(--holiday-gold);
}

.holiday-banner::before,
.holiday-banner::after {
    content: "✦";
    position: absolute;
    color: var(--holiday-gold);
    font-size: 42px;
    opacity: .65;
}

.holiday-banner::before {
    left: 7%;
    top: 25%;
}

.holiday-banner::after {
    right: 7%;
    bottom: 20%;
}

.holiday-banner-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: auto;
}

.holiday-decor {
    color: #f1d58f;
    font-size: 25px;
    letter-spacing: 12px;
    margin-bottom: 8px;
}

.holiday-kicker {
    color: #f0dba9;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.holiday-banner h1 {
    margin: 9px 0;
    color: #fff8e9;
    font-family: Georgia, serif;
    font-size: clamp(27px, 5vw, 43px);
    font-weight: 700;
    text-shadow: 0 3px 12px rgba(0,0,0,.2);
}

.holiday-banner p {
    max-width: 620px;
    margin: 0 auto;
    color: #f7efdc;
    font-size: 16px;
    line-height: 1.6;
}

.holiday-decor-bottom {
    margin-top: 17px;
    color: #f0d18a;
    font-size: 13px;
    letter-spacing: .5px;
}

.holiday-snow {
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.holiday-snow::before,
.holiday-snow::after {
    content: "❄     ·       ❅          ❄       ·       ❆";
    position: absolute;
    top: -35px;
    left: 0;
    width: 100%;
    color: rgba(125, 155, 169, .48);
    font-size: 17px;
    word-spacing: 35px;
    white-space: pre-wrap;
    animation: holiday-fall 18s linear infinite;
}

.holiday-snow::after {
    left: 35%;
    opacity: .55;
    font-size: 12px;
    animation-duration: 27s;
    animation-delay: -12s;
}

@keyframes holiday-fall {
    from { transform: translateY(-30px) translateX(0); }
    to { transform: translateY(110vh) translateX(-45px); }
}

@media (max-width: 576px) {
    .holiday-banner {
        padding: 26px 18px 23px;
    }

    .holiday-banner p {
        font-size: 14px;
    }

    .holiday-kicker {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .holiday-decor-bottom {
        font-size: 11px;
    }

    .holiday-banner::before {
        left: 3%;
        font-size: 25px;
    }

    .holiday-banner::after {
        right: 3%;
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .holiday-snow::before,
    .holiday-snow::after {
        animation: none;
    }
}


/* ===== NEW YEAR PREMIUM V2 ===== */

.holiday-navbar {
    background: linear-gradient(
        110deg, #103d30, #205b46
    ) !important;
    border-bottom: 1px solid #c5a35a;
    margin-bottom: 0 !important;
}

.holiday-navbar .navbar-brand {
    color: #f2d58d !important;
    font-weight: 800;
}

body:has(.newyear-home-marker) {
    background: #f7f4ed;
}

/* Компактный праздничный блок главной страницы */
body:has(.newyear-home-marker) main .container > div:first-child {
    position: relative;
}

/* Заголовок */
body:has(.newyear-home-marker) main h2 {
    letter-spacing: .2px;
}

/* Праздничное оформление кнопок главной */
body:has(.newyear-home-marker) main a.btn,
body:has(.newyear-home-marker) main button.btn {
    transition: transform .2s ease, box-shadow .2s ease;
}

body:has(.newyear-home-marker) main a.btn:hover,
body:has(.newyear-home-marker) main button.btn:hover {
    transform: translateY(-2px);
}

/* Сезонные акценты */
body:has(.newyear-home-marker) main .card {
    border-color: #e6ddc6 !important;
}

body:has(.newyear-home-marker) main .card:hover {
    box-shadow: 0 8px 22px rgba(18,75,53,.14) !important;
}

@media (max-width: 767px) {
    .holiday-navbar {
        min-height: 52px;
    }

    body:has(.newyear-home-marker) main h2 {
        font-size: 1.3rem !important;
    }

    body:has(.newyear-home-marker) main .card {
        border-radius: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:has(.newyear-home-marker) main .card,
    body:has(.newyear-home-marker) main .btn {
        transition: none !important;
    }
}


/* ===== NEW YEAR FINAL V3 ===== */

body:has(.newyear-home-marker) {
    background: #f7f4ed !important;
}

/* Хвойно-зелёная шапка */
.holiday-navbar {
    background: linear-gradient(
        110deg, #073d2e, #145743, #073d2e
    ) !important;
    border-bottom: 2px solid #d7ae54 !important;
    margin-bottom: 0 !important;
}

.holiday-navbar .navbar-brand {
    color: #f3d07d !important;
    font-weight: 800;
}

/* Главный праздничный баннер */
body:has(.newyear-home-marker) .newyear-hero {
    background:
        radial-gradient(circle at 50% 0%,
            rgba(239,198,98,.16), transparent 48%),
        linear-gradient(125deg,
            #063d2c, #07543b 55%, #063d2c) !important;
    border: 1px solid #cba450 !important;
    border-radius: 20px !important;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 185px;
    box-shadow: 0 9px 24px rgba(4,55,38,.17) !important;
}

body:has(.newyear-home-marker) .newyear-hero::before {
    content: "🌲  ❄  ✦  ❄  🌲";
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    text-align: center;
    color: #f4d27c;
    font-size: 20px;
    letter-spacing: 8px;
    opacity: .85;
    pointer-events: none;
}

body:has(.newyear-home-marker) .newyear-hero::after {
    content: "❄";
    position: absolute;
    right: 15px;
    bottom: 12px;
    font-size: 30px;
    color: #dcb75e;
    opacity: .75;
    pointer-events: none;
}

body:has(.newyear-home-marker) .newyear-hero h2 {
    color: #fff8e9 !important;
    font-family: Georgia, serif !important;
    text-shadow: 0 2px 8px rgba(0,0,0,.2);
}

body:has(.newyear-home-marker) .newyear-hero p {
    color: #f1e5c7 !important;
}

/* Кнопки главной страницы */
body:has(.newyear-home-marker) main .container > .mb-3.d-flex > a.btn:first-child {
    background: linear-gradient(
        180deg, #f7d46f, #dcae3d
    ) !important;
    color: #30230d !important;
    border: 1px solid #c99a2f !important;
}

body:has(.newyear-home-marker) main .container > .mb-3.d-flex > button.btn {
    background: #fffaf0 !important;
    color: #183e31 !important;
    border: 1px solid #ddcfac !important;
}

body:has(.newyear-home-marker) main .container > .mb-3.d-flex > a.btn:last-child {
    background: #07543b !important;
    color: #fffdf5 !important;
    border: 1px solid #07543b !important;
}

/* Блог и кабинет */
body:has(.newyear-home-marker) main .row.g-2 .btn {
    background: #e9eddf !important;
    color: #173e30 !important;
    border: 1px solid #d6dfcb !important;
}

body:has(.newyear-home-marker) main .row.g-2 .col-6:last-child .btn {
    background: #d3e5d6 !important;
}

/* Категории */
body:has(.newyear-home-marker) #categoryForm .form-select {
    background-color: #fffdf8 !important;
    border: 1px solid #e4d9c2 !important;
    color: #244034 !important;
}

/* Светлые карточки рецептов */
body:has(.newyear-home-marker) main .row.g-3 .card {
    background: #ffffff !important;
    border: 1px solid #e9e2d3 !important;
    border-radius: 16px !important;
    overflow: hidden;
}

/* Зелёные кнопки Приготовить */
body:has(.newyear-home-marker) main .row.g-3 .card .btn-dark {
    background: #07543b !important;
    border-color: #07543b !important;
    color: white !important;
}

body:has(.newyear-home-marker) main .row.g-3 .card .btn-dark:hover {
    background: #0e684a !important;
    border-color: #0e684a !important;
}

@media (max-width: 576px) {
    body:has(.newyear-home-marker) .newyear-hero {
        min-height: 165px;
        margin-bottom: 12px !important;
    }

    body:has(.newyear-home-marker) .newyear-hero::before {
        font-size: 15px;
        letter-spacing: 4px;
    }

    body:has(.newyear-home-marker) .newyear-hero h2 {
        font-size: 1.3rem !important;
    }

    body:has(.newyear-home-marker) main .row.g-3 {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }
}


/* ===== RUSTORE DOWNLOAD BANNER ===== */
.rustore-download-banner {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid #c9a657;
    background:
        radial-gradient(circle at 95% 10%,
            rgba(242,205,112,.18), transparent 35%),
        linear-gradient(125deg, #073e30, #086047);
    box-shadow: 0 5px 18px rgba(0,65,44,.14);
    color: #fff9e9;
}

.rustore-download-banner::after {
    content: "❄ ✦ ❄";
    position: absolute;
    right: 12px;
    top: 8px;
    color: #e7c675;
    opacity: .55;
    letter-spacing: 8px;
    pointer-events: none;
}

.rustore-download-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 9px;
    padding: 20px 18px;
}

.rustore-download-icon {
    font-size: 34px;
}

.rustore-download-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #f1d48d;
}

.rustore-download-info h3 {
    margin: 5px 0;
    font-size: 21px;
    font-family: Georgia, serif;
    font-weight: 700;
    color: #fff8e5;
}

.rustore-download-info p {
    margin: 0;
    font-size: 13px;
    color: #e4eee6;
}

.rustore-download-button {
    display: inline-block;
    padding: 11px 25px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe28a, #e5b748);
    color: #26351f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(0,0,0,.15);
}

.rustore-download-button:hover,
.rustore-download-button:focus {
    background: #ffe9a3;
    color: #173d32;
}

@media (min-width: 768px) {
    .rustore-download-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        padding: 22px 28px;
    }

    .rustore-download-info {
        flex: 1;
    }
}
