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

html,
body {
    min-height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #f4f7fb;
    background: #0a1018;
}

.page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 20px 40px;
    background:
        linear-gradient(180deg, rgba(8, 14, 24, 0.72) 0%, rgba(8, 14, 24, 0.88) 42%, rgba(8, 14, 24, 0.95) 100%),
        url('../images/gas.png') center / cover no-repeat fixed;
}

.page::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 420px at 12% -5%, rgba(56, 189, 248, 0.16), transparent 60%),
        radial-gradient(700px 360px at 88% 8%, rgba(74, 222, 128, 0.12), transparent 55%);
    z-index: 0;
}

.site-header,
.map-page,
.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.site-header__logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

.site-header__titles {
    min-width: 0;
}

.site-header__title {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
}

.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(41, 168, 225, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.24);
    transition: background 0.2s ease, transform 0.2s ease;
}

.telegram-link:hover {
    background: rgba(51, 178, 235, 0.95);
    transform: translateY(-1px);
}

.map-page__lead {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 18px;
    max-width: 760px;
}

.map-page__error {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.map-page__error code {
    font-size: 12px;
    color: #fee2e2;
}

.stations-board {
    padding: 18px;
    border-radius: 22px;
    background: rgba(12, 18, 30, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.stations-board__map-wrap {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    background: #dbe4ef;
}

.stations-board__map {
    width: 100%;
    height: 420px;
    min-height: 420px;
    background: #dbe4ef;
}

.stations-board__map .leaflet-container {
    width: 100%;
    height: 100%;
    min-height: 420px;
    font-family: 'Montserrat', sans-serif;
}

.stations-board__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stations-board__filters {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 10px;
}

.stations-board__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 14px;
}

.stations-board__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.fuel-filter,
.mo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mo-filter {
    flex: 1 1 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stations__select,
.stations__search {
    flex: 1 1 200px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.fuel-filter__btn,
.mo-filter__btn {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.fuel-filter__btn:hover,
.mo-filter__btn:hover {
    border-color: rgba(125, 211, 252, 0.65);
    color: #fff;
}

.fuel-filter__btn--active {
    background: #4ade80;
    border-color: #4ade80;
    color: #0b3d1e;
}

.mo-filter__btn--active {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0c2d48;
}

.stations__select:focus,
.stations__search:focus {
    border-color: rgba(125, 211, 252, 0.65);
    background: rgba(0, 0, 0, 0.36);
}

.stations__select option {
    color: #111;
    background: #fff;
}

.stations__search::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot--available {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.legend-dot--absent {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

.stations__count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
}

.mo-group {
    margin-bottom: 22px;
}

.mo-group:last-child {
    margin-bottom: 0;
}

.mo-group__title {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 9px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-left: 3px solid rgba(125, 211, 252, 0.75);
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mo-group__title:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mo-group__title:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.9);
    outline-offset: 2px;
}

.mo-group__title-text {
    min-width: 0;
}

.mo-group__chevron {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid rgba(255, 255, 255, 0.72);
    border-bottom: 2px solid rgba(255, 255, 255, 0.72);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

.mo-group--collapsed .mo-group__chevron {
    transform: rotate(-45deg);
}

.mo-group--collapsed .mo-group__list {
    display: none;
}

.mo-group--collapsed .mo-group__title {
    margin-bottom: 0;
}

.station-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px 20px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.station-card--clickable {
    cursor: pointer;
}

.station-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.station-card--clickable:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.9);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(125, 211, 252, 0.6);
}

.station-card__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
}

.station-card__address {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
}

.station-card__map-note {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.4;
    color: #fbbf24;
}

.station-card__fuel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.fuel-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.2;
    border: 1px solid transparent;
}

.fuel-badge__type {
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 12px;
}

.fuel-badge__status {
    font-weight: 400;
    opacity: 0.9;
}

.fuel-badge__extra {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
    text-align: center;
}

.fuel-badge--available {
    background: rgba(74, 222, 128, 0.14);
    border-color: rgba(74, 222, 128, 0.32);
    color: #bbf7d0;
}

.fuel-badge--absent {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.28);
    color: #fecaca;
}

.stations__empty,
.stations__loading {
    text-align: center;
    padding: 28px 16px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
}

.station-marker {
    background: transparent;
    border: none;
}

.station-marker__dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.station-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.station-popup .leaflet-popup-content {
    margin: 14px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    color: #1a1a1a;
}

.map-popup__mo {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    margin-bottom: 6px;
}

.map-popup__name {
    font-weight: 600;
    margin-bottom: 4px;
}

.map-popup__address {
    font-size: 12px;
    color: #555;
    margin-bottom: 10px;
}

.map-popup__fuels {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    padding: 0;
    margin: 0;
}

.map-popup__fuel {
    font-size: 12px;
}

.map-popup__fuel--available {
    color: #15803d;
}

.map-popup__fuel--absent {
    color: #b91c1c;
}

.leaflet-bottom.leaflet-right {
    display: none !important;
}

.site-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
}

.site-footer__credit {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.48);
}

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(12, 18, 30, 0.72);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
}

.scroll-top--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-top:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10002;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
}

.cookie-banner--hidden {
    transform: translateY(120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cookie-banner__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(12, 18, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.32);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.cookie-banner__text {
    flex: 1 1 220px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
}

.cookie-banner__accept {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(41, 168, 225, 0.85);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cookie-banner__accept:hover {
    background: rgba(51, 178, 235, 0.95);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .page {
        padding: 16px 14px 32px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header__actions {
        width: 100%;
        justify-content: space-between;
    }

    .stations-board {
        padding: 14px;
        border-radius: 18px;
    }

    .stations-board__map,
    .stations-board__map .leaflet-container {
        height: 300px;
        min-height: 300px;
    }

    .station-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .station-card__fuel {
        justify-content: flex-start;
    }

    .fuel-badge {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    .scroll-top {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
    }

    .cookie-banner__accept {
        width: 100%;
    }
}
