/* ===== Bottom nav, footer, search modal ===== */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(13, 4, 21, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(188, 19, 254, 0.28);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.45);
    z-index: 900;
    padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
}

.bottom-nav__menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--site-frame, 1040px);
    margin: 0 auto;
    box-sizing: border-box;
}

.bottom-nav__line {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    box-sizing: border-box;
    padding: 6px 8px 8px;
    gap: 4px;
}

.bottom-nav__line--single {
    min-height: 54px;
    align-items: center;
}

.bottom-nav__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    animation: bottom-nav-live-pulse 1.6s ease-in-out infinite;
}

@keyframes bottom-nav-live-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
}

.bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
    gap: 3px;
    padding: 6px 2px;
    border-radius: 10px;
    box-sizing: border-box;
}

.bottom-nav__item i {
    font-size: 21px;
    line-height: 1;
    flex-shrink: 0;
}

.bottom-nav__item span {
    display: block;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav__item--live {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(255, 51, 85, 0.92), rgba(188, 19, 254, 0.88));
    border-radius: 14px;
    margin-left: 2px;
    box-shadow: 0 4px 16px rgba(255, 51, 85, 0.32);
}

.bottom-nav__item--live:hover,
.bottom-nav__item--live.is-active {
    color: #fff !important;
    filter: brightness(1.06);
}

.bottom-nav__item--live .bottom-nav__live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    animation: bottom-nav-live-pulse 1.6s ease-in-out infinite;
}

.bottom-nav__item--live span:last-child {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bottom-nav__item--telegram {
    color: #7dd3fc !important;
}

.bottom-nav__item--telegram:hover,
.bottom-nav__item--telegram:active,
.bottom-nav__item--telegram.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.55), rgba(14, 165, 233, 0.45));
}

.bottom-nav__item--cabinet {
    color: #e9d5ff !important;
}

.bottom-nav__item--cabinet:hover,
.bottom-nav__item--cabinet.is-active {
    color: #fff !important;
    background: rgba(124, 77, 255, 0.22);
}

.bottom-nav__item--telegram.is-active i {
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
}

.bottom-nav__item:hover,
.bottom-nav__item:active,
.bottom-nav__item.is-active {
    color: #fff;
}

.bottom-nav__item.is-active {
    color: var(--accent, #bc13fe);
}

.bottom-nav__item.is-active i {
    text-shadow: 0 0 12px rgba(188, 19, 254, 0.45);
}

.bottom-nav__badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 24px);
    background: #fff;
    color: #5a2ea6;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

/* ── Footer ── */
.main-footer {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    background:
        radial-gradient(ellipse 80% 120% at 50% -20%, rgba(188, 19, 254, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(14, 5, 24, 0.98) 0%, rgba(6, 2, 12, 1) 100%);
    border-top: 1px solid rgba(188, 19, 254, 0.18);
    padding: 20px 0 18px;
    color: rgba(255, 255, 255, 0.62);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.footer-container {
    max-width: var(--site-frame, 1040px);
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 20px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-bar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 1 auto;
}

.footer-bar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.footer-bar__mark {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.footer-bar__mark span {
    color: var(--accent, #bc13fe);
}

.footer-bar__logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-left: 10px;
    border-left: 1px solid rgba(188, 19, 254, 0.2);
}

.footer-bar__logo-main {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -0.01em;
}

.footer-bar__logo-sub {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(196, 181, 214, 0.65);
}

.footer-bar__age {
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 61, 0, 0.55);
    color: #ff8a65;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.footer-bar__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 4px;
    flex: 1 1 320px;
    min-width: 0;
}

.footer-bar__links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.footer-bar__links a:hover {
    color: #fff;
    background: rgba(188, 19, 254, 0.14);
}

.footer-bar__locale {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: 0;
}

.site-selector {
    width: 100%;
    min-width: 148px;
    max-width: 168px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(188, 19, 254, 0.22);
    background: rgba(8, 3, 14, 0.72);
    color: #f2ebff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}

.site-selector:focus {
    border-color: rgba(188, 19, 254, 0.45);
    box-shadow: 0 0 0 3px rgba(188, 19, 254, 0.12);
}

.footer-copyright {
    text-align: center;
    margin-top: 14px;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.42);
}

/* ── Search modal ── */
.filter-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-bottom: calc(16px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

.filter-modal.is-open {
    display: flex;
}

.filter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 2, 10, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filter-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: min(calc(100dvh - 32px), calc(100vh - 32px));
    display: flex;
    flex-direction: column;
    background: #150a21;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(188, 19, 254, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(188, 19, 254, 0.15);
}

.filter-head {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.filter-head h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.filter-close {
    background: rgba(255, 255, 255, 0.05);
    border: 0;
    color: #fff;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.filter-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.filter-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-form input,
.filter-form select {
    width: 100%;
    padding: 10px 12px;
    background: #201133;
    border: 1px solid rgba(188, 19, 254, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.filter-form select option {
    background: #1c0d2b;
    color: #fff;
}

.filter-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--accent, #bc13fe);
    box-shadow: 0 0 10px rgba(188, 19, 254, 0.3);
    background: #25143a;
}

.grid-2,
.age-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.field-group label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
    letter-spacing: 0.04em;
}

.filter-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(188, 19, 254, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
}

.filter-check-label.is-disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.filter-check-label input {
    width: auto;
    margin-top: 3px;
    accent-color: var(--accent, #bc13fe);
}

.filter-check-label em.filter-verify-hint {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
}

.filter-online-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.45;
}

.filter-online-note a {
    color: #00e676;
    font-weight: 800;
    text-decoration: none;
}

#filter_purpose:disabled {
    opacity: 0.65;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-shrink: 0;
}

.btn-ui {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
    box-sizing: border-box;
}

.btn-ui:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #bc13fe, #7a0cb5);
    color: #fff;
    box-shadow: 0 4px 12px rgba(188, 19, 254, 0.3);
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1199px) {
    .bottom-nav {
        display: block;
    }

    .main-footer {
        align-self: stretch;
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: max(0px, env(safe-area-inset-left, 0px));
        padding-right: max(0px, env(safe-area-inset-right, 0px));
        scroll-margin-bottom: calc(var(--bottom-nav-h, 65px) + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    }

    .footer-container {
        width: 100%;
        max-width: 100%;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 900px) {
    .footer-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px 14px;
    }

    .footer-bar__brand {
        justify-content: center;
    }

    .footer-bar__links {
        flex-basis: auto;
    }

    .footer-bar__locale {
        justify-content: center;
    }

    .site-selector {
        max-width: 220px;
    }
}

@media (max-width: 420px) {
    .bottom-nav__line {
        padding: 5px 6px 7px;
        gap: 2px;
    }

    .bottom-nav__line--single {
        min-height: 50px;
    }

    .bottom-nav__item {
        padding: 5px 1px;
        gap: 2px;
    }

    .bottom-nav__item i {
        font-size: 19px;
    }

    .bottom-nav__item span {
        font-size: 8px;
    }

    .bottom-nav__item--live {
        border-radius: 12px;
    }

    .mobile-grid-2 {
        grid-template-columns: 1fr 1fr !important;
    }

    .filter-content {
        border-radius: 16px;
        max-height: calc(100dvh - 24px);
    }

    .filter-form {
        gap: 10px;
        padding: 12px;
    }

    .filter-form input,
    .filter-form select {
        padding: 8px 10px;
        font-size: 13px;
    }

    .footer-bar__links a {
        font-size: 11px;
        min-height: 30px;
        padding: 4px 9px;
    }
}
