@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --color-white: #ffffff;
    --color-gray-a6: #A6A6A6;
    --color-gray-c1: #C1C1C1;
    --color-gray-f7: #F7F7F7;
    --color-gray-ec: #ECECEC;
    --color-gray-dc: #DCDCDC;
    --color-green: #40C196;
    --color-light-green: #54ecb9;
    --color-dark-green: #2fa07a;
    --color-light-dark-green: #3dc195;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    font-family: "Montserrat", sans-serif;
    background: gray;
    color: #1a1a1a;
}

.header__user-name,
.header {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 20px;
}

.header {
    position: absolute;
    top: 30px;
    right: 40px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.header__user {
    cursor: pointer;
    background-color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    padding: 11px 20px;
    border-radius: 15px;
    transition: all .15s ease-in-out;
}

.header__user-img {
    width: 25px;
}

.menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.menu__bar,
.menu__bar_alig {
    cursor: pointer;
    background-color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: all .15s ease-in-out;
}

.menu__bar_alig {
    width: 0px;
    height: 0px;
    background-color: var(--color-gray-f7);
    display: none;
}

.menu_ul_li.active .menu__bar_alig {
    display: flex;
}

.menu__bar .menu__bar-line {
    width: 24px;
    height: 4px;
    border-radius: 50px;
    background: var(--color-gray-c1);
    transition: all .3s ease-in-out;
}

.top-menu {
    top: 12px;
    right: 0;
    position: absolute;
}

.menu__ul,
.menu__ul_anoth {
    padding: 16px 20px;
    opacity: 0;
    visibility: hidden;
    display: flex;
    position: absolute;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 15px;
    gap: 6px;
    transition: all .15s ease-in-out;
}

.menu__ul {
    top: 65px;
    right: 0;
}

.menu__ul_anoth {
    top: 0px;
    right: 262px;
}

.menu__ul.active,
.menu__ul_anoth.active {
    opacity: 1;
    visibility: visible;
    display: flex;
}

.menu_ul_li {
    text-decoration: none;
    color: #000;
    user-select: none;
    cursor: pointer;
    padding: 5px 15px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 15px;
    transition: all .15s ease-in-out;
}

.menu_ul_li.active {
    background-color: var(--color-gray-f7);
}

body.dark-theme .menu_ul_li.active {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.menu__ul_li-img_container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 34px;
    background: var(--color-gray-f7);
    border-radius: 12px;
}

.menu__ul_li-img {
    height: 16px;
}

.menu__ul_li-text {
    white-space: nowrap;
}



.menu__bar.active .menu__bar-line:first-child {
    display: none;
}

.menu__bar.active .menu__bar-line,
.menu_ul_li.active .menu__bar-line:first-child {
    margin-top: 0px;
    rotate: -45deg;
}

.menu__bar.active .menu__bar-line:last-child {
    margin-top: -9px;
    rotate: 45deg;
}

.menu_ul_li.active .menu__bar-line:last-child {
    margin-top: -6px;
    rotate: 45deg;
}

.footer {
    position: absolute;
    bottom: 30px;
    right: 40px;
    display: flex;
    flex-direction: row-reverse;
    gap: 20px;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.weather {
    background-color: var(--color-white);
    padding: 10px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.weather__img {
    height: 30px;
}

.weather__info {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;

}

.logo {
    background-color: var(--color-white);
    padding: 10px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo__img {
    height: 30px;
}

.logo__text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;

}

.main {
    position: relative;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-color: hsl(0, 100%, 44%);
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    width: 900px;
    max-width: calc(100vw - 80px);
    height: 94vh;
    margin: 30px 40px;
    background-color: var(--color-white);
    color: #1a1a1a;
    border-radius: 30px;
    box-sizing: border-box;
}

.main::-webkit-scrollbar {
    margin-right: 5px;
    width: 12px;
}

.main::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom,
            transparent 10%,
            var(--color-gray-dc) 10%,
            var(--color-gray-dc) 90%,
            transparent 90%);
    border-radius: 500px;
}

.slider-section {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.news {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.slider__top {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.slider__title {
    font-size: 30px;
    color: #1a1a1a;
}

.slider__favorite-button {
    font-size: 18px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border: none;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 10px 12px;
    background-color: var(--color-gray-ec);
    border-radius: 12px;
    height: 35px;
    transition: all .15s ease-in-out;
}

.slider__favorite-button.hidden {
    display: none;
}

.slider__favorite-button.active {
    background-color: var(--color-green) !important;
}

.slider__favorite-button.active .slider__favorite-text {
    color: var(--color-white) !important;
}

.slider__favorite-button.active .slider__favorite-img {
    filter: brightness(0) invert(1) !important;
}

.slider__favorite-button.active:hover {
    background-color: var(--color-dark-green) !important;
}

.slider__favorite-img {
    height: 16px;
}

.slider__favorite-img-2 {
    margin-top: -2px;
    height: 18px;
}

.slider__bottom {
    background-color: var(--color-gray-f7);
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
}

.slider-container {
    border-radius: 12px;
    padding: 10px 65px;
}

.slides-container {
    overflow: hidden;
    border-radius: 12px;
    /* touch swipe on mobile */
    touch-action: pan-x;
}

.slides {
    user-select: none;
    height: 45px;
    display: flex;
    gap: 10px;
    align-items: center;
    border-radius: 12px;
    transition: all 0.5s ease-in-out;
}

.slide {
    cursor: pointer;
    padding: 8px 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: var(--color-gray-ec);
    border-radius: 12px;
    transition: all .15s ease-in-out;
    flex-shrink: 0;
}

.slide.active {
    background-color: var(--color-green);
}

.slide.active:hover {
    background-color: var(--color-dark-green);
}

.slide-img {
    border-radius: 10px;
    width: 30px;
    height: 30px;
}

.slide-text {
    white-space: nowrap;
    font-size: 20px;
    color: #1a1a1a;
}

.slide.active .slide-text {
    color: var(--color-white);
}

.btn-slide {
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 12px;
    position: absolute;
    width: 45px;
    height: 45px;
    background-color: var(--color-gray-ec);
    transition: all .15s ease-in-out;
}

.btn-slide img {
    height: 23px;
}

.prev-btn {
    top: 10px;
    left: 10px;
}

.next-btn {
    top: 10px;
    right: 10px;
}

.menu_ul_li:hover,
.menu__bar:hover,
.header__user:hover,
.new__like-city-btn:hover,
.new__like-source-btn:hover {
    background: var(--color-gray-f7);
}

.slider__favorite-button:hover,
.btn-slide:hover,
.slide:hover {
    background: var(--color-gray-dc);
}

.share-btn:hover,
.new__like-btn:hover {
    background: var(--color-gray-ec);
}

/* Events Filter Toggle Button */
.events-filter-toggle {
    font-size: 16px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border: none;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 0 16px;
    background-color: var(--color-gray-ec);
    border-radius: 12px;
    height: 35px;
    color: #222;
    transition: all .2s ease-in-out;
    user-select: none;
}

.events-filter-toggle:hover {
    background-color: var(--color-gray-dc);
}

.events-filter-toggle.active {
    background-color: var(--color-gray-dc);
}

.events-filter-toggle.has-filters {
    background-color: rgba(64, 193, 150, 0.15);
    color: var(--color-dark-green);
}

.events-filter-toggle.has-filters:hover {
    background-color: rgba(64, 193, 150, 0.25);
}

.events-filter-icon {
    flex-shrink: 0;
}

.events-filter-badge {
    display: none;
    background-color: var(--color-green);
    color: var(--color-white);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 10px;
    margin-left: -2px;
}

.events-filter-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.events-filter-toggle.active .events-filter-chevron {
    transform: rotate(180deg);
}

/* Events Filter Accordion Panel */
.events-filter-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1), margin-top 0.32s ease, opacity 0.25s ease;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    width: 100%;
}

.events-filter-panel.is-open {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 14px;
}

.events-filter-content {
    min-height: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.events-filter-panel.is-open .events-filter-content {
    transform: translateY(0);
}

.events-filter-box {
    background-color: var(--color-gray-f7);
    border-radius: 20px;
    padding: 16px 20px;
}

/* 3 Items from left to right: Sentiment -> Theme -> Dates */
.events-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr auto;
    gap: 18px;
    align-items: flex-end;
}

.events-filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.events-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    letter-spacing: 0.2px;
    user-select: none;
}

.events-select-wrapper {
    position: relative;
    width: 100%;
}

.events-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23555555' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.events-filter-select {
    width: 100%;
    height: 35px;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-dc);
    border-radius: 12px;
    padding: 0 34px 0 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: all 0.2s ease;
}

.events-filter-select:hover {
    border-color: #bbb;
    background-color: #fafafa;
}

.events-filter-select:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(64, 193, 150, 0.2);
    background-color: var(--color-white);
}

.events-filter-dates-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-sublabel {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    user-select: none;
}

.events-filter-reset-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-dc);
    border-radius: 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.events-filter-reset-btn:hover {
    background-color: #dbdbdb;
}

@media (max-width: 900px) and (min-width: 601px) {
    .events-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .events-filter-item--dates {
        grid-column: span 2;
    }
}

.date-input_cont {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-input_container {
    font-size: 18px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border: none;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 0px 12px;
    background-color: var(--color-gray-ec);
    border-radius: 12px;
    height: 35px;
    transition: all .15s ease-in-out;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    position: relative;
}

.date-input_container::after {
    cursor: pointer;
    content: '';
    width: 18px;
    height: 18px;
    background-image: url('../images/icons/calendar.svg');
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    right: 10px;
    pointer-events: none;
}

.date-input {
    font-family: inherit;
    background: none;
    font-size: inherit;
    font-weight: inherit;
    border: none;
}

input[type="date"] {
    appearance: none;
    display: flex;
}

[type="date"]::-webkit-inner-spin-button {
    display: none;
}

[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
}




.news_container {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: var(--color-gray-f7);
    border-radius: 30px;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.new__item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-radius: 20px;
    padding: 18px 25px;
    background-color: var(--color-white);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.new__item-left {
    width: 289px;
    height: 210px;
    position: relative;
    border-radius: 12px;
    z-index: 1;
}

/* Subtle ambient backlight behind the picture based on sentiment */
.new__item-left::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 13px;
    z-index: -1;
    pointer-events: none;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.new__item-left.sentiment-glow-positive::before {
    box-shadow: 0 0 18px 2px rgba(34, 197, 94, 0.32), 0 2px 8px 0 rgba(34, 197, 94, 0.2);
}

.new__item-left.sentiment-glow-negative::before {
    box-shadow: 0 0 18px 2px rgba(239, 68, 68, 0.32), 0 2px 8px 0 rgba(239, 68, 68, 0.2);
}

.new__item-left.sentiment-glow-neutral::before {
    box-shadow: 0 0 14px 1px rgba(148, 163, 184, 0.2), 0 2px 6px 0 rgba(148, 163, 184, 0.12);
}

.new__item:hover .new__item-left.sentiment-glow-positive::before {
    box-shadow: 0 0 25px 4px rgba(34, 197, 94, 0.42), 0 3px 10px 1px rgba(34, 197, 94, 0.26);
}

.new__item:hover .new__item-left.sentiment-glow-negative::before {
    box-shadow: 0 0 25px 4px rgba(239, 68, 68, 0.42), 0 3px 10px 1px rgba(239, 68, 68, 0.26);
}

.new__item:hover .new__item-left.sentiment-glow-neutral::before {
    box-shadow: 0 0 18px 2px rgba(148, 163, 184, 0.26), 0 2px 8px 0 rgba(148, 163, 184, 0.16);
}

.new__item-img {
    width: 289px;
    height: 210px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.new__item-img-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.new__item-img-info>* {
    pointer-events: auto;
}

.new__comment-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--color-gray-f7);
    transition: all .15s ease-in-out;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.new__comment-btn:hover {
    transform: scale(1.08);
    background-color: var(--color-gray-ec);
}

.new__comment-btn .comment-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.15s ease-in-out;
}

.new-sentiment-badge {
    display: none;
}

.new__like-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 8px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--color-gray-f7);
    transition: all .15s ease-in-out;
    cursor: pointer;
}

.like-img {
    width: 100%;
    height: 100%;
}

.new-time-container {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 5px;
}

.new-time {
    background-color: var(--color-gray-f7);
    padding: 0px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    height: 34px;
    border-radius: 12px;
    color: #1a1a1a;
}

.new-date {
    right: 30%;
}

.new-city-container {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    background-color: var(--color-gray-f7);
    border-radius: 12px;
    padding: 6px;
}

.new-city-img {
    width: 22px;
    height: 22px;
    border-radius: 6px;

}

.new-city-title {
    font-size: 18px;
    color: #1a1a1a;
}

.new__like-city-btn {
    padding: 4.5px;
    width: 19px;
    height: 19px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--color-white);
    transition: all .15s ease-in-out;
    cursor: pointer;
}

.top__item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.new__item-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

}

.new__title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
}

.new__text {
    font-size: 16px;
    color: var(--color-gray-a6);
    font-weight: 300;
}

.new__bottom {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

.new-source-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    background-color: var(--color-gray-f7);
    border-radius: 12px;
    padding: 6px 8px;
    width: min-content;
}

.new-source-img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
}

.new-source-title {
    font-size: 18px;
    white-space: nowrap;
    color: #1a1a1a;
}

.new__like-source-btn {
    padding: 4.5px;
    width: 19px;
    height: 19px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--color-white);
    transition: all .15s ease-in-out;
    cursor: pointer;
}

.new__bottom__right {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: var(--color-gray-f7);
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: all .15s ease-in-out;
}

.share-img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.open-new {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    padding: 6px 24px;
    text-decoration: none;
    color: var(--color-white);
    background-color: var(--color-green);
    border-radius: 12px;
    transition: all .15s ease-in-out;
}

.open-new:hover {
    background-color: var(--color-dark-green);
}

.news-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.news-loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(46, 172, 109, 0.2);
    border-top-color: #2eac6d;
    border-radius: 50%;
    animation: newsSpinner 0.8s linear infinite;
}

@keyframes newsSpinner {
    to {
        transform: rotate(360deg);
    }
}

.news-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 15px;
    color: var(--color-gray-a6);
    font-size: 14px;
}



.custom-map-polygon {
    fill: #343746;
    stroke: #55596e;
    stroke-width: 1.5;
    transition: fill 0.2s ease, stroke 0.2s ease;
    cursor: pointer;
}

.custom-map-polygon:hover,
.custom-map-polygon.hover {
    fill: rgba(64, 193, 150, 0.28);
    stroke: #40C196;
    stroke-width: 2;
}



.marker {
    padding: 2.5px 5px;
    background-color: var(--color-white);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    transition: all .2s ease-in-out;
    user-select: none;
}

.marker:hover {
    background-color: var(--color-gray-ec);
}

.marker.active {
    background-color: var(--color-green);
}

.marker.active:hover {
    background-color: var(--color-dark-green);
}

.marker-img {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    flex-shrink: 0;
}

.marker-text {
    white-space: nowrap;
    color: black;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.marker-text {
    white-space: nowrap;
    color: black;
    font-family: "Montserrat", sans-serif;
    font-size: 10px;
}

.marker.active .marker-text {
    color: white;
}

/* Animated Weather Texture Overlay on District Polygons */
.custom-map-weather-overlay {
    pointer-events: none;
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
}

/* Temperature Degrees written directly onto the District Polygon Surface */
.district-polygon-temp {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 10.5px;
    fill: #ffffff;
    text-anchor: middle;
    dominant-baseline: central;
    letter-spacing: -0.2px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.75));
    transition: fill 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.district-polygon-temp:hover,
.district-polygon-temp.hover {
    fill: #40C196 !important;
    filter: drop-shadow(0 0 10px rgba(64, 193, 150, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 1));
}

.district-polygon-temp.active {
    fill: #ffffff !important;
    font-weight: 800;
    filter: drop-shadow(0 0 14px rgba(64, 193, 150, 1)) drop-shadow(0 2px 5px rgba(0, 0, 0, 1));
}

.district-polygon-temp.is-freezing {
    fill: #93c5fd;
}

.district-polygon-temp.is-warm {
    fill: #fcd34d;
}

/* ========================================================
   SETTINGS SUBMENU & TOGGLE SWITCHES
   ======================================================== */
#settings_menu {
    min-width: 260px;
}

.menu_ul_li--setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 15px;
    cursor: default;
}

.menu_ul_li--setting .menu__ul_li-text {
    flex: 1;
}

.toggle-switch-wrapper {
    display: inline-flex;
    align-items: center;
}

.toggle-switch-input {
    display: none;
}

.toggle-switch-label {
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: var(--color-gray-dc);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
}

.toggle-switch-button {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-switch-input:checked+.toggle-switch-label {
    background-color: var(--color-green);
}

.toggle-switch-input:checked+.toggle-switch-label .toggle-switch-button {
    transform: translateX(20px);
}

/* ========================================================
   WEATHER DISPLAY TOGGLE (ON / OFF)
   ======================================================== */
body.hide-map-weather .custom-map-weather-overlay {
    display: none !important;
}

body.hide-map-weather .district-polygon-temp {
    display: none !important;
}

body.hide-map-weather .marker-temp {
    display: none !important;
}

/* ========================================================
   DARK THEME OVERRIDES (COMPLETELY BORDERLESS / БЕЗ ОКАНТОВКИ)
   ======================================================== */
html.dark-theme {
    background-color: #0b0e14 !important;
}

body.dark-theme {
    background-color: #0b0e14 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .main {
    background-color: #141822 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    border: none !important;
}

body.dark-theme .main::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom,
            transparent 10%,
            #2d3748 10%,
            #2d3748 90%,
            transparent 90%) !important;
}

body.dark-theme .sheet-handle {
    background-color: transparent !important;
    border: none !important;
}

body.dark-theme .sheet-handle::before {
    background-color: #3b4556 !important;
}

body.dark-theme .sheet-handle.dragging::before,
body.dark-theme .sheet-handle:active::before {
    background-color: var(--color-green) !important;
}

/* Header & Menu */
body.dark-theme .header__user {
    background-color: #1c2230 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .header__user:hover {
    background-color: #252e42 !important;
}

body.dark-theme .header__user-img {
    filter: brightness(0) invert(1);
}

body.dark-theme .menu__bar,
body.dark-theme .menu__bar.active {
    background-color: #1c2230 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .menu__bar:hover {
    background-color: #252e42 !important;
}

body.dark-theme .menu__bar .menu__bar-line {
    background: #ffffff !important;
}

body.dark-theme .news_container {
    background-color: #252e42 !important;
}

body.dark-theme .menu__ul,
body.dark-theme .menu__ul_anoth {
    background: #1c2230 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    border: none !important;
}

body.dark-theme .menu_ul_li {
    color: #f1f5f9 !important;
    border: none !important;
}

body.dark-theme .menu_ul_li:hover {
    background: rgba(255, 255, 255, 0.07) !important;
}

body.dark-theme .menu__ul_li-img_container {
    background: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
}

body.dark-theme .menu__ul_li-img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .toggle-switch-label {
    background-color: #334155 !important;
    border: none !important;
}

/* Footer & Logo */
body.dark-theme .footer .logo,
body.dark-theme .footer .weather,
body.dark-theme .footer>* {
    background-color: #1c2230 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .logo__text,
body.dark-theme .weather__info {
    color: #f1f5f9 !important;
}

/* Titles */
body.dark-theme .slider__title,
body.dark-theme .events__title,
body.dark-theme .news__title {
    color: #ffffff !important;
}

/* Sliders */
body.dark-theme .slider__bottom {
    background-color: #161b24 !important;
    border: none !important;
}

body.dark-theme .slider__favorite-button {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .slider__favorite-button:hover {
    background-color: #252e42 !important;
}

body.dark-theme .slider__favorite-button .slider__favorite-text {
    color: #ffffff !important;
}

body.dark-theme .slider__favorite-button .slider__favorite-img,
body.dark-theme .slider__favorite-button .slider__favorite-img-2 {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .slider__favorite-button.active {
    background-color: var(--color-green) !important;
}

body.dark-theme .slider__favorite-button.active .slider__favorite-text {
    color: #ffffff !important;
}

body.dark-theme .btn-slide {
    background-color: #1c2230 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .btn-slide:hover {
    background-color: #252e42 !important;
}

body.dark-theme .btn-slide img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .slide {
    background: #1c2230 !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-theme .slide-text {
    color: #ffffff !important;
}

body.dark-theme .slide:hover {
    background: #252e42 !important;
}

body.dark-theme .slide.active {
    background-color: var(--color-green) !important;
    border: none !important;
}

body.dark-theme .slide.active:hover {
    background-color: var(--color-dark-green) !important;
}

/* Filter Controls & Dropdown */
body.dark-theme .events-filter-toggle {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .events-filter-toggle:hover {
    background-color: #252e42 !important;
}

body.dark-theme .events-filter-toggle.active {
    background-color: #252e42 !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-theme .events-filter-toggle.has-filters {
    background-color: rgba(64, 193, 150, 0.2) !important;
    color: #54ecb9 !important;
    border: none !important;
}

body.dark-theme .events-filter-icon,
body.dark-theme .events-filter-chevron {
    color: #ffffff !important;
}

body.dark-theme .events-filter-box {
    background-color: #161b24 !important;
    border: none !important;
}

body.dark-theme .events-filter-label,
body.dark-theme .date-sublabel {
    color: #94a3b8 !important;
}

body.dark-theme .events-filter-select {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    border: none !important;
    outline: none !important;
}

body.dark-theme .events-filter-select:hover,
body.dark-theme .events-filter-select:focus {
    background-color: #252e42 !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(64, 193, 150, 0.4) !important;
}

body.dark-theme .events-filter-select option {
    background-color: #1c2230 !important;
    color: #ffffff !important;
}

body.dark-theme .events-select-wrapper::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23cbd5e1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

body.dark-theme .date-input_container {
    background-color: #1c2230 !important;
    border: none !important;
}

body.dark-theme .date-input_container:hover {
    background-color: #252e42 !important;
}

body.dark-theme .date-input {
    color: #ffffff !important;
    color-scheme: dark !important;
    border: none !important;
}

body.dark-theme .date-input_container::after {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .events-filter-reset-btn {
    background-color: #1c2230 !important;
    color: #cbd5e1 !important;
    border: none !important;
}

body.dark-theme .events-filter-reset-btn:hover {
    background-color: #252e42 !important;
    color: #ffffff !important;
}

/* News Cards (.new__item) */
body.dark-theme .new__item {
    background-color: #1c2230 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    border: none !important;
}

body.dark-theme .new__title {
    color: #ffffff !important;
}

body.dark-theme .new__text {
    color: #94a3b8 !important;
}

body.dark-theme .new__item-left.sentiment-glow-positive::before {
    box-shadow: 0 0 20px 3px rgba(34, 197, 94, 0.35), 0 2px 10px 0 rgba(34, 197, 94, 0.22);
}

body.dark-theme .new__item-left.sentiment-glow-negative::before {
    box-shadow: 0 0 20px 3px rgba(239, 68, 68, 0.35), 0 2px 10px 0 rgba(239, 68, 68, 0.22);
}

body.dark-theme .new__item-left.sentiment-glow-neutral::before {
    box-shadow: 0 0 16px 2px rgba(148, 163, 184, 0.18);
}

body.dark-theme .new__item:hover .new__item-left.sentiment-glow-positive::before {
    box-shadow: 0 0 28px 5px rgba(34, 197, 94, 0.48), 0 4px 14px 1px rgba(34, 197, 94, 0.3);
}

body.dark-theme .new__item:hover .new__item-left.sentiment-glow-negative::before {
    box-shadow: 0 0 28px 5px rgba(239, 68, 68, 0.48), 0 4px 14px 1px rgba(239, 68, 68, 0.3);
}

body.dark-theme .new__item:hover .new__item-left.sentiment-glow-neutral::before {
    box-shadow: 0 0 20px 3px rgba(148, 163, 184, 0.24);
}

body.dark-theme .new__comment-btn {
    background-color: #1c2230 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .new__comment-btn:hover {
    background-color: #252e42 !important;
}

body.dark-theme .new__like-btn {
    background-color: #1c2230 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .new__like-btn:hover {
    background-color: #252e42 !important;
}

body.dark-theme .new__like-btn.active {
    background-color: var(--color-green) !important;
    border: none !important;
}

body.dark-theme .new__like-btn.active .like-img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .new-time-container .new-time {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .new-city-container {
    background-color: #1c2230 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    border: none !important;
}

body.dark-theme .new-city-title {
    color: #ffffff !important;
}

body.dark-theme .new__like-city-btn {
    background-color: #161b24 !important;
    border: none !important;
}

body.dark-theme .new__like-city-btn:hover {
    background-color: #252e42 !important;
}

body.dark-theme .new__like-city-btn.active {
    background-color: var(--color-green) !important;
    border: none !important;
}

body.dark-theme .new__like-city-btn.active .like-city-img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .new-source-container {
    background-color: #161b24 !important;
    border: none !important;
}

body.dark-theme .new-source-title {
    color: #cbd5e1 !important;
}

body.dark-theme .new__like-source-btn {
    background-color: #1c2230 !important;
    border: none !important;
}

body.dark-theme .new__like-source-btn:hover {
    background-color: #252e42 !important;
}

body.dark-theme .new__like-source-btn.active {
    background-color: var(--color-green) !important;
    border: none !important;
}

body.dark-theme .new__like-source-btn.active .like-source-img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .share-btn {
    background-color: #161b24 !important;
    border: none !important;
}

body.dark-theme .share-btn:hover {
    background-color: #252e42 !important;
}

body.dark-theme .share-btn .share-img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .open-new {
    border: none !important;
}

/* Pagination */
body.dark-theme .pagination__btn {
    background-color: #1c2230 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    border: none !important;
}

body.dark-theme .pagination__btn:hover:not(:disabled) {
    background-color: #252e42 !important;
}

body.dark-theme .pagination__btn img {
    filter: brightness(0) invert(1) !important;
}

body.dark-theme .pagination__info {
    color: #ffffff !important;
}

/* Map Markers & Controls */
body.dark-theme .marker {
    background-color: #1c2230 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    border: none !important;
}

body.dark-theme .marker-text {
    color: #ffffff !important;
}

body.dark-theme .marker:hover {
    background-color: #262e40 !important;
    border: none !important;
}

body.dark-theme .marker.active {
    background-color: var(--color-green) !important;
    border: none !important;
}

body.dark-theme .marker.active .marker-text {
    color: #ffffff !important;
}

body.dark-theme .custom-map-btn {
    border: none !important;
}

/* Preloader & Login */
body.dark-theme .preloader {
    background-color: #0b0e14 !important;
}

html.dark-theme,
body.dark-theme {
    background-color: #0b0e14 !important;
}

body.dark-theme .login-container {
    background-color: #0b0e14 !important;
}

body.dark-theme .login-form {
    background: #161c26 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55) !important;
    border: none !important;
}

body.dark-theme .login-form h2 {
    color: #ffffff !important;
}

body.dark-theme .form-group label {
    color: #94a3b8 !important;
}

body.dark-theme .form-group input {
    background-color: #0d1117 !important;
    color: #f8fafc !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-theme .form-group input:focus {
    box-shadow: 0 0 0 2px #40C196 !important;
}

body.dark-theme .form-group input::placeholder {
    color: #475569 !important;
}

body.dark-theme .login-btn {
    background-color: #40C196 !important;
    color: #ffffff !important;
    border: none !important;
}

body.dark-theme .login-btn:hover {
    background-color: #34a882 !important;
}

body.dark-theme .login-link {
    color: #94a3b8 !important;
}

body.dark-theme .login-link:hover {
    color: #40C196 !important;
}

body.dark-theme .error-message {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: none !important;
}

body.dark-theme .logo-login {
    filter: drop-shadow(0 12px 32px rgba(64, 193, 150, 0.25));
}



/* LOGIN & REGISTRATION */

.login-container {
    font-family: "Montserrat", sans-serif;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    box-sizing: border-box;
    background-color: #f5f6f8;
    transition: background-color 0.25s ease;
    overflow: visible;
}

.login-cont {
    position: relative;
    z-index: 2;
    margin-left: 0;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    overflow: visible;
}

.login-form {
    background: #ffffff;
    padding: 2.25rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    box-sizing: border-box;
    width: 100%;
    border: none;
    overflow: visible;
}

@media (max-width: 768px) {
    .login-container {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 20px 16px 32px;
        align-items: flex-start;
    }

    .login-cont {
        width: 100%;
        max-width: 400px;
        margin-left: 0;
    }

    .login-form {
        width: 100%;
        padding: 1.5rem 1.25rem;
    }
}

.login-form h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.75rem;
    color: #111827;
}

.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 0.95rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: "Montserrat", sans-serif;
    outline: none;
    transition: all 0.18s ease-in-out;
    background-color: #ffffff;
    color: #111827;
}

.form-group input:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(64, 193, 150, 0.15);
}

.login-btn {
    font-family: "Montserrat", sans-serif;
    width: 100%;
    padding: 0.85rem;
    background-color: var(--color-green);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background-color: var(--color-dark-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(64, 193, 150, 0.35);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 1rem;
    text-align: center;
    display: none;
    line-height: 1.4;
}

.logo-login {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -175px;
    z-index: -1;
    pointer-events: none;
    transition: all 0.25s ease;
}

.login-links {
    width: 100%;
    font-size: 13px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.login-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.login-link:hover {
    color: var(--color-green);
}

/* Password Input Wrapper with toggle eye */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 42px !important;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: var(--color-green);
}

.password-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Password criteria checklist */
.password-rules {
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #f8fafc;
    border-radius: 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.password-rules-title {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    transition: color 0.15s ease;
}

.rule-item.valid {
    color: #059669;
    font-weight: 500;
}

.rule-item.invalid-warn {
    color: #ef4444;
    font-weight: 600;
}

.rule-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Strength bar */
.password-strength-track {
    width: 100%;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.25s ease, background-color 0.25s ease;
    border-radius: 2px;
}

/* Password Match Indicator */
.password-match-status {
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}

.password-match-status.match {
    color: #059669;
}

.password-match-status.no-match {
    color: #ef4444;
}

/* Verification Code Step (6 digits) */
.verification-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.verification-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(64, 193, 150, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--color-green);
    font-size: 24px;
}

.verification-step-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
}

.verification-step-desc b {
    color: #0f172a;
    word-break: break-all;
}

.code-inputs-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

.code-digit-input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Montserrat', monospace;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background-color: #ffffff;
    color: #0f172a;
    outline: none;
    transition: all 0.18s ease;
    box-sizing: border-box;
}

.code-digit-input:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(64, 193, 150, 0.18);
    transform: translateY(-2px);
}

.resend-box {
    margin-top: 14px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--color-green);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    transition: opacity 0.15s ease;
}

.resend-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}

.back-to-step1-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.back-to-step1-btn:hover {
    color: var(--color-green);
}

.dev-code-hint {
    margin-top: 14px;
    padding: 8px 12px;
    background: #ecfdf5;
    border: 1px dashed #40C196;
    border-radius: 10px;
    font-size: 12px;
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    word-break: break-all;
}

.dev-code-hint button {
    background: #40C196;
    color: #ffffff;
    border: none;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
}

/* Dark theme overrides for registration enhancements */
body.dark-theme .password-rules {
    background-color: #0d1117;
    border-color: #1e2534;
}

body.dark-theme .password-rules-title {
    color: #94a3b8;
}

body.dark-theme .rule-item {
    color: #64748b;
}

body.dark-theme .rule-item.valid {
    color: #40C196;
}

body.dark-theme .rule-item.invalid-warn {
    color: #f87171;
}

body.dark-theme .password-strength-track {
    background-color: #1e2534;
}

body.dark-theme .verification-step-desc {
    color: #94a3b8;
}

body.dark-theme .verification-step-desc b {
    color: #f1f5f9;
}

body.dark-theme .code-digit-input {
    background-color: #0d1117;
    border-color: #1e2534;
    color: #f1f5f9;
}

body.dark-theme .code-digit-input:focus {
    border-color: #40C196;
    box-shadow: 0 0 0 3px rgba(64, 193, 150, 0.25);
}

body.dark-theme .back-to-step1-btn {
    color: #94a3b8;
}

body.dark-theme .back-to-step1-btn:hover {
    color: #40C196;
}

body.dark-theme .dev-code-hint {
    background: rgba(64, 193, 150, 0.1);
    border-color: rgba(64, 193, 150, 0.4);
    color: #40C196;
}

@media (max-width: 480px) {
    .code-inputs-container {
        gap: 6px;
    }
    .code-digit-input {
        width: 38px;
        height: 48px;
        font-size: 20px;
    }
}

/* Responsive login & register styles */
@media (max-width: 768px) {
    .login-container {
        padding: 24px 16px;
        align-items: center;
    }

    .login-cont {
        margin-left: 0 !important;
        max-width: 420px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .logo-login {
        position: static !important;
        transform: none !important;
        order: -1;
        width: 76px !important;
        height: 76px !important;
        margin-bottom: 20px !important;
        right: auto !important;
        top: auto !important;
    }

    .login-form {
        padding: 1.75rem 1.4rem;
        border-radius: 18px;
    }

    .login-form h2 {
        font-size: 20px;
        margin-bottom: 1.5rem;
    }

    .login-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin-top: 16px;
    }

    .login-link {
        padding: 4px 6px;
        font-size: 13.5px;
    }
}

@media (max-width: 400px) {
    .login-container {
        padding: 16px 12px;
    }

    .login-form {
        padding: 1.5rem 1.15rem;
        border-radius: 16px;
    }

    .login-form h2 {
        font-size: 18px;
        margin-bottom: 1.25rem;
    }

    .logo-login {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 14px !important;
    }
}

.ymaps3--search-control__input {
    font-size: 5px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.pagination__btn {
    position: relative;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination__btn img {
    width: 24px;
    height: 24px;
}

.pagination__info {
    font-size: 18px;
    color: #000;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader__content {
    position: relative;
    text-align: center;
}

.preloader__spinner {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #40C196;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preloader__logo {
    position: absolute;
    top: 18%;
    left: 22%;
    width: 50px;
    margin-bottom: 15px;
}

.preloader__text {
    color: #40C196;
    font-size: 18px;
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}



.new__like-btn.active,
.new__like-city-btn.active,
.new__like-source-btn.active {
    background-color: var(--color-green);
    transition: all .15s ease-in-out;
}

.new__like-btn.active:hover,
.new__like-city-btn.active:hover,
.new__like-source-btn.active:hover {
    background-color: var(--color-dark-green);
}

.new__like-btn.active img,
.new__like-city-btn.active img,
.new__like-source-btn.active img {
    filter: brightness(0) invert(1);
    transition: all .15s ease-in-out;
}

.new__like-btn.active:hover img,
.new__like-city-btn.active:hover img,
.new__like-source-btn.active:hover img {
    filter: brightness(0) invert(1);
}

.new__like-btn.processing,
.new__like-city-btn.processing,
.new__like-source-btn.processing {
    opacity: 0.7;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.3)
    }

    100% {
        transform: scale(1)
    }
}

.new__like-btn.processing img,
.new__like-city-btn.processing img,
.new__like-source-btn.processing img {
    animation: pulse 1s infinite;
}

#content {
    max-width: 800px;
    margin: 20px auto;
}

.loading,
.empty,
.error {
    text-align: center;
    padding: 20px;
}

.news-item {
    display: flex;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.news-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
    flex-grow: 1;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 18px;
}

.favorite-btn.active {
    color: red;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: none;
}

/* Custom Vector SVG Map Styles */
.custom-map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: radial-gradient(circle at center, #1d5744 0%, #246b53 100%);
    overflow: hidden;
    user-select: none;
    touch-action: none;
}

body.dark-theme .custom-map-container {
    background: radial-gradient(circle at center, #10101d 0%, #242338 100%);
}

.custom-map-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.custom-map-group {
    transform-origin: 0 0;
    pointer-events: auto;
}

.custom-map-polygon {
    fill: rgba(255, 255, 255, 0.12);
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 2px;
    cursor: pointer;
    transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
    vector-effect: non-scaling-stroke;
}

.custom-map-polygon:hover {
    fill: rgba(64, 193, 150, 0.28);
    stroke: #40C196;
}

.custom-map-polygon.active {
    fill: rgba(64, 193, 150, 0.55);
    stroke: #40C196;
    stroke-width: 3px;
}

.custom-map-markers-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    transform-origin: 0 0;
    pointer-events: none;
}

.custom-svg-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 10;
}

/* Custom Map Zoom Controls */
.custom-map-controls {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.custom-map-btn {
    width: 42px;
    height: 42px;
    background: rgba(30, 36, 48, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.custom-map-btn:hover {
    background: #40C196;
    border-color: #40C196;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 193, 150, 0.5);
}

/* Drag handle for mobile bottom sheet */
.sheet-handle {
    display: none;
}

/* Responsive Mobile Layout (Bottom Sheet & Overlay Map) */
@media (max-width: 992px) {

    body:has(.login-container),
    html:has(.login-container) {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    body:has(.login-container) #app {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
    }

    .login-container {
        height: auto !important;
        min-height: 100vh !important;
        min-height: 100dvh !important;
        overflow: visible !important;
        align-items: flex-start;
    }

    .login-cont,
    .login-form {
        overflow: visible !important;
    }

    #app {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 1 !important;
    }

    /* Floating Header on Mobile */
    .header {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 100 !important;
        gap: 10px !important;
    }

    body:has(.main.expanded) .header {
        z-index: 20 !important;
    }

    .header__user {
        padding: 8px 14px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        gap: 8px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    .header__user-img {
        width: 18px !important;
    }

    .menu__bar {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }

    .menu__ul {
        top: 55px !important;
        right: 0 !important;
        min-width: 250px !important;
        max-width: min(320px, calc(100vw - 30px)) !important;
        max-height: calc(100vh - 80px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 12px 14px !important;
        gap: 4px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    }

    /* Submenus open UNDERNEATH (снизу) instead of to the left on mobile */
    .menu__ul_anoth {
        display: none !important;
        position: static !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        opacity: 0 !important;
        visibility: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background-color: var(--color-gray-f7) !important;
        border-radius: 12px !important;
        transform: translateY(-6px) !important;
    }

    .menu__ul_anoth.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin: 4px 0 6px 0 !important;
        padding: 6px 8px !important;
        transform: translateY(0) !important;
        animation: mobileSubmenuSlideDown 0.2s cubic-bezier(0.2, 0.9, 0.3, 1) forwards !important;
    }

    @keyframes mobileSubmenuSlideDown {
        from {
            opacity: 0;
            transform: translateY(-6px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #settings_menu,
    #contact_menu,
    #liked_menu {
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    body.dark-theme .menu__ul_anoth,
    body.dark-theme .menu__ul_anoth.active {
        background-color: #141924 !important;
        box-shadow: none !important;
        border: none !important;
    }

    .menu_ul_li.active {
        background-color: var(--color-gray-f7) !important;
    }

    body.dark-theme .menu_ul_li.active {
        background-color: rgba(255, 255, 255, 0.08) !important;
    }

    .menu__ul_anoth .menu_ul_li {
        padding: 6px 10px !important;
        gap: 12px !important;
        border-radius: 10px !important;
    }

    .menu__ul_anoth .menu_ul_li:active,
    .menu__ul_anoth .menu_ul_li:hover {
        background-color: rgba(0, 0, 0, 0.04) !important;
    }

    body.dark-theme .menu__ul_anoth .menu_ul_li:active,
    body.dark-theme .menu__ul_anoth .menu_ul_li:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }

    .menu__ul_anoth .menu__ul_li-img_container {
        width: 28px !important;
        height: 28px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
    }

    .menu__ul_anoth .menu__ul_li-img {
        height: 14px !important;
    }

    .menu__ul_anoth .menu__ul_li-text {
        font-size: 13.5px !important;
    }

    .menu__ul_anoth .menu_ul_li--setting {
        padding: 6px 8px !important;
        gap: 10px !important;
    }

    /* Bottom Sheet Container (.main) */
    .sheet-handle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 32px !important;
        margin: -6px auto 6px auto !important;
        cursor: grab !important;
        flex-shrink: 0 !important;
        touch-action: none !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        background-color: transparent !important;
        position: relative !important;
    }

    .sheet-handle::before {
        content: '' !important;
        display: block !important;
        width: 44px !important;
        height: 5px !important;
        background-color: var(--color-gray-dc) !important;
        border-radius: 10px !important;
        transition: width 0.2s ease, background-color 0.2s ease, transform 0.2s ease !important;
        pointer-events: none !important;
    }

    .sheet-handle.dragging,
    .sheet-handle:active {
        cursor: grabbing !important;
    }

    .sheet-handle.dragging::before,
    .sheet-handle:active::before {
        background-color: var(--color-green) !important;
        width: 54px !important;
        transform: scaleY(1.2) !important;
    }

    .main {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 10px 14px 30px 14px !important;
        border-radius: 28px 28px 0 0 !important;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3) !important;
        z-index: 50 !important;
        transition: height 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
        background-color: var(--color-white) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 18px !important;
    }

    .main.expanded {
        height: 100dvh !important;
        border-radius: 0 !important;
        z-index: 200 !important;
        top: 0 !important;
        padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
    }

    @supports not (height: 100dvh) {
        .main.expanded {
            height: 100vh !important;
            border-radius: 0 !important;
            z-index: 200 !important;
            top: 0 !important;
            padding-top: max(14px, env(safe-area-inset-top, 14px)) !important;
        }
    }

    /* Floating Weather & Logo over Map (Positioned right above bottom sheet) */
    .footer {
        position: fixed !important;
        top: auto !important;
        bottom: calc(50vh + 12px) !important;
        left: 12px !important;
        right: 12px !important;
        width: calc(100% - 24px) !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        z-index: 60 !important;
        pointer-events: none !important;
        margin: 0 !important;
        transition: bottom 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.25s ease, transform 0.25s ease !important;
    }

    .main.expanded~.footer {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(20px) !important;
    }

    .footer>* {
        pointer-events: auto !important;
        padding: 8px 14px !important;
        border-radius: 14px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
        background-color: var(--color-white) !important;
    }

    .logo__text,
    .weather__info {
        font-size: 15px !important;
    }

    .logo__img,
    .weather__img {
        height: 20px !important;
    }

    /* Sliders & Sections Formatting */
    .slider-section,
    .news {
        width: 100% !important;
        max-width: 100% !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .slider__top {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        box-sizing: border-box !important;
    }

    .slider__title {
        font-size: 20px !important;
    }

    .slider__favorite-button {
        height: 30px !important;
        padding: 4px 10px !important;
        font-size: 12px !important;
        gap: 6px !important;
    }

    .slider__favorite-img {
        height: 13px !important;
    }

    .slider__bottom {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    .slider-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 6px 40px !important;
        box-sizing: border-box !important;
    }

    .slides {
        height: 38px !important;
    }

    .slide {
        padding: 5px 10px !important;
        border-radius: 10px !important;
    }

    .slide-img {
        width: 22px !important;
        height: 22px !important;
    }

    .slide-text {
        font-size: 14px !important;
    }

    .btn-slide {
        width: 32px !important;
        height: 32px !important;
        border-radius: 10px !important;
    }

    .prev-btn {
        top: 5px !important;
        left: 5px !important;
    }

    .next-btn {
        top: 5px !important;
        right: 5px !important;
    }

    /* Events Filter on Mobile */
    .events-filter-toggle {
        height: 30px !important;
        padding: 4px 10px !important;
        font-size: 13px !important;
        gap: 6px !important;
    }

    .events-filter-box {
        padding: 12px 14px !important;
        border-radius: 16px !important;
    }

    .events-filter-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .events-filter-select {
        height: 32px !important;
        font-size: 13px !important;
        padding: 0 28px 0 10px !important;
    }

    .events-filter-dates-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    /* Date Filter Inputs in Events Section */
    .date-input_cont {
        gap: 4px !important;
        font-size: 13px !important;
        flex-wrap: wrap !important;
    }

    .date-input_container {
        padding: 0 6px !important;
        font-size: 13px !important;
        height: 30px !important;
    }

    .date-input {
        font-size: 12px !important;
        width: 95px !important;
    }

    .date-input_container::after {
        width: 13px !important;
        height: 13px !important;
        right: 4px !important;
    }

    /* News Cards List - 2 Columns on Mobile */
    .news_container {
        width: 100% !important;
        max-width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 8px !important;
        border-radius: 18px !important;
        margin-top: 10px !important;
        box-sizing: border-box !important;
    }

    .new__item {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 8px !important;
        gap: 8px !important;
        border-radius: 14px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .new__item-left {
        width: 100% !important;
        max-width: 100% !important;
        height: 110px !important;
        box-sizing: border-box !important;
    }

    .new__item-img {
        width: 100% !important;
        max-width: 100% !important;
        height: 110px !important;
        object-fit: cover !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    .new__comment-btn {
        position: absolute !important;
        bottom: 4px !important;
        left: 4px !important;
        top: auto !important;
        width: 22px !important;
        height: 22px !important;
        padding: 4px !important;
        border-radius: 8px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12) !important;
        z-index: 2 !important;
    }

    .new__like-btn {
        position: absolute !important;
        top: 4px !important;
        left: 4px !important;
        bottom: auto !important;
        width: 22px !important;
        height: 22px !important;
        padding: 4px !important;
        border-radius: 8px !important;
        z-index: 2 !important;
    }

    .new-time-container {
        top: 4px !important;
        right: 4px !important;
    }

    .new-time {
        font-size: 10px !important;
        height: 22px !important;
        padding: 0 5px !important;
    }

    .new-city-container {
        bottom: 4px !important;
        right: 4px !important;
        padding: 2px 5px !important;
    }

    .new-city-title {
        font-size: 10px !important;
    }

    .new-city-img {
        width: 13px !important;
        height: 13px !important;
    }

    .new__item-right {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .new__title {
        font-size: 12px !important;
        line-height: 1.25 !important;
        font-weight: 600 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        word-break: break-word !important;
    }

    .new__text {
        font-size: 11px !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        color: var(--color-gray-a6) !important;
        word-break: break-word !important;
    }

    .new__bottom {
        margin-top: 6px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .new-source-container {
        padding: 2px 5px !important;
        max-width: calc(100% - 32px) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        order: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
        box-sizing: border-box !important;
    }

    .new-source-img {
        width: 13px !important;
        height: 13px !important;
        flex-shrink: 0 !important;
    }

    .new-source-title {
        font-size: 10px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
    }

    .new__like-source-btn {
        width: 18px !important;
        height: 18px !important;
        padding: 3.5px !important;
        flex-shrink: 0 !important;
        border-radius: 5px !important;
    }

    .new__bottom__right {
        display: contents !important;
    }

    .share-btn {
        width: 24px !important;
        height: 20px !important;
        min-width: 24px !important;
        max-width: 24px !important;
        min-height: 20px !important;
        max-height: 20px !important;
        padding: 4px 6px !important;
        border-radius: 8px !important;
        order: 2 !important;
        flex-shrink: 0 !important;
        box-sizing: border-box !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .share-img {
        height: 12px !important;
        width: 12px !important;
        max-height: 12px !important;
        max-width: 12px !important;
        object-fit: contain !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    .open-new {
        order: 3 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        padding: 6px 0 !important;
        border-radius: 8px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        margin-top: 2px !important;
    }

    /* Custom Map Zoom Controls Position on Mobile */
    .custom-map-controls {
        top: 15px !important;
        left: 15px !important;
        right: auto !important;
        z-index: 80 !important;
    }

    .custom-map-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
        border-radius: 12px !important;
    }

    /* Mobile District Markers and Degree Numbers on Map */
    .marker {
        padding: 1.5px 3.5px !important;
        border-radius: 5px !important;
        gap: 2.5px !important;
    }

    .marker-img {
        width: 10px !important;
        height: 10px !important;
        border-radius: 2px !important;
    }

    .marker-text {
        font-size: 7.5px !important;
        font-weight: 500 !important;
    }

    .district-polygon-temp {
        font-size: 3px !important;
    }
}

.rate-limit-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -28px) scale(0.94);
    opacity: 0;
    pointer-events: none;
    z-index: 99999;
    width: calc(100vw - 32px);
    max-width: 440px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.28);
    overflow: hidden;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    font-family: "Montserrat", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.rate-limit-toast.active {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.rate-limit-toast.closing {
    transform: translate(-50%, -24px) scale(0.96);
    opacity: 0;
    pointer-events: none;
}

.rate-limit-toast__content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px 14px 16px;
    position: relative;
}

.rate-limit-toast__icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.rate-limit-toast.success .rate-limit-toast__icon-wrap {
    background: #059669;
}

.rate-limit-toast__icon {
    width: 20px;
    height: 20px;
}

.rate-limit-toast__text-wrap {
    flex: 1;
    min-width: 0;
}

.rate-limit-toast__title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 4px;
}

.rate-limit-toast__message {
    font-size: 13px;
    line-height: 1.35;
    color: #475569;
    margin-bottom: 8px;
    word-break: break-word;
}

.rate-limit-toast__timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #d97706;
    background: rgba(245, 158, 11, 0.12);
    padding: 3px 9px;
    border-radius: 8px;
    transition: color 0.3s ease, background 0.3s ease;
}

.rate-limit-toast.success .rate-limit-toast__timer-badge {
    color: #059669;
    background: rgba(16, 185, 129, 0.14);
}

.rate-limit-toast__seconds {
    font-weight: 800;
}

.rate-limit-toast__close {
    background: none;
    border: none;
    padding: 4px;
    margin-top: -2px;
    margin-right: -4px;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.rate-limit-toast__close:hover {
    color: #334155;
    background-color: rgba(0, 0, 0, 0.06);
}

.rate-limit-toast__progress-track {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.rate-limit-toast__progress-bar {
    height: 100%;
    width: 100%;
    background: #f59e0b;
    border-radius: 2px;
}

.rate-limit-toast.success .rate-limit-toast__progress-bar {
    background: #059669;
    width: 100% !important;
}

/* Dark Theme Overrides */
body.dark-theme .rate-limit-toast,
html.dark-theme .rate-limit-toast {
    background: rgba(20, 26, 38, 0.95);
    color: #f1f5f9;
}

body.dark-theme .rate-limit-toast__title,
html.dark-theme .rate-limit-toast__title {
    color: #f8fafc;
}

body.dark-theme .rate-limit-toast__message,
html.dark-theme .rate-limit-toast__message {
    color: #94a3b8;
}

body.dark-theme .rate-limit-toast__timer-badge,
html.dark-theme .rate-limit-toast__timer-badge {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.2);
}

body.dark-theme .rate-limit-toast.success .rate-limit-toast__timer-badge,
html.dark-theme .rate-limit-toast.success .rate-limit-toast__timer-badge {
    color: #34d399;
    background: rgba(16, 185, 129, 0.2);
}

body.dark-theme .rate-limit-toast__close,
html.dark-theme .rate-limit-toast__close {
    color: #64748b;
}

body.dark-theme .rate-limit-toast__close:hover,
html.dark-theme .rate-limit-toast__close:hover {
    color: #f1f5f9;
    background-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .rate-limit-toast__progress-track,
html.dark-theme .rate-limit-toast__progress-track {
    background: rgba(255, 255, 255, 0.06);
}

/* ========================================================
   FAVORITES MODAL (ИЗБРАННОЕ: СОБЫТИЯ, ИСТОЧНИКИ, РЕГИОНЫ)
   ======================================================== */
.favorites-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 14, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.favorites-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.favorites-modal {
    width: 100%;
    max-width: 860px;
    max-height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    border: none !important;
    overflow: hidden;
    transform: scale(0.95) translateY(14px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.favorites-modal,
.favorites-modal *,
.favorites-modal button,
.favorites-modal input,
.favorites-modal p,
.favorites-modal span,
.favorites-modal h2 {
    font-family: "Montserrat", sans-serif !important;
}

.favorites-modal-overlay.active .favorites-modal {
    transform: scale(1) translateY(0);
}

.favorites-modal__header {
    padding: 24px 28px 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: none !important;
    border-bottom: none !important;
    flex-shrink: 0;
}

.favorites-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.25;
}

.favorites-modal__close-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--color-gray-f7);
    border: none !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all .15s ease-in-out;
    flex-shrink: 0;
}

.favorites-modal__close-btn:hover {
    background: var(--color-gray-ec);
    color: #0f172a;
}

.favorites-modal__tabs {
    display: flex;
    gap: 8px;
    padding: 6px 28px 14px 28px;
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
    flex-shrink: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.favorites-modal__tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 12px;
    border: none !important;
    background: var(--color-gray-f7);
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    user-select: none;
    box-shadow: none !important;
}

.favorites-modal__tab:hover {
    background: var(--color-gray-ec);
    color: #1e293b;
    box-shadow: none !important;
}

.favorites-modal__tab.active {
    background: var(--color-green) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.favorites-modal__tab-icon {
    width: 16px;
    height: 16px;
    transition: filter 0.18s ease;
}

.favorites-modal__tab.active .favorites-modal__tab-icon {
    filter: brightness(0) invert(1);
}

.favorites-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 28px 28px 28px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.favorites-modal__body::-webkit-scrollbar {
    width: 8px;
}

.favorites-modal__body::-webkit-scrollbar-thumb {
    background: var(--color-gray-dc);
    border-radius: 10px;
}

.favorites-modal__list.news_container {
    margin-top: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    gap: 16px !important;
    box-shadow: none !important;
    border: none !important;
}

.favorites-modal .new__item {
    border: none !important;
}

.new__item-img--contain {
    object-fit: contain !important;
    background-color: var(--color-gray-f7) !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.favorites-modal__loading,
.favorites-modal__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 14px;
}

.favorites-modal__spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid rgba(64, 193, 150, 0.2);
    border-top-color: var(--color-green);
    border-radius: 50%;
    animation: favSpinner 0.8s linear infinite;
}

@keyframes favSpinner {
    to {
        transform: rotate(360deg);
    }
}

.favorites-modal__loading p {
    font-size: 15px;
    color: var(--color-gray-a6);
    font-weight: 500;
}

.favorites-modal__empty-text {
    font-size: 15px;
    color: var(--color-gray-a6);
    max-width: 380px;
    line-height: 1.45;
}

/* Dark Theme Overrides for Favorites Modal */
body.dark-theme .favorites-modal {
    background: #141822 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.75) !important;
    border: none !important;
}

body.dark-theme .favorites-modal__header {
    border: none !important;
    border-bottom: none !important;
}

body.dark-theme .favorites-modal__title {
    color: #f8fafc !important;
}

body.dark-theme .favorites-modal__close-btn {
    background: #1c2230 !important;
    color: #94a3b8 !important;
    border: none !important;
}

body.dark-theme .favorites-modal__close-btn:hover {
    background: #252e42 !important;
    color: #ffffff !important;
}

body.dark-theme .favorites-modal__tabs {
    background: transparent !important;
    border: none !important;
    border-bottom: none !important;
}

body.dark-theme .favorites-modal__tab {
    background: #1c2230 !important;
    color: #94a3b8 !important;
    border: none !important;
    box-shadow: none !important;
}

body.dark-theme .favorites-modal__tab:hover {
    background: #252e42 !important;
    color: #f1f5f9 !important;
    box-shadow: none !important;
}

body.dark-theme .favorites-modal__tab.active {
    background: var(--color-green) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.dark-theme .favorites-modal__body::-webkit-scrollbar-thumb {
    background: #2d3748 !important;
}

body.dark-theme .favorites-modal .new__item {
    background-color: #1c2230 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    border: none !important;
}

body.dark-theme .favorites-modal .new__title {
    color: #ffffff !important;
}

body.dark-theme .favorites-modal .new__like-btn {
    background-color: #252e42 !important;
}

body.dark-theme .favorites-modal .new-time,
body.dark-theme .favorites-modal .new-city-container,
body.dark-theme .favorites-modal .new-source-container {
    background-color: #252e42 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .new__item-img--contain {
    background-color: #161b26 !important;
}

/* Mobile responsive layout for favorites modal */
@media (max-width: 992px) {
    .favorites-modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .favorites-modal {
        border-radius: 24px 24px 0 0 !important;
        max-height: 90dvh !important;
        height: auto !important;
        transform: translateY(100%) !important;
        border: none !important;
    }

    .favorites-modal-overlay.active .favorites-modal {
        transform: translateY(0) !important;
    }

    .favorites-modal__header {
        padding: 18px 20px 10px 20px !important;
        border: none !important;
        border-bottom: none !important;
    }

    .favorites-modal__title {
        font-size: 18px !important;
    }

    .favorites-modal__tabs {
        padding: 6px 18px 12px 18px !important;
        gap: 6px !important;
        border: none !important;
        border-bottom: none !important;
    }

    .favorites-modal__tab {
        padding: 6px 14px !important;
        font-size: 13px !important;
        border: none !important;
        box-shadow: none !important;
    }

    .favorites-modal__body {
        padding: 12px 14px 24px 14px !important;
    }

    .favorites-modal__list.news_container {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        border: none !important;
    }
}