/* Неоновый киберпанк стиль */
@font-face {
    font-family: "AnonimkaRoboto";
    src: url("/webapp/fonts/roboto-900.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "AnonimkaWordmark";
    src: url("/webapp/fonts/dancing-script-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --neon-pink: #ff006e;
    --neon-cyan: #00d9ff;
    --neon-purple: #8338ec;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --border-glow: rgba(255, 0, 110, 0.3);
    --shadow-pink: 0 0 20px rgba(255, 0, 110, 0.4);
    --shadow-cyan: 0 0 20px rgba(0, 217, 255, 0.4);
    --chat-vk-bottom-inset: 0px;
    --chat-input-height: 56px;
    --chat-input-float-gap: 10px;
    --chat-input-side-gap: 12px;
    --chat-header-height: 92px;
    --chat-viewport-top-inset: 0px;
    --chat-visual-height: 100%;
    --device-safe-area-top: env(safe-area-inset-top, 0px);
    --telegram-safe-area-top: 0px;
    --telegram-main-controls-top: 0px;
    --safe-area-top: max(var(--device-safe-area-top), var(--telegram-safe-area-top));
    --chat-safe-bottom-extra: env(safe-area-inset-bottom, 0px);
    --main-menu-flow-duration: 5.4s;
    --main-menu-breathe-duration: 6.6s;
    --main-menu-bg-flow-duration: 6.8s;
}

/* ===== Прелоадер при загрузке приложения ===== */
.app-preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 43%, rgba(104, 63, 148, 0.14) 0, rgba(25, 18, 52, 0.06) 27%, transparent 50%),
        radial-gradient(ellipse at 50% 112%, rgba(101, 48, 126, 0.11) 0, transparent 48%),
        linear-gradient(180deg, #090a1b 0%, #060714 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(var(--safe-area-top), 18px)
        16px
        max(var(--chat-safe-bottom-extra), 18px);
    box-sizing: border-box;
    z-index: 9999999; /* Поверх защиты Vercel */
    transition: opacity 0.32s ease, visibility 0.32s ease;
}

.app-preloader::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(82vw, 680px);
    aspect-ratio: 1;
    border: 1px solid rgba(179, 135, 204, 0.035);
    border-radius: 50%;
    box-shadow:
        0 0 0 72px rgba(132, 90, 166, 0.015),
        0 0 0 144px rgba(132, 90, 166, 0.01);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.app-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 310px);
    padding: 28px 24px 24px;
    gap: 0;
    border: 1px solid rgba(186, 140, 208, 0.13);
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(17, 17, 39, 0.92), rgba(9, 10, 27, 0.82));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 24px 68px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
    text-align: center;
    position: relative;
    z-index: 1;
}

.preloader-logo {
    position: relative;
    width: 76px;
    height: 76px;
}

.preloader-logo-ball {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(72, 42, 116, 0.92), rgba(12, 12, 34, 0.98) 72%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.preloader-logo-img {
    position: absolute;
    inset: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
}

.preloader-brand {
    margin: 12px 0 0;
    color: rgba(250, 248, 253, 0.96);
    font-family: "AnonimkaRoboto", "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.preloader-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 17px;
    padding: 9px 13px;
    gap: 10px;
    border: 1px solid rgba(157, 127, 191, 0.15);
    border-radius: 14px;
    background: rgba(11, 12, 31, 0.66);
    box-sizing: border-box;
}

.preloader-spinner {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(171, 136, 207, 0.2);
    border-top-color: #d86fa8;
    border-right-color: rgba(128, 191, 218, 0.68);
    border-radius: 50%;
    box-sizing: border-box;
    animation: preloaderSpin 0.8s linear infinite;
}

@keyframes preloaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preloader-text {
    min-width: 0;
    color: rgba(226, 220, 233, 0.68);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    margin: 0;
    padding: 0;
}

@media (max-width: 350px) {
    .preloader-content {
        width: min(100%, 286px);
        padding: 24px 20px 20px;
        border-radius: 21px;
    }

    .preloader-logo,
    .preloader-logo-img {
        width: 70px;
        height: 70px;
    }

    .preloader-brand {
        font-size: 21px;
    }

    .preloader-text {
        font-size: 12px;
    }
}

/* Keep the automatic-location composition authoritative after the shared
   product-screen spacing rules above. */
#autoLocationDetection > .header {
    min-height: 0 !important;
    margin: 0 !important;
    padding: calc(16px + var(--safe-area-top)) 14px 6px !important;
}

#autoLocationDetection .auto-location-container {
    width: min(100%, 388px) !important;
    max-width: 388px !important;
    margin: 0 auto !important;
    padding: 8px 14px 18px !important;
}

@media (max-width: 380px) {
    #autoLocationDetection > .header {
        padding-top: calc(12px + var(--safe-area-top)) !important;
    }

    #autoLocationDetection .auto-location-container {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-preloader,
    .preloader-logo-img {
        transition: none;
    }

    .preloader-spinner {
        animation-duration: 1.4s;
    }
}

/* ===== Desktop age confirmation: compact system dialog ===== */
body[data-age-modal-visible="1"] {
    overflow: hidden;
}

#ageGateModal.age-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
    padding:
        max(env(safe-area-inset-top, 0px), 14px)
        14px
        max(env(safe-area-inset-bottom, 0px), 14px);
    overflow: auto;
    background:
        radial-gradient(circle at 50% 43%, rgba(93, 52, 126, 0.11) 0, transparent 42%),
        rgba(4, 5, 16, 0.91);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-sizing: border-box;
    text-align: center;
}

#ageGateModal .age-gate-card {
    position: relative;
    isolation: isolate;
    width: min(100%, 368px);
    max-height: calc(100dvh - 28px);
    padding: 25px 23px 21px;
    overflow: auto;
    border: 1px solid rgba(183, 124, 180, 0.19);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(118, 55, 113, 0.13), transparent 38%),
        linear-gradient(155deg, rgba(19, 18, 42, 0.98), rgba(10, 11, 29, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 26px 70px rgba(0, 0, 0, 0.44);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(194, 112, 173, 0.35) transparent;
}

#ageGateModal .age-gate-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 13px;
    border: 1px solid rgba(211, 132, 188, 0.18);
    border-radius: 18px;
    background: rgba(47, 28, 66, 0.66);
    color: #dfa1ce;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 12px 28px rgba(0, 0, 0, 0.2);
}

#ageGateModal .age-gate-mark svg {
    display: block;
    width: 43px;
    height: 43px;
    overflow: visible;
}

#ageGateModal .age-gate-shield {
    fill: rgba(209, 119, 183, 0.05);
    stroke: currentColor;
    stroke-width: 1.55;
}

#ageGateModal .age-gate-shield-detail {
    fill: none;
    stroke: rgba(176, 141, 205, 0.4);
    stroke-width: 0.85;
}

#ageGateModal .age-gate-mark text {
    fill: currentColor;
    font-family: "AnonimkaRoboto", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.7px;
}

#ageGateModal .age-gate-copy {
    position: relative;
    z-index: 1;
}

#ageGateModal #ageGateTitle {
    margin: 0;
    color: rgba(250, 248, 253, 0.97);
    font-family: "AnonimkaRoboto", "Segoe UI", sans-serif;
    font-size: 23px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

#ageGateModal #ageGateDesc {
    margin: 12px auto 0;
    max-width: 305px;
    color: rgba(221, 216, 228, 0.64);
    font-size: 13px;
    font-weight: 450;
    line-height: 1.48;
}

#ageGateModal #ageGateDesc br {
    display: block;
    content: "";
    margin-top: 7px;
}

#ageGateModal #ageGateDesc strong {
    color: rgba(239, 210, 229, 0.88);
    font-weight: 750;
}

#ageGateModal .age-gate-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 20px;
}

#ageGateModal .age-gate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: rgba(246, 241, 248, 0.94);
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    box-sizing: border-box;
    cursor: pointer;
    transition:
        transform 0.14s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}

#ageGateModal .age-gate-button .ui-symbol-icon,
#ageGateModal .age-gate-button [data-product-icon] {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin: 0;
}

#ageGateModal .age-gate-button--confirm {
    border-color: rgba(216, 116, 180, 0.3);
    background:
        linear-gradient(135deg, rgba(104, 45, 91, 0.94), rgba(71, 34, 85, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(24, 6, 28, 0.22);
}

#ageGateModal .age-gate-button--reject {
    border-color: rgba(154, 148, 174, 0.16);
    background: rgba(27, 28, 48, 0.74);
    color: rgba(205, 201, 215, 0.7);
}

#ageGateModal .age-gate-button:hover {
    transform: translateY(-1px);
}

#ageGateModal .age-gate-button--confirm:hover {
    border-color: rgba(225, 132, 191, 0.46);
    background:
        linear-gradient(135deg, rgba(115, 49, 100, 0.98), rgba(78, 37, 92, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 12px 28px rgba(24, 6, 28, 0.28);
}

#ageGateModal .age-gate-button--reject:hover {
    border-color: rgba(171, 156, 184, 0.26);
    background: rgba(32, 33, 55, 0.88);
    color: rgba(226, 222, 233, 0.84);
}

#ageGateModal .age-gate-button:active {
    transform: translateY(0) scale(0.985);
}

#ageGateModal .age-gate-button:focus-visible {
    outline: 2px solid rgba(224, 126, 187, 0.76);
    outline-offset: 3px;
}

#ageGateModal .age-gate-disclaimer {
    position: relative;
    z-index: 1;
    margin: 16px auto 0;
    max-width: 310px;
    color: rgba(184, 180, 196, 0.48);
    font-size: 10.5px;
    font-weight: 450;
    line-height: 1.45;
}

#ageGateModal .age-gate-disclaimer a {
    color: rgba(213, 148, 195, 0.86) !important;
    font-weight: 650 !important;
    text-decoration: none !important;
    text-underline-offset: 2px;
}

#ageGateModal .age-gate-disclaimer a:hover,
#ageGateModal .age-gate-disclaimer a:focus-visible {
    color: #e4b3d2 !important;
    text-decoration: underline !important;
}

@media (max-width: 350px) {
    #ageGateModal.age-gate-overlay {
        padding-right: 11px;
        padding-left: 11px;
    }

    #ageGateModal .age-gate-card {
        width: min(100%, 304px);
        padding: 21px 18px 18px;
        border-radius: 21px;
    }

    #ageGateModal .age-gate-mark {
        width: 52px;
        height: 52px;
        margin-bottom: 11px;
        border-radius: 16px;
    }

    #ageGateModal .age-gate-mark svg {
        width: 39px;
        height: 39px;
    }

    #ageGateModal #ageGateTitle {
        font-size: 21px;
    }

    #ageGateModal #ageGateDesc {
        margin-top: 10px;
        font-size: 12px;
        line-height: 1.43;
    }

    #ageGateModal .age-gate-actions {
        margin-top: 17px;
    }

    #ageGateModal .age-gate-button {
        min-height: 44px;
        padding: 9px 11px;
        font-size: 12px;
    }

    #ageGateModal .age-gate-disclaimer {
        margin-top: 14px;
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ageGateModal .age-gate-button {
        transition: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Отключаем зум на iOS */
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Разрешаем выделение только для текста в инпутах */
input,
textarea {
    -webkit-user-select: text;
    user-select: text;
    /* Минимальный размер шрифта 16px для предотвращения зума на iOS */
    font-size: 16px !important;
}

html {
    /* Фиксированный размер, запрет зума */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    /* Высота 100% для полноэкранного режима */
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    background: url('/webapp/images/background.webp?v=20260521') center/cover fixed;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-light);
    min-height: 100vh;
    height: 100%;
    width: 100%;
    overflow: hidden;
    touch-action: manipulation;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* --- Мгновенный отклик на касание (tap feedback) ---
   На тачскрине :hover не срабатывает, а глобальный
   -webkit-tap-highlight-color: transparent убирает нативную вспышку нажатия,
   поэтому даём собственное подтверждение касания на всех контролах.
   Только filter/opacity (без transform) — чтобы не ломать кнопки,
   спозиционированные через transform (напр. .back-btn с translateX(-50%)).
   Специфичность низкая — частные :active-правила компонентов побеждают. */
button,
[role="button"],
a[href],
.clickable {
    transition: filter 0.08s ease, opacity 0.08s ease;
}
button:active,
[role="button"]:active,
a[href]:active,
.clickable:active {
    filter: brightness(1.18);
    opacity: 0.86;
}
@media (prefers-reduced-motion: reduce) {
    button,
    [role="button"],
    a[href],
    .clickable {
        transition: none;
    }
}

html.vk-mini-app.vk-desktop-web body {
    background-color: #080812;
    background-attachment: scroll;
}

html.vk-mini-app.vk-desktop-web body:not(:has(#chatView.screen.active))::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(7, 6, 18, 0.42);
    z-index: 0;
    pointer-events: none;
}

html.vk-mini-app.vk-desktop-web .screen:not(#chatView) {
    background: transparent;
}

.app-container {
    /* Контейнер занимает весь viewport */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Прозрачный чтобы видеть фоны */
    overflow: hidden;
    z-index: 1; /* Выше фонов (z-index: 0), но ниже снежинок (z-index: 1000).
                   Рекламные баннеры вынесены в прямые потомки body (в конец HTML),
                   поэтому их z-index:100 работает в контексте body поверх
                   frosted glass (body::before/after z-index:50). */
}

/* Экраны - абсолютно позиционированы внутри контейнера */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    padding-bottom: 5px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    background: transparent; /* Прозрачный чтобы видеть новогодние фоны */
    -webkit-overflow-scrolling: touch;
}

/* Экран чата - без отступов, на весь экран */
#chatView.screen {
    padding: 0 !important;
    overflow: hidden !important; /* Скроллится только .chat-messages-container внутри */
    overflow-x: hidden !important;
}

/* chatView: flex-layout должен работать правильно */
#chatView.screen.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#chatView.screen.active > .chat-messages-container {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    flex-shrink: 1 !important;
}

#chatView.screen.active > .chat-header {
    flex-shrink: 0 !important;
}

#chatView.screen.active > .chat-input-container {
    flex-shrink: 0 !important;
}

/* Telegram fullscreen can report 0px top inset on some Android/iOS clients.
   Reuse the measured/fallback Telegram controls offset on all app screens,
   while leaving the main menu on its dedicated top-bar layout. */
html.telegram-fullscreen .screen:not(#mainMenu) {
    --safe-area-top: var(--telegram-main-controls-top);
}

/* Активный экран - просто показываем */
.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1; /* Активный экран поверх остальных */
}

/* ВСЕ экраны - строго вертикальный layout */
.screen.active > * {
    width: 100% !important;
    max-width: 400px !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Экран Мои фото - расширенная ширина для галереи */
#myPhotosScreen.screen.active > * {
    max-width: 600px !important; /* Ограничиваем ширину для ПК */
}

/* Скрываем кнопку FREE/Premium на странице Мои фото */
#myPhotosScreen.screen.active ~ .premium-toggle,
body:has(#myPhotosScreen.screen.active) .premium-toggle {
    display: none !important;
}

/* Экран чата - на полную ширину без ограничений */
#chatView.screen.active > * {
    max-width: 100% !important;
}

/* Скрываем боковые рекламные баннеры в открытом чате по умолчанию (на узких экранах перекрывают сообщения) */
body:has(#chatView.active) #adBannerLeft,
body:has(#chatView.active) #adBannerRight {
    display: none !important;
}

/* ================================================================
   РЕКЛАМНЫЕ БАННЕРЫ В ЧАТЕ на широких экранах (≥ 1100px).
   Боковая панель = calc((100vw - 760px) / 2) ≥ 170px — туда
   центрируем баннеры поверх frosted glass (z-index > 50).
   ================================================================ */
@media (min-width: 1100px) {
    body:has(#chatView.active) #adBannerLeft,
    body:has(#chatView.active) #adBannerRight {
        display: flex !important;
    }

    /* Левый баннер: растягиваем на всю ширину левой панели и центрируем содержимое */
    body:has(#chatView.active) #adBannerLeft {
        left: 0 !important;
        width: calc((100vw - 760px) / 2) !important;
        align-items: center !important;
    }

    /* Правый баннер: аналогично для правой панели */
    body:has(#chatView.active) #adBannerRight {
        right: 0 !important;
        left: auto !important;
        width: calc((100vw - 760px) / 2) !important;
        align-items: center !important;
    }
}


/* Главное меню - всегда вертикальный layout */
#mainMenu.screen.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

#mainMenu .header,
#mainMenu .menu-buttons {
    width: 100% !important;
    max-width: 400px !important;
    flex-shrink: 0 !important;
}

#mainMenu .main-top-bar {
    flex-shrink: 0 !important;
    position: absolute !important;
    top: calc(8px + var(--telegram-main-controls-top)) !important;
    left: 50% !important;
    transform: translateX(-50%);
    z-index: 230 !important;
    display: grid !important;
    grid-template-columns: minmax(58px, 1fr) 84px minmax(118px, 1fr);
    align-items: start !important;
    column-gap: 8px;
    width: min(100%, 430px) !important;
    max-width: 430px !important;
    min-height: 96px;
    padding: 0 14px !important;
    pointer-events: none;
}

#mainMenu .main-top-bar > * {
    pointer-events: auto;
}

#mainMenu .main-top-bar > .hamburger-menu {
    grid-column: 1;
    justify-self: start;
    align-self: start;
    margin-top: 0 !important;
}

#mainMenu .main-age-badge {
    position: absolute;
    top: 54px;
    left: 50%;
    transform: translateX(-70px);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #ff6675;
    background: rgba(255, 68, 68, 0.13);
    border: 1px solid rgba(255, 68, 68, 0.42);
    border-radius: 5px;
    padding: 3px 7px;
    letter-spacing: 0;
    pointer-events: none;
    user-select: none;
    text-shadow:
        0 0 7px rgba(255, 255, 255, 0.82),
        0 0 8px rgba(255, 68, 68, 0.52);
    box-shadow:
        0 0 12px rgba(255, 68, 68, 0.16),
        inset 0 0 10px rgba(255, 255, 255, 0.04);
}

#mainMenu .main-premium-actions {
    grid-column: 3;
    justify-self: end;
    align-self: start;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 4px !important;
    width: auto !important;
    max-width: none !important;
}

#mainMenu .header {
    margin-top: calc(4px + var(--telegram-main-controls-top)) !important;
    margin-bottom: -4px !important;
    min-height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#mainMenu .logo {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
    padding-top: 0 !important;
}

#mainMenu .neon-icon {
    margin-bottom: 0 !important;
}

#mainMenu .menu-buttons {
    gap: 0 !important;
    padding: 2px 15px 4px !important;
}

#mainMenu .user-location {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
    padding: 0.32rem 0.75rem;
}

#mainMenu .city-stats-block {
    margin-bottom: 6px !important;
    padding: 11px 16px;
    line-height: 1.32;
}

#mainMenu #createAdBtn {
    margin-top: 2px;
}

#mainMenu .neon-button {
    margin-top: 4px;
    margin-bottom: 4px;
}

html.telegram-webapp #mainMenu .main-top-bar {
    top: calc(var(--telegram-main-controls-top) + 8px) !important;
    padding-top: 0 !important;
}

html.telegram-fullscreen #mainMenu .main-top-bar + .header {
    margin-top: calc(4px + var(--telegram-main-controls-top)) !important;
}

html.telegram-fullscreen #createAd > .header {
    min-height: calc(80px + var(--telegram-main-controls-top)) !important;
}

html.telegram-fullscreen #createAd .hamburger-menu[style],
html.telegram-fullscreen #locationSetup .hamburger-menu[style] {
    top: calc(15px + var(--telegram-main-controls-top)) !important;
}

html.telegram-fullscreen #createAdBackBtn {
    top: calc(52px + var(--telegram-main-controls-top)) !important;
}

html.telegram-fullscreen #locationBackBtn {
    top: calc(60px + var(--telegram-main-controls-top)) !important;
}

/* Кнопки меню - строго вертикально */
.menu-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
}

.menu-buttons > * {
    width: 100% !important;
}

#mainMenu .main-menu-compact-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    width: 100% !important;
    margin: 6px 0;
}

#mainMenu .main-menu-compact-row .main-menu-action {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 6px 8px;
    border-radius: 18px;
    font-size: 12px;
    line-height: 1.12;
    gap: 5px;
}

#mainMenu .main-menu-compact-row .main-menu-action-badge-wrap {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

#mainMenu .main-menu-compact-row .main-menu-action-badge-wrap .main-menu-action {
    width: 100%;
}

#mainMenu .main-menu-compact-row .main-menu-guests-badge {
    z-index: 2;
}

#mainMenu .main-menu-compact-row .main-menu-action .icon {
    --app-icon-size: 1.3em;
}

#mainMenu .main-menu-compact-row .main-menu-action span:not(.icon) {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

@media (max-width: 380px) {
    #mainMenu .main-menu-compact-row {
        gap: 6px;
    }

    #mainMenu .main-menu-compact-row .main-menu-action {
        padding: 6px 6px;
        font-size: 11px;
        gap: 4px;
    }

    #mainMenu .main-menu-compact-row .main-menu-action .icon {
        --app-icon-size: 1.2em;
    }
}

/* Compact automatic-location flow: the legacy emoji globe/radar state was
   visually oversized and did not match the product state illustrations. */
#autoLocationDetection {
    /* align-items:center (унаследовано от .screen.active) — не stretch: stretch
       перебивал центрирование .header (он получал margin:0, а не auto), и заголовок
       прижимался к левому краю на широких вьюпортах (VK Mini App на десктопе).
       Дочерние блоки уже сами задают явную ширину (.auto-location-container,
       .logo), так что stretch им не был нужен. */
    justify-content: flex-start !important;
}

#autoLocationDetection > .header {
    min-height: 0 !important;
    margin: 0 !important;
    padding: calc(16px + var(--safe-area-top)) 14px 6px !important;
}

#autoLocationDetection .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 360px);
    margin: 0 auto;
    padding: 0 !important;
}

#autoLocationDetection .location-detecting-art {
    display: grid;
    place-items: center;
    width: 132px;
    height: 106px;
    margin: 4px auto 9px;
    filter: drop-shadow(0 15px 28px rgba(19, 10, 38, 0.34));
    animation: location-art-float 4.6s ease-in-out infinite;
}

#autoLocationDetection .location-detecting-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#autoLocationDetection .logo h1 {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.25px;
}

#autoLocationDetection .logo p {
    margin: 5px 0 0 !important;
    font-size: 11px !important;
    line-height: 1.35;
}

#autoLocationDetection .auto-location-container {
    width: min(100%, 388px) !important;
    max-width: 388px !important;
    margin: 0 auto !important;
    padding: 8px 14px 18px !important;
}

#autoLocationDetection .detection-animation {
    width: 100%;
    margin: 0 !important;
}

#autoLocationDetection .location-detection-status {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 66px;
    padding: 12px 14px;
    border: 1px solid rgba(180, 126, 209, 0.22);
    border-radius: 16px;
    background:
        radial-gradient(circle at 14% 50%, rgba(219, 72, 155, 0.1), transparent 34%),
        rgba(18, 19, 40, 0.86);
    box-sizing: border-box;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

#autoLocationDetection .location-detection-spinner {
    position: relative;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(202, 139, 221, 0.18);
    border-radius: 13px;
    background: rgba(139, 92, 246, 0.08);
}

#autoLocationDetection .location-detection-spinner::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(201, 137, 221, 0.26);
    border-top-color: #ef7bb8;
    border-right-color: #9c79ee;
    border-radius: 50%;
    animation: location-status-spin 1.2s linear infinite;
}

#autoLocationDetection .location-detection-spinner-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border: 1.5px solid #da8fda;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -60%) rotate(-45deg);
    box-sizing: border-box;
}

#autoLocationDetection .detection-text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    color: rgba(238, 235, 245, 0.76) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.4;
    text-align: left !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    animation: none !important;
}

#autoLocationDetection .detection-text::after {
    display: none !important;
    content: none !important;
}

#autoLocationDetection .detection-result {
    width: 100%;
}

#autoLocationDetection .location-result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 16px;
    border: 1px solid rgba(180, 126, 209, 0.24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(141, 106, 244, 0.1), transparent 38%),
        rgba(18, 19, 40, 0.9);
    box-sizing: border-box;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    text-align: center;
}

#autoLocationDetection .location-result-art {
    display: block;
    width: 78px;
    height: 60px;
    margin: 0 0 8px;
    overflow: visible;
}

#autoLocationDetection .location-result-art-frame {
    fill: rgba(43, 27, 69, 0.34);
    stroke: rgba(177, 121, 205, 0.34);
    stroke-width: 1.6;
}

#autoLocationDetection .location-result-art-pin {
    fill: rgba(232, 91, 169, 0.08);
    stroke: #d67cc4;
    stroke-width: 2.2;
}

#autoLocationDetection .location-result-art-core {
    fill: rgba(10, 10, 27, 0.82);
    stroke: #d59ae3;
    stroke-width: 1.6;
}

#autoLocationDetection .location-result-art-check,
#autoLocationDetection .location-result-art-spark {
    fill: none;
    stroke: #ed82bf;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#autoLocationDetection .location-result-card h3 {
    margin: 0 0 10px !important;
    color: var(--product-text) !important;
    font-size: 16px !important;
    line-height: 1.25;
    text-shadow: none !important;
}

#autoLocationDetection .location-result-place {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

#autoLocationDetection .location-result-flag {
    font-size: 20px;
    line-height: 1;
}

#autoLocationDetection .location-result-city {
    color: var(--product-text);
    font-size: 14px;
    font-weight: 760;
}

#autoLocationDetection .location-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
}

#autoLocationDetection .location-result-actions .neon-button,
#autoLocationDetection .location-manual-button,
#autoLocationDetection .location-popular-button {
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 11px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    line-height: 1.25;
    text-shadow: none !important;
    box-shadow: none !important;
}

#autoLocationDetection .location-result-card--error > .product-state-connection-art,
#autoLocationDetection .location-result-card--error > .location-result-error-art {
    display: block;
    width: 76px;
    height: 53px;
    margin: 0 0 9px;
    color: #c78bd7;
}

#autoLocationDetection .location-result-card--error > p {
    max-width: 300px;
    margin: 0 0 13px;
    color: var(--product-muted);
    font-size: 12px;
    line-height: 1.45;
}

#autoLocationDetection .location-popular-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin: 0 0 9px;
}

#autoLocationDetection .location-popular-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

#autoLocationDetection .location-popular-button img {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
}

#autoLocationDetection .location-manual-button {
    width: 100%;
}

@keyframes location-art-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes location-status-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 380px) {
    #autoLocationDetection > .header {
        padding-top: calc(12px + var(--safe-area-top)) !important;
    }

    #autoLocationDetection .location-detecting-art {
        width: 116px;
        height: 94px;
        margin-bottom: 7px;
    }

    #autoLocationDetection .auto-location-container {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    #autoLocationDetection .location-result-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    #autoLocationDetection .location-detecting-art,
    #autoLocationDetection .location-detection-spinner::before {
        animation: none !important;
    }
}

/* Restrained tactile feedback for the redesigned product controls. */
:where(
    button,
    a.neon-button,
    [role="button"]
):not(:disabled):not([aria-disabled="true"]) {
    transform-origin: center;
    transition:
        scale 0.14s cubic-bezier(0.2, 0.75, 0.25, 1),
        filter 0.14s ease,
        border-color 0.14s ease,
        background-color 0.14s ease,
        color 0.14s ease,
        opacity 0.14s ease !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (hover: hover) and (pointer: fine) {
    :where(
        button,
        a.neon-button,
        [role="button"]
    ):not(:disabled):not([aria-disabled="true"]):hover {
        scale: 1.008;
        filter: brightness(1.045) saturate(1.015);
    }
}

:where(
    button,
    a.neon-button,
    [role="button"]
):not(:disabled):not([aria-disabled="true"]):active {
    scale: 0.985;
    filter: brightness(0.94) saturate(0.98);
    transition-duration: 0.055s !important;
}

:where(
    button,
    a.neon-button,
    [role="button"]
):focus-visible {
    outline: 2px solid rgba(241, 115, 176, 0.76);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    :where(
        button,
        a.neon-button,
        [role="button"]
    ):not(:disabled):not([aria-disabled="true"]) {
        scale: 1;
        filter: none;
        transition-duration: 0.001ms !important;
    }
}

html.low-power-ui :where(
    button,
    a.neon-button,
    [role="button"]
):not(:disabled):not([aria-disabled="true"]) {
    scale: 1 !important;
    filter: none !important;
    transition-duration: 0.001ms !important;
}

/* Product SVG icon system: replaces platform-dependent emoji in profile flows. */
.product-icon-svg {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.12em;
}

.product-icon-svg.is-filled,
.is-filled > .product-icon-svg {
    fill: currentColor;
}

.product-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.product-button-icon .product-icon-svg,
.product-empty-state-cta .product-icon-svg {
    width: 17px;
    height: 17px;
}

#adDetails .ad-details-footer .neon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#reportModal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#reportModal .report-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(234, 102, 157, 0.2);
    border-radius: 10px;
    background: rgba(89, 31, 63, 0.18);
    color: #d98ab3;
}

#reportModal .report-title-icon .product-icon-svg {
    width: 18px;
    height: 18px;
}

#reportModal .report-modal-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

#reportModal .reason-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(202, 130, 183, 0.14);
    border-radius: 11px;
    background: rgba(42, 31, 61, 0.44);
    color: #d291bd;
    font-size: 0;
}

#reportModal .reason-icon .product-icon-svg {
    width: 20px;
    height: 20px;
}

.ai-action-icon,
.ai-mode-option-icon {
    width: 16px;
    height: 16px;
}

#aiFirstMessageBtn > span {
    line-height: 1;
}

.product-empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border: 1px solid rgba(173, 126, 219, 0.18);
    border-radius: 18px;
    background: rgba(39, 28, 65, 0.48);
    color: #b796df;
    filter: none;
}

.product-empty-state-icon-svg {
    width: 30px;
    height: 30px;
}

.product-empty-state-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ad-inline-icon,
.ad-author-row-icon,
.ad-section-title-icon,
.ad-action-icon {
    width: 16px;
    height: 16px;
}

.ad-author-row h3,
.pinned-badge,
.ad-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.author-avatar .ad-author-avatar-icon {
    width: 32px;
    height: 32px;
}

.search-title,
.description-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.param-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.param-icon .product-icon-svg,
.ad-field .product-icon-svg,
.created-at .product-icon-svg,
.like-icon .product-icon-svg,
.view-icon .product-icon-svg,
.contact-icon .product-icon-svg,
.delete-icon .product-icon-svg {
    width: 16px;
    height: 16px;
}

.like-icon,
.view-icon,
.contact-icon,
.delete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.like-btn.liked .like-icon {
    color: #df5c9b;
}

/* The Premium status reuses the same crown geometry as the Premium entry. */
.pro-badge,
.ad-card .pro-badge,
.profile-card .pro-badge,
.ad-author-row .pro-badge,
.profile-author-row .pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid rgba(221, 144, 203, 0.24);
    border-radius: 8px;
    background: rgba(47, 28, 66, 0.82);
    color: #dda4cf;
    line-height: 1;
    text-shadow: none;
    filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: none;
}

.pro-badge .product-pro-crown {
    width: 15px;
    height: 15px;
    stroke-width: 1.45;
}

.world-chat-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 2px;
    border: 1px solid rgba(221, 144, 203, 0.2);
    border-radius: 7px;
    background: rgba(47, 28, 66, 0.72);
    color: #dda4cf;
    font-size: 0;
}

.world-chat-pro-badge .product-pro-crown {
    width: 13px;
    height: 13px;
}

/* Main dashboard artwork collection: one restrained narrative per action. */
#mainMenu .user-location,
#mainMenu .main-menu-action,
#mainMenu .main-quick-action,
#mainMenu .main-referral-row {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background-color: #0a0b1d !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: cover !important;
}

#mainMenu .user-location {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.99) 0%,
            rgba(8, 9, 25, 0.95) 54%,
            rgba(8, 9, 25, 0.54) 77%,
            rgba(8, 9, 25, 0.12) 100%
        ),
        url("/webapp/images/city-community-card-v2.webp") !important;
    background-position: center, right center !important;
    background-size: 100% 100%, cover !important;
}

#mainMenu .main-menu-browse {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.58) 48%,
            rgba(8, 9, 25, 0.24) 72%,
            rgba(8, 9, 25, 0.04) 100%
        ),
        url("/webapp/images/main-browse-card-v1.webp") !important;
}

#mainMenu .main-menu-create {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.6) 44%,
            rgba(8, 9, 25, 0.24) 72%,
            rgba(8, 9, 25, 0.04) 100%
        ),
        url("/webapp/images/main-create-card-v1.webp") !important;
    background-position: center, right center !important;
    background-size: 100% 100%, cover !important;
}

#mainMenu .main-quick-action {
    background-position: 72% center !important;
}

#mainMenu .main-quick-action > * {
    position: relative;
    z-index: 1;
}

#mainMenu .main-menu-my-ads {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            0deg,
            rgba(8, 9, 25, 0.88) 0%,
            rgba(8, 9, 25, 0.50) 55%,
            rgba(8, 9, 25, 0.12) 100%
        ),
        linear-gradient(90deg, rgba(8, 9, 25, 0.72), rgba(8, 9, 25, 0.08)),
        url("/webapp/images/main-my-ads-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
}

#mainMenu .main-menu-guests {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            0deg,
            rgba(8, 9, 25, 0.88) 0%,
            rgba(8, 9, 25, 0.50) 55%,
            rgba(8, 9, 25, 0.12) 100%
        ),
        linear-gradient(90deg, rgba(8, 9, 25, 0.72), rgba(8, 9, 25, 0.08)),
        url("/webapp/images/main-guests-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
}

#mainMenu .main-menu-chats {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            0deg,
            rgba(8, 9, 25, 0.88) 0%,
            rgba(8, 9, 25, 0.50) 55%,
            rgba(8, 9, 25, 0.12) 100%
        ),
        linear-gradient(90deg, rgba(8, 9, 25, 0.72), rgba(8, 9, 25, 0.08)),
        url("/webapp/images/main-chats-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
}

#mainMenu .main-menu-world-chat {
    background-image: url("/webapp/images/world-chat-card-v1.webp") !important;
}

#mainMenu .main-menu-loneliness-map {
    background-image: url("/webapp/images/loneliness-map-card-v1.webp") !important;
}

#mainMenu .main-referral-row {
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.6) 56%,
            rgba(8, 9, 25, 0.24) 79%,
            rgba(8, 9, 25, 0.04) 100%
        ),
        url("/webapp/images/invite-friends-card-v1.webp") !important;
}

#mainMenu .user-location > *,
#mainMenu .main-menu-action > *,
#mainMenu .main-referral-row > * {
    position: relative;
    z-index: 1;
}

#mainMenu .user-location .main-line-icon,
#mainMenu .main-menu-action .main-line-icon,
#mainMenu .main-quick-action .main-line-icon,
#mainMenu .main-referral-row .main-line-icon {
    border-color: rgba(205, 158, 228, 0.18) !important;
    background: rgba(25, 21, 49, 0.68) !important;
    color: #cba8dd !important;
    backdrop-filter: blur(6px);
}

#mainMenu .main-menu-action,
#mainMenu .main-quick-action,
#mainMenu .main-discovery-card,
#mainMenu .main-referral-row,
#mainMenu .main-premium-card,
#mainMenu .user-location {
    border-color: rgba(180, 126, 206, 0.16) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

@media (prefers-reduced-data: reduce) {
    #mainMenu .user-location,
    #mainMenu .main-menu-action,
    #mainMenu .main-quick-action,
    #mainMenu .main-discovery-card,
    #mainMenu .main-referral-row,
    #mainMenu .main-premium-card {
        background-image: none !important;
    }
}

/* Экран настройки локации - строго вертикальный */
#locationSetup.screen.active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    background: linear-gradient(180deg, rgba(5, 7, 20, 0.66) 0%, rgba(8, 10, 24, 0.88) 100%);
    padding: 12px 12px max(16px, var(--chat-safe-bottom-extra)) !important;
}

#locationSetup .header {
    width: 100% !important;
    max-width: 430px !important;
    text-align: center !important;
    min-height: auto !important;
    margin-bottom: 0 !important;
    padding: calc(12px + var(--safe-area-top)) 14px 4px !important;
    gap: 10px;
}

#locationSetup #locationBackBtn {
    position: static !important;
    left: auto !important;
    top: auto !important;
    align-self: flex-start;
    width: fit-content;
    margin: 42px 0 12px;
    padding: 8px 13px;
    border: 1px solid rgba(0, 217, 255, 0.72);
    background: rgba(4, 12, 28, 0.88);
    color: #f4fdff;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

#locationSetup .logo {
    padding-top: 0 !important;
}

#locationSetup .logo h1 {
    margin-bottom: 7px;
    color: #ffffff !important;
    font-size: 22px;
    line-height: 1.18;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.76), 0 0 18px rgba(0, 217, 255, 0.22);
}

#locationSetup .logo p {
    color: rgba(246, 251, 255, 0.88) !important;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.82);
}

/* Убираем скролл если контент влезает */
.screen:not(.force-scroll) {
    overflow-y: auto;
}

.screen:not(.force-scroll):not(:has(:nth-child(10))) {
    overflow-y: visible;
}

/* Заголовок */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
    min-height: calc(50px + var(--safe-area-top));
    padding-top: calc(10px + var(--safe-area-top));
    padding-bottom: 10px;
    width: 100%;
    overflow: visible;
}

.back-btn {
    background: none;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 10px;
    top: calc(10px + var(--safe-area-top));
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.back-btn:hover {
    box-shadow: var(--shadow-cyan);
    transform: scale(1.05);
}

/* FAQ кнопка в хедере */
.faq-btn {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(131, 56, 236, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.faq-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 20px rgba(131, 56, 236, 0.6);
}

.faq-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* FAQ модальное окно */
.faq-modal .faq-content {
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.faq-modal .faq-body {
    overflow-y: auto;
    padding: 0 20px 20px;
    flex: 1;
}

.faq-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(131, 56, 236, 0.2);
}

.faq-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-section h3 {
    color: var(--neon-cyan);
    font-size: 0.95rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.faq-section p {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.faq-section ul {
    margin: 6px 0;
    padding-left: 18px;
}

.faq-section li {
    color: var(--text-gray);
    font-size: 0.8rem;
    margin-bottom: 3px;
    line-height: 1.3;
}

.faq-tip {
    background: rgba(131, 56, 236, 0.15);
    border-left: 3px solid var(--neon-purple);
    padding: 6px 10px;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem !important;
    margin-top: 6px !important;
}

.faq-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(131, 56, 236, 0.2);
    text-align: center;
}

.logo {
    text-align: center;
    width: 100%;
    padding-top: 0;
}

.logo h1 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

.logo p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.neon-icon {
    font-size: 35px;
    margin-bottom: 5px;
    filter: drop-shadow(var(--shadow-pink)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.neon-icon img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

h1, h2, h3 {
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

h1 {
    font-size: 20px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 18px;
    color: var(--neon-cyan);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

h3 {
    font-size: 16px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

/* Неоновые кнопки */
.neon-button {
    background: linear-gradient(45deg, var(--bg-card), #2a2a3e);
    border: 2px solid var(--neon-pink);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 6px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.neon-button .icon {
    --app-icon-size: 1.7em;
    filter:
        drop-shadow(0 0 4px var(--app-icon-glow, rgba(0, 217, 255, 0.78)))
        drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
}

.app-icon {
    --app-icon-size: 1.35em;
    --app-icon: none;
    --app-icon-glow: rgba(0, 217, 255, 0.78);
    display: inline-block;
    width: var(--app-icon-size);
    height: var(--app-icon-size);
    flex: 0 0 var(--app-icon-size);
    background: transparent var(--app-icon) center / contain no-repeat;
    color: currentColor;
    vertical-align: -0.15em;
    filter:
        drop-shadow(0 0 4px var(--app-icon-glow))
        drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
}

.app-icon-edit {
    --app-icon: url("/webapp/icons/neon-edit.svg?v=20260612-complex");
}

.app-icon-eye {
    --app-icon: url("/webapp/icons/neon-eye.svg?v=20260612-complex");
    --app-icon-glow: rgba(255, 218, 90, 0.72);
}

.app-icon-list {
    --app-icon: url("/webapp/icons/neon-list.svg?v=20260612-complex");
}

.app-icon-users {
    --app-icon: url("/webapp/icons/neon-users.svg?v=20260612-complex");
}

.app-icon-guests {
    --app-icon: url("/webapp/icons/neon-guest-door.svg?v=20260612-complex");
    --app-icon-glow: rgba(178, 107, 255, 0.74);
}

.app-icon-chat {
    --app-icon: url("/webapp/icons/neon-chat.svg?v=20260612-complex");
}

.app-icon-globe {
    --app-icon: url("/webapp/icons/neon-globe.svg?v=20260612-complex");
    --app-icon-glow: rgba(69, 227, 107, 0.66);
}

.app-icon-map {
    --app-icon: url("/webapp/icons/neon-map.svg?v=20260612-complex");
    --app-icon-glow: rgba(53, 207, 89, 0.76);
}

.app-icon-gift {
    --app-icon: url("/webapp/icons/neon-gift.svg?v=20260612-complex");
}

.app-icon-flame {
    --app-icon: url("/webapp/icons/neon-flame.svg?v=20260612-complex");
    --app-icon-glow: rgba(255, 44, 168, 0.78);
}

.app-icon-megaphone {
    --app-icon: url("/webapp/icons/neon-megaphone.svg?v=20260612-complex");
    --app-icon-glow: rgba(255, 218, 90, 0.72);
}

.app-icon-ban {
    --app-icon: url("/webapp/icons/neon-ban.svg?v=20260612-complex");
    --app-icon-glow: rgba(255, 62, 96, 0.8);
}

.app-icon-location {
    --app-icon: url("/webapp/icons/neon-location.svg?v=20260612-complex");
}

.neon-button:hover::before {
    left: 100%;
}

.neon-button:hover {
    box-shadow: var(--shadow-pink);
    transform: translateY(-3px);
}

.neon-button:disabled,
.neon-button[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.25);
    transform: none;
    animation: none;
}

.neon-button:disabled:hover,
.neon-button[aria-disabled="true"]:hover {
    box-shadow: none;
    transform: none;
}

.neon-button:disabled::before,
.neon-button[aria-disabled="true"]::before {
    display: none;
}

.neon-button.secondary {
    border-color: var(--neon-cyan);
}

.neon-button.secondary:hover {
    box-shadow: var(--shadow-cyan);
}

.neon-button.success {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.neon-button.primary {
    animation: pulse-pink 4.2s ease-in-out infinite;
}

/* Attention CTA: "Смотреть анкеты" in main menu */
.neon-button.browse-ads-cta {
    position: relative;
    isolation: isolate;
    border-color: rgba(255, 210, 92, 0.95);
    box-shadow: 0 0 14px rgba(255, 204, 64, 0.45), 0 0 28px rgba(255, 170, 25, 0.28), inset 0 0 10px rgba(255, 215, 120, 0.12);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.neon-button.browse-ads-cta::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 220, 130, 0.56) 0%, rgba(255, 188, 70, 0.34) 38%, rgba(255, 166, 0, 0.12) 72%, rgba(255, 166, 0, 0) 100%);
    opacity: 0.34;
    transform: scale(1);
    filter: blur(7px);
    animation: gold-flow-soft 8.2s ease-in-out infinite;
}

.neon-button.browse-ads-cta > * {
    position: relative;
    z-index: 1;
}

.neon-button.browse-ads-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(255, 210, 92, 0.56), 0 0 32px rgba(255, 166, 0, 0.34), inset 0 0 12px rgba(255, 220, 130, 0.14);
}

.neon-button.browse-ads-cta .icon {
    animation: gold-content-soft 8.2s ease-in-out infinite;
}

.neon-button.browse-ads-cta #browseAdsBtnLabel {
    color: #ffe8a6;
    animation: gold-text-soft 8.2s ease-in-out infinite;
}

.neon-button.full-width {
    width: 100%;
}

@keyframes pulse-pink {
    0%, 100% { box-shadow: 0 0 5px var(--neon-pink); }
    50% { box-shadow: var(--shadow-pink); }
}

@keyframes gold-flow-soft {
    0%, 100% {
        opacity: 0.32;
        transform: scale(1);
    }
    50% {
        opacity: 0.56;
        transform: scale(1.025);
    }
}

@keyframes gold-content-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.96; }
}

@keyframes gold-text-soft {
    0%, 100% {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.58), 0 0 7px rgba(255, 210, 92, 0.18);
    }
    50% {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 220, 130, 0.34);
    }
}

#mainMenu .location-info,
#mainMenu .main-menu-action {
    --menu-flow-accent: rgba(255, 255, 255, 0.34);
    --menu-flow-sheen: rgba(0, 229, 255, 0.2);
    --menu-flow-shadow-a: rgba(0, 229, 255, 0.36);
    --menu-flow-shadow-b: rgba(255, 44, 168, 0.2);
    --menu-flow-delay: 0s;
    --menu-flow-direction: normal;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-image:
        linear-gradient(45deg, rgba(26, 26, 46, 0.82), rgba(42, 42, 62, 0.82)),
        linear-gradient(
            100deg,
            rgba(255, 0, 110, 0.08) 0%,
            var(--menu-flow-sheen) 24%,
            rgba(255, 255, 255, 0.12) 44%,
            var(--menu-flow-accent) 52%,
            rgba(0, 217, 255, 0.1) 66%,
            rgba(255, 0, 110, 0.08) 100%
        );
    background-size: 100% 100%, 230% 100%;
    background-position: 0 0, 0% 50%;
    animation: main-menu-button-bg-flow var(--main-menu-bg-flow-duration) linear infinite;
}

#mainMenu .main-menu-action {
    box-shadow:
        0 0 11px var(--menu-flow-shadow-a),
        0 0 22px var(--menu-flow-shadow-b),
        inset 0 0 10px rgba(255, 255, 255, 0.04);
}

#mainMenu .location-info > *,
#mainMenu .main-menu-action > * {
    position: relative;
    z-index: 1;
}

#mainMenu .location-info::before,
#mainMenu .main-menu-action::before {
    content: "";
    position: absolute;
    top: -22%;
    bottom: -22%;
    left: 0;
    right: auto;
    width: 58%;
    height: auto;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--menu-flow-sheen) 30%,
        var(--menu-flow-accent) 50%,
        var(--menu-flow-sheen) 70%,
        transparent 100%
    );
    opacity: 0;
    filter: blur(7px);
    transform: translateX(-145%) skewX(-16deg);
    animation: main-menu-surface-flow var(--main-menu-flow-duration) ease-in-out infinite;
    animation-delay: var(--menu-flow-delay);
    animation-direction: var(--menu-flow-direction);
}

#mainMenu .location-info::after,
#mainMenu .main-menu-action::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 50% 50%, var(--menu-flow-sheen) 0%, transparent 68%);
    opacity: 0.12;
    animation: main-menu-surface-breathe var(--main-menu-breathe-duration) ease-in-out infinite;
    animation-delay: calc(var(--menu-flow-delay) + 0.2s);
}

#mainMenu .location-info {
    --menu-flow-accent: rgba(141, 247, 255, 0.34);
    --menu-flow-sheen: rgba(0, 229, 255, 0.18);
    --menu-flow-shadow-a: rgba(0, 229, 255, 0.34);
    --menu-flow-shadow-b: rgba(255, 44, 168, 0.16);
    --menu-flow-delay: 0s;
    --menu-flow-direction: normal;
}

#mainMenu .main-menu-create {
    --menu-flow-accent: rgba(255, 242, 122, 0.42);
    --menu-flow-sheen: rgba(255, 44, 168, 0.22);
    --menu-flow-shadow-a: rgba(255, 44, 168, 0.42);
    --menu-flow-shadow-b: rgba(0, 229, 255, 0.2);
    --menu-flow-delay: 0.35s;
    --menu-flow-direction: reverse;
}

#mainMenu .main-menu-browse {
    --menu-flow-accent: rgba(0, 229, 255, 0.34);
    --menu-flow-sheen: rgba(255, 230, 109, 0.24);
    --menu-flow-shadow-a: rgba(255, 230, 109, 0.42);
    --menu-flow-shadow-b: rgba(255, 159, 28, 0.22);
    --menu-flow-delay: 0.7s;
    --menu-flow-direction: normal;
}

#mainMenu .main-menu-my-ads {
    --menu-flow-accent: rgba(0, 229, 255, 0.36);
    --menu-flow-sheen: rgba(155, 70, 255, 0.22);
    --menu-flow-shadow-a: rgba(155, 70, 255, 0.4);
    --menu-flow-shadow-b: rgba(0, 229, 255, 0.18);
    --menu-flow-delay: 1.05s;
    --menu-flow-direction: reverse;
}

#mainMenu .main-menu-guests {
    --menu-flow-accent: rgba(255, 44, 168, 0.36);
    --menu-flow-sheen: rgba(181, 107, 255, 0.24);
    --menu-flow-shadow-a: rgba(181, 107, 255, 0.42);
    --menu-flow-shadow-b: rgba(255, 44, 168, 0.2);
    --menu-flow-delay: 1.4s;
    --menu-flow-direction: normal;
}

#mainMenu .main-menu-chats {
    --menu-flow-accent: rgba(255, 44, 168, 0.34);
    --menu-flow-sheen: rgba(0, 229, 255, 0.2);
    --menu-flow-shadow-a: rgba(0, 229, 255, 0.36);
    --menu-flow-shadow-b: rgba(58, 134, 255, 0.22);
    --menu-flow-delay: 1.75s;
    --menu-flow-direction: reverse;
}

#mainMenu .main-menu-world-chat {
    --menu-flow-accent: rgba(69, 227, 107, 0.34);
    --menu-flow-sheen: rgba(255, 44, 168, 0.2);
    --menu-flow-shadow-a: rgba(255, 44, 168, 0.34);
    --menu-flow-shadow-b: rgba(0, 229, 255, 0.2);
    --menu-flow-delay: 2.1s;
    --menu-flow-direction: normal;
}

#mainMenu .main-menu-loneliness-map {
    --menu-flow-accent: rgba(255, 44, 168, 0.34);
    --menu-flow-sheen: rgba(69, 227, 107, 0.2);
    --menu-flow-shadow-a: rgba(69, 227, 107, 0.38);
    --menu-flow-shadow-b: rgba(0, 229, 255, 0.18);
    --menu-flow-delay: 2.45s;
    --menu-flow-direction: reverse;
}

#mainMenu .main-menu-action:hover::before,
#mainMenu .main-menu-action:hover::after,
#mainMenu .location-info:hover::before,
#mainMenu .location-info:hover::after {
    animation-duration: 6.8s;
    opacity: 0.95;
}

#mainMenu .neon-button.browse-ads-cta.main-menu-action {
    border-color: rgba(255, 210, 92, 0.95);
    box-shadow:
        0 0 14px rgba(255, 204, 64, 0.45),
        0 0 28px rgba(255, 170, 25, 0.28),
        inset 0 0 10px rgba(255, 215, 120, 0.12);
}

#mainMenu .neon-button.browse-ads-cta.main-menu-action::after {
    inset: -2px;
    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 220, 130, 0.56) 0%,
            rgba(255, 188, 70, 0.34) 38%,
            rgba(255, 166, 0, 0.12) 72%,
            rgba(255, 166, 0, 0) 100%
        );
    opacity: 0.34;
    filter: blur(7px);
    transform: scale(1);
    animation: gold-flow-soft var(--main-menu-bg-flow-duration) ease-in-out infinite;
}

#mainMenu .neon-button.browse-ads-cta.main-menu-action:hover {
    box-shadow:
        0 0 16px rgba(255, 210, 92, 0.56),
        0 0 32px rgba(255, 166, 0, 0.34),
        inset 0 0 12px rgba(255, 220, 130, 0.14);
}

#mainMenu .neon-button.browse-ads-cta.main-menu-action:hover::after {
    opacity: 0.56;
    animation-duration: var(--main-menu-bg-flow-duration);
}

@keyframes main-menu-button-bg-flow {
    0% {
        background-position: 0 0, 0% 50%;
    }
    100% {
        background-position: 0 0, 230% 50%;
    }
}

@keyframes main-menu-surface-flow {
    0%, 18% {
        transform: translateX(-130%) skewX(-16deg);
        opacity: 0.12;
    }
    34%, 58% {
        opacity: 0.9;
    }
    82%, 100% {
        transform: translateX(230%) skewX(-16deg);
        opacity: 0.14;
    }
}

@keyframes main-menu-surface-breathe {
    0%, 100% { opacity: 0.16; }
    50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    #mainMenu .location-info::before,
    #mainMenu .location-info::after,
    #mainMenu .main-menu-action::before,
    #mainMenu .main-menu-action::after {
        animation: none;
    }

    #mainMenu .location-info,
    #mainMenu .main-menu-action {
        animation: none;
        background-position: 0 0, 50% 50%;
    }
}

/* Premium browse CTA: illustrative depth without the previous solid-pink dominance. */
#mainMenu .main-menu-action.main-menu-browse {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-color: rgba(221, 120, 188, 0.2) !important;
    background-color: #0d0f20 !important;
    background-image: url("/webapp/images/main-browse-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: right center !important;
    background-size: cover !important;
    color: rgba(250, 250, 253, 0.95) !important;
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.24) !important;
}

#mainMenu .main-menu-action.main-menu-browse::before {
    content: "" !important;
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(10, 11, 27, 0.82) 0%,
        rgba(10, 11, 27, 0.55) 41%,
        rgba(10, 11, 27, 0.24) 68%,
        rgba(10, 11, 27, 0.06) 100%
    ) !important;
}

#mainMenu .main-menu-action.main-menu-browse > * {
    position: relative;
    z-index: 1;
}

#mainMenu .main-menu-action.main-menu-browse .main-line-icon {
    border-color: rgba(215, 132, 193, 0.22) !important;
    background: rgba(28, 20, 49, 0.7) !important;
    color: #d7a0ca !important;
    box-shadow: none !important;
    backdrop-filter: blur(5px);
}

#mainMenu .main-menu-action.main-menu-browse .main-action-copy {
    max-width: 72%;
}

#mainMenu .main-menu-action.main-menu-browse > .main-chevron {
    color: #d9b7d1;
    opacity: 0.7;
}

/* Блок никнейма на главной странице */
.nickname-section {
    max-width: 280px;
    margin: 12px auto;
    padding: 10px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    box-shadow: var(--shadow-cyan);
}

.nickname-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.nickname-header h3 {
    font-size: 1rem;
    color: var(--neon-cyan);
    margin: 0;
}

.nickname-icon {
    font-size: 1.5rem;
}

.nickname-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 8px;
}

.nickname-display {
    flex: 1;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-light);
    text-align: left;
}

.nickname-edit-btn {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.2), rgba(0, 153, 255, 0.2));
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nickname-edit-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-cyan);
}

.edit-icon {
    font-size: 1rem;
}

.nickname-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nickname-editor .neon-input {
    width: 100%;
    text-align: center;
    font-size: 1rem;
}

.nickname-actions {
    display: flex;
    gap: 8px;
}

.nickname-save-btn,
.nickname-cancel-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nickname-save-btn {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
    color: #00ff00;
}

.nickname-save-btn:hover {
    background: #00ff00;
    color: var(--bg-dark);
}

.nickname-cancel-btn {
    background: rgba(255, 0, 110, 0.1);
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.nickname-cancel-btn:hover {
    background: var(--neon-pink);
    color: var(--bg-dark);
}

.suggestion-btn-main {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.suggestion-btn-main:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
}

/* Страница редактирования никнейма */
.nickname-edit-section {
    max-width: 400px;
    margin: 0 auto;
}

.nickname-current {
    margin-bottom: 15px;
    text-align: center;
}

.nickname-current h3 {
    color: var(--neon-cyan);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.current-nickname-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    box-shadow: var(--shadow-cyan);
}

.nickname-icon-large {
    font-size: 3rem;
}

.nickname-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
}

.nickname-edit-form {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6), rgba(16, 16, 32, 0.6));
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 12px;
}

.nickname-edit-form h3 {
    color: var(--neon-pink);
    margin-bottom: 6px;
    font-size: 1.1rem;
    text-align: center;
}

.nickname-hint-page {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.nickname-input-wrapper-page {
    position: relative;
    margin-bottom: 10px;
}

.nickname-input-wrapper-page .neon-input {
    width: 100%;
    padding-right: 45px;
    font-size: 1.1rem;
    text-align: center;
}

.nickname-input-wrapper-page .input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    pointer-events: none;
}

.nickname-suggestions-page {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.nickname-suggestions-page .suggestion-label {
    color: var(--text-gray);
    font-size: 0.85rem;
    text-align: center;
    margin-bottom: 5px;
}

.suggestion-btn-page {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.suggestion-btn-page:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-2px);
}

.suggestion-btn-page.reset-btn {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
}

.suggestion-btn-page.reset-btn:hover {
    background: var(--neon-pink);
    color: var(--bg-dark);
    box-shadow: var(--shadow-pink);
}

.nickname-starter-suggestions {
    display: none;
    margin: 12px 0 14px;
    padding: 12px;
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
}

.nickname-starter-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.nickname-starter-manual {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    margin-top: 10px;
    text-align: center;
}

.nickname-starter-suggestions .suggestion-btn-page {
    min-width: 0;
    overflow-wrap: anywhere;
}

.nickname-starter-suggestions .suggestion-btn-page.selected {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
}

/* Меню кнопки */
/* Страница опросов */
.polls-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 80px;
}

.polls-intro {
    text-align: center;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(236, 72, 153, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.polls-intro p {
    color: var(--text-light);
    font-size: 11px;
    line-height: 1.4;
    margin: 0;
}

.poll-card {
    background: linear-gradient(135deg, var(--bg-card), #262636);
    border: 1px solid var(--neon-purple);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.poll-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.poll-icon {
    font-size: 18px;
}

.poll-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--neon-pink);
}

.poll-question-full {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.3;
}

.poll-options-full {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.poll-option-full {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    background: rgba(236, 72, 153, 0.15);
    border: 2px solid rgba(236, 72, 153, 0.4);
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.poll-option-icon {
    font-size: 14px;
}

.poll-option-full:hover {
    background: rgba(236, 72, 153, 0.25);
    border-color: var(--neon-pink);
    transform: translateX(4px);
}

.poll-option-full:active {
    transform: scale(0.98);
}

.poll-results-full {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-result-item-full {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poll-result-text-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.poll-percent-full {
    color: var(--neon-pink);
    font-weight: 700;
    font-size: 13px;
}

.poll-bar-full {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.poll-bar-fill-full {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple));
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.poll-votes-count {
    font-size: 10px;
    color: var(--text-gray);
    margin-top: 1px;
}

.poll-total-full {
    font-size: 11px;
    color: var(--text-gray);
    text-align: center;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.poll-total-full span {
    color: var(--neon-pink);
    font-weight: 600;
}

.menu-buttons {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 2px;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 10px;
    width: 100%;
}

/* Адаптивные стили для широких экранов (desktop) */
@media (min-width: 600px) {
    .menu-buttons {
        max-width: 320px;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Форма */
.form-container {
    max-width: 380px;
    margin: 0 auto;
}

.form-step {
    display: none;
    text-align: center;
}

.form-step.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

/* В create profile центрируем только навигацию, а контент шагов оставляем обычным */
#createAd .form-step.active {
    align-items: stretch;
}

.form-step.active > * {
    display: revert !important;
}

/* Restore option grids in create profile steps and keep choices centered */
#createAd .form-step.active > .gender-select,
#createAd .form-step.active > .target-select,
#createAd .form-step.active > .goal-select,
#createAd .form-step.active > .body-select {
    display: grid !important;
}

/* Single-column choice lists should be visually centered */
#createAd .target-select,
#createAd .goal-select,
#createAd .body-select {
    justify-items: center;
}

#createAd .target-select .target-btn,
#createAd .goal-select .goal-btn,
#createAd .body-select .body-btn {
    width: min(320px, 100%);
}

/* Step 2 ("Кого ищете"): compact centered 2+1 layout */
#createAd #step2 .target-select {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

#createAd #step2 .target-select .target-btn {
    width: min(240px, 100%);
}

/* Step 3 ("Цель общения"): compact centered multi-row layout */
#createAd #step3 .goal-select {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

#createAd #step3 .goal-select .goal-btn {
    width: min(240px, 100%);
}

/* Универсальное центрирование последней кнопки, если их нечетное количество */
#createAd #step3 .goal-select .goal-btn:last-child:nth-child(odd),
#createAd #step2 .target-select .target-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
}

/* Step 3 hint text */
#createAd #step3 p {
    color: #ffffff !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65), 0 0 10px rgba(255, 255, 255, 0.22);
}

/* Step 5 ("Ваш возраст"): keep minus/input/plus in one centered row */
#createAd #step5 .age-control.centered {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#createAd #step5 .age-control.centered .neon-input {
    width: 90px;
    margin: 0;
    text-align: center;
}

/* Step 6-7 ("Телосложение" / "Ориентация"): same compact style as goals */
#createAd #step6 .body-select,
#createAd #step7 .body-select {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

#createAd #step6 .body-select .body-btn,
#createAd #step7 .body-select .body-btn {
    width: min(240px, 100%);
}

/* Center odd tail item in two-column rows */
#createAd #step6 .body-select .body-btn:last-child:nth-child(odd),
#createAd #step7 .body-select .body-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
}

#createAd #step7 [data-orientation].orientation-hidden-by-host {
    display: none !important;
}

/* Специальное правило для textarea на шаге 7 */
.form-step.active #adText,
.form-step#step7.active textarea,
#step7 .neon-textarea,
#adText {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 120px !important;
    position: relative !important;
    z-index: 999 !important;
}

#createAd #adText,
#textareaContainer #adText,
#textareaContainerLegacy #adText {
    background: rgba(8, 8, 18, 0.94) !important;
    color: #f8fbff !important;
    -webkit-text-fill-color: #f8fbff !important;
    caret-color: var(--neon-cyan) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.18), 0 0 18px rgba(0, 0, 0, 0.45) !important;
}

#createAd #adText:focus,
#textareaContainer #adText:focus,
#textareaContainerLegacy #adText:focus {
    background: rgba(6, 6, 16, 0.98) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: var(--shadow-cyan), inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

#createAd #adText::placeholder,
#textareaContainer #adText::placeholder,
#textareaContainerLegacy #adText::placeholder {
    color: rgba(248, 251, 255, 0.58) !important;
    -webkit-text-fill-color: rgba(248, 251, 255, 0.58) !important;
}

/* Никнейм */
.nickname-container {
    margin: 20px 0;
}

.nickname-hint {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
}

.nickname-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.nickname-input-wrapper .neon-input {
    width: 100%;
    padding-right: 45px;
    font-size: 1.1rem;
    text-align: center;
}

.nickname-input-wrapper .input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    pointer-events: none;
}

.nickname-suggestions {
    text-align: center;
}

.suggestion-label {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.suggestion-btn {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
}

/* Сетки кнопок */
.city-grid, .gender-select, .target-select, .goal-select, .body-select {
    display: grid;
    gap: 10px;
    margin: 15px 0;
}

.city-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.gender-select {
    grid-template-columns: 1fr 1fr 1fr;
}

.target-select, .goal-select, .body-select {
    grid-template-columns: 1fr;
}

.city-btn, .gender-btn, .target-btn, .goal-btn, .body-btn {
    background: var(--bg-card);
    border: 2px solid var(--neon-purple);
    color: var(--text-light);
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.city-btn:hover, .gender-btn:hover, .target-btn:hover, .goal-btn:hover, .body-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-2px);
}

.city-btn.selected, .gender-btn.selected, .target-btn.selected, .goal-btn.selected, .body-btn.selected {
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-pink);
    background: rgba(255, 0, 110, 0.1);
}



/* Поля ввода */
.neon-input, .neon-textarea {
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid var(--neon-purple);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-light);
    font-size: 15px;
    width: 100%;
    margin: 8px 0;
    transition: all 0.3s ease;
    display: block !important; /* Принудительно показываем */
}

.neon-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

#emailMessage {
    resize: none;
}

.neon-input:focus, .neon-textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
}

.neon-input::placeholder, .neon-textarea::placeholder {
    color: var(--text-gray);
}

.neon-input.small {
    width: 70px;
    text-align: center;
}

/* Возрастной диапазон */
.age-range {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.input-group label {
    color: var(--neon-cyan);
    font-size: 13px;
    text-align: center;
}

/* Age control buttons */
.age-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.age-control.centered {
    justify-content: center;
    margin: 20px 0;
}

.age-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--neon-pink);
    background: linear-gradient(45deg, var(--bg-card), #2a2a3e);
    color: var(--neon-pink);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    user-select: none;
}

.age-btn:hover {
    box-shadow: var(--shadow-pink);
    transform: scale(1.1);
    background: rgba(255, 0, 255, 0.1);
}

.age-btn:active {
    transform: scale(0.95);
}

.age-btn.plus {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.age-btn.plus:hover {
    box-shadow: var(--shadow-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.age-control .neon-input {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

/* Навигация формы */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

/* Create profile: навигация идет сразу под вариантами шага */
#createAd .form-container {
    width: 100%;
    padding-bottom: 0;
}

#createAd .form-navigation {
    position: static;
    transform: none;
    width: min(400px, 100%);
    margin: 12px auto 0;
    padding: 0 4px;
    background: transparent;
    justify-content: center;
    align-items: center;
}

#createAd .form-navigation .nav-btn {
    flex: 0 0 auto;
    min-width: 150px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-btn {
    background: var(--bg-card);
    border: 2px solid var(--neon-purple);
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
    min-height: 52px;
}

.nav-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
}

.nav-btn.primary {
    border-color: var(--neon-pink);
}

.nav-btn.primary:hover {
    box-shadow: var(--shadow-pink);
}

.nav-btn.success {
    border-color: #00ff88;
    animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
    0%, 100% { box-shadow: 0 0 5px #00ff88; }
    50% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.6); }
}

/* Список анкет */
/* Фильтры */
.filters-container {
    margin: 10px 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#browseAds .filters-container {
    overflow: visible;
    padding-top: 3px;
}

.filter-toggle-btn {
    width: 100%;
    padding: 9px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(131, 56, 236, 0.15));
    border: 1px solid var(--neon-cyan);
    border-radius: 10px;
    color: var(--neon-cyan);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#browseAds .filter-toggle-btn,
#browseLuckyBtn,
#browseAds .change-location-btn,
#browseAds .filter-actions .neon-button {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.12;
}

#browseLuckyBtn {
    min-height: 48px;
    text-transform: none !important;
    letter-spacing: 0.2px !important;
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.25), rgba(131, 56, 236, 0.25));
    transform: translateY(-2px);
}

#browseAds .filter-toggle-btn:hover {
    transform: translateY(-1px);
}

#filterBadge {
    background: var(--neon-pink);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.filter-summary {
    display: none;
    max-width: 55%;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 217, 255, 0.16);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

.filters-panel {
    margin-top: 6px;
    padding: 12px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    animation: slideDown 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    margin-bottom: 10px;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.radius-filter-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(0, 217, 255, 0.45);
    border-radius: 8px;
    background: rgba(26, 26, 46, 0.88);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
    box-sizing: border-box;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.radius-filter-select:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.25);
}

.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
}

/* Кнопки Пол и Ищет - в одну строку, полные названия */
.gender-target-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gender-target-buttons .filter-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.75rem;
    padding: 8px 6px;
}

.filter-btn {
    flex: 1 1 auto;
    min-width: 70px;
    max-width: 100%;
    padding: 8px 10px;
    background: rgba(131, 56, 236, 0.2);
    border: 1px solid rgba(131, 56, 236, 0.5);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap; /* Одна строка */
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    box-sizing: border-box;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Ориентация - компактные кнопки в одну строку */
.orientation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.orientation-buttons .filter-btn {
    flex: 0 0 auto;
    min-width: auto;
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Иконки в фильтрах */
.filter-icon {
    margin-right: 2px;
}

/* iOS: скрываем гендерные символы ♂️♀️ */
@supports (-webkit-touch-callout: none) {
    .gender-icon {
        display: none;
    }
}

.filter-btn:hover {
    background: rgba(131, 56, 236, 0.3);
    border-color: var(--neon-purple);
}

.filter-btn.active {
    background: var(--neon-purple);
    border-color: var(--neon-purple);
    color: #fff;
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.5);
}

.age-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.age-filter input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
}

.age-filter input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.age-filter span {
    color: var(--text-gray);
    font-weight: bold;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.filter-actions .neon-button {
    flex: 1;
}

.filter-actions .secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-actions .secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.ads-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

.ad-card {
    display: block;
    background: linear-gradient(135deg, var(--bg-card), #262636);
    border: 1px solid var(--neon-purple);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
}

.ad-card.is-pinned {
    margin-top: 18px;
    padding-top: 12px;
}

.ad-card.compact.is-pinned {
    padding-top: 10px;
}

/* Миниатюра фото в карточке анкеты */
.ad-photo-thumbnail {
    width: calc(100% + 24px);
    height: 100px;
    margin: -12px -12px 8px -12px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: 2px solid var(--neon-purple);
}

.ad-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.ad-card:hover .ad-photo-thumbnail img {
    transform: scale(1.05);
}

/* Компактный режим карточек анкет */
.ads-list.compact {
    display: grid;
    gap: 8px;
}

.ad-card.compact {
    padding: 10px 12px;
    border-radius: 12px;
}

.ad-card.compact .ad-photo-thumbnail {
    height: 80px;
    margin: -10px -12px 6px -12px;
    border-radius: 12px 12px 0 0;
}

.ad-card.compact .ad-header {
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 6px;
    padding-bottom: 4px;
    min-width: 0;
}

.ad-card.compact h3 {
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-card.compact .created-at {
    flex: 0 0 auto;
    max-width: 96px;
    font-size: 0.65rem;
    color: var(--text-gray);
    opacity: 0.7;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Last seen badge в карточке анкеты */
.ad-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.ad-author-row h3 {
    margin: 0;
    min-width: 0;
}

.ad-card.compact .ad-author-row {
    flex: 1 1 auto;
    gap: 4px 6px;
}

.ad-card.compact .ad-author-row h3 {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.last-seen-badge {
    font-size: 0.7rem;
    color: #6cc070;
    padding: 2px 8px;
    background: rgba(108, 192, 112, 0.12);
    border-radius: 6px;
    display: inline-block;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-card.compact .last-seen-badge {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-card.compact .ad-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.ad-card.compact .ad-field {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 11px;
    color: var(--text-light);
    gap: 3px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-card.compact .ad-field .label { display:none; }
.ad-card.compact .ad-field .icon {
    flex: 0 0 auto;
}
.ad-card.compact .ad-field .value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}

.ad-distance-badge,
.ad-location-distance {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    background: rgba(0, 217, 255, 0.12);
    color: var(--neon-cyan);
    font-size: 0.78em;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.ad-card.compact .ad-distance-badge {
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 0.86em;
}

.ad-card.compact .ad-text {
    margin-top: 4px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 11.5px;
    font-style: normal;
    line-height: 1.5;
    color: var(--text-light);
    opacity: 0.85;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.toggle-compact-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.toggle-compact-btn:hover {
    background: rgba(255,255,255,0.15);
}

.ad-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ad-card:hover::before {
    opacity: 1;
}

.ad-card:hover {
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-pink);
    transform: translateY(-5px);
}

.ad-info {
    display: grid;
    gap: 6px;
}

.ad-field {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Fix: allow long text like "свободные отношения" to wrap */
    gap: 6px;
    font-size: 13px;
}

.ad-field .icon {
    font-size: 15px;
    /* убран filter:drop-shadow — конфликт с will-change:transform на TOP-карточках в WebView */
}

.ad-field .label {
    color: var(--text-gray);
    min-width: 100px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-field .value {
    color: var(--text-light);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Заголовок карточки анкеты */
.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 0, 110, 0.15);
}

.ad-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--neon-pink);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-date {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Поле на всю ширину (для описания) */
.ad-field.full-width {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 3px solid var(--neon-cyan);
}

.ad-field.full-width span:last-child {
    width: 100%;
    word-wrap: break-word;
}

.ad-text {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 2px solid var(--neon-cyan);
    font-style: italic;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#myAds .ad-card,
#myAds .ad-card .ad-info,
#myAds .ad-card .ad-field,
#myAds .ad-card .ad-field.full-width,
#myAds .ad-card .ad-text {
    color: #f4f7fb !important;
    -webkit-text-fill-color: #f4f7fb !important;
}

#myAds .ad-card .ad-field strong,
#myAds .ad-card .ad-field.full-width strong {
    color: #dbeafe !important;
    -webkit-text-fill-color: #dbeafe !important;
}

#myAds .ad-card .ad-field.full-width,
#myAds .ad-card .ad-text {
    background: rgba(8, 8, 18, 0.72) !important;
    border-left-color: var(--neon-cyan) !important;
}

#myAds .ad-card .ad-field .label {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
}

#myAds .ad-card .ad-field .value {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Детали анкеты */
.ad-details {
    padding: 0;
    margin-bottom: 0;
    padding-bottom: 12px;
}

.ad-details-footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background:
        linear-gradient(180deg, rgba(8, 8, 18, 0.60), rgba(8, 8, 18, 0.90)),
        rgba(8, 8, 18, 0.78);
    border: 1px solid rgba(0, 217, 255, 0.24);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    margin-top: 15px;
}

.detail-field {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.detail-field .icon {
    font-size: 20px;
    min-width: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.detail-field .content {
    flex: 1;
}

.detail-field .label {
    color: var(--text-gray);
    font-size: 11px;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.detail-field .value {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Фильтр городов */
.city-filter {
    margin-bottom: 30px;
}

.city-btn.filter.selected {
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-purple));
    animation: pulse-pink 2s infinite;
}

/* Адаптивность */
@media (max-width: 480px) {
    .screen {
        padding: 15px;
    }

    .city-grid {
        grid-template-columns: 1fr 1fr;
    }

    .age-range {
        flex-direction: column;
        gap: 15px;
    }

    .form-navigation {
        flex-direction: column;
    }

    /* Для create-ad оставляем горизонтально, чтобы позиция и размер были стабильны */
    #createAd .form-navigation {
        flex-direction: row;
        gap: 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }
}

/* Анимации загрузки */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Скроллбар - автоскрытие */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
}

/* Показываем скроллбар при скролле */
.scrolling::-webkit-scrollbar-thumb {
    opacity: 1;
}

/* Для всех скроллируемых элементов */
* {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

*.scrolling {
    scrollbar-color: rgba(255, 32, 110, 0.8) transparent;
}

/* Система выбора локации */
.form-country-selection, .form-region-selection, .form-city-selection {
    margin: 1.5rem 0;
    animation: fadeIn 0.5s ease;
}

.form-country-selection h4, .form-region-selection h4, .form-city-selection h4 {
    color: var(--neon-cyan);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Кнопки стран */
.country-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 1rem 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.25rem 0.35rem 0.35rem;
    box-sizing: border-box;
}

.country-btn {
    background: linear-gradient(135deg,
        rgba(131, 56, 236, 0.2) 0%,
        rgba(0, 217, 255, 0.2) 100%);
    border: 1.5px solid rgba(131, 56, 236, 0.5);
    color: #fff;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.22rem;
    min-height: 36px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.country-label {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.country-flag {
    width: 1.1rem;
    height: 0.78rem;
    flex: 0 0 1.1rem;
    display: block;
    border-radius: 2px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.08);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.country-flag-ru { background-image: url("images/flags/ru.svg?v=20260602"); }
.country-flag-kz { background-image: url("images/flags/kz.svg?v=20260602"); }
.country-flag-by { background-image: url("images/flags/by.svg?v=20260602"); }
.country-flag-ua { background-image: url("images/flags/ua.svg?v=20260602"); }
.country-flag-kg { background-image: url("images/flags/kg.svg?v=20260602"); }
.country-flag-tj { background-image: url("images/flags/tj.svg?v=20260602"); }
.country-flag-uz { background-image: url("images/flags/uz.svg?v=20260602"); }
.country-flag-am { background-image: url("images/flags/am.svg?v=20260602"); }
.country-flag-az { background-image: url("images/flags/az.svg?v=20260602"); }
.country-flag-md { background-image: url("images/flags/md.svg?v=20260602"); }
.country-flag-ge { background-image: url("images/flags/ge.svg?v=20260602"); }
.country-flag-us { background-image: url("images/flags/us.svg?v=20260602"); }
.country-flag-ca { background-image: url("images/flags/ca.svg?v=20260602"); }
.country-flag-au { background-image: url("images/flags/au.svg?v=20260602"); }
.country-flag-nz { background-image: url("images/flags/nz.svg?v=20260602"); }
.country-flag-gb { background-image: url("images/flags/gb.svg?v=20260602"); }
.country-flag-es { background-image: url("images/flags/es.svg?v=20260621"); }
.country-flag-mx { background-image: url("images/flags/mx.svg?v=20260621"); }
.country-flag-gt { background-image: url("images/flags/gt.svg?v=20260621"); }
.country-flag-hn { background-image: url("images/flags/hn.svg?v=20260621"); }
.country-flag-sv { background-image: url("images/flags/sv.svg?v=20260621"); }
.country-flag-ni { background-image: url("images/flags/ni.svg?v=20260621"); }
.country-flag-cr { background-image: url("images/flags/cr.svg?v=20260621"); }
.country-flag-pa { background-image: url("images/flags/pa.svg?v=20260621"); }
.country-flag-cu { background-image: url("images/flags/cu.svg?v=20260621"); }
.country-flag-do { background-image: url("images/flags/do.svg?v=20260621"); }
.country-flag-pr { background-image: url("images/flags/pr.svg?v=20260621"); }
.country-flag-co { background-image: url("images/flags/co.svg?v=20260621"); }
.country-flag-ve { background-image: url("images/flags/ve.svg?v=20260621"); }
.country-flag-ec { background-image: url("images/flags/ec.svg?v=20260621"); }
.country-flag-pe { background-image: url("images/flags/pe.svg?v=20260621"); }
.country-flag-bo { background-image: url("images/flags/bo.svg?v=20260621"); }
.country-flag-cl { background-image: url("images/flags/cl.svg?v=20260621"); }
.country-flag-ar { background-image: url("images/flags/ar.svg?v=20260621"); }
.country-flag-py { background-image: url("images/flags/py.svg?v=20260621"); }
.country-flag-uy { background-image: url("images/flags/uy.svg?v=20260621"); }
.country-flag-gq { background-image: url("images/flags/gq.svg?v=20260621"); }
.country-flag-at { background-image: url("images/flags/at.svg?v=20260623"); }
.country-flag-be { background-image: url("images/flags/be.svg?v=20260623"); }
.country-flag-bg { background-image: url("images/flags/bg.svg?v=20260623"); }
.country-flag-hr { background-image: url("images/flags/hr.svg?v=20260623"); }
.country-flag-cy { background-image: url("images/flags/cy.svg?v=20260623"); }
.country-flag-cz { background-image: url("images/flags/cz.svg?v=20260623"); }
.country-flag-dk { background-image: url("images/flags/dk.svg?v=20260623"); }
.country-flag-ee { background-image: url("images/flags/ee.svg?v=20260623"); }
.country-flag-fi { background-image: url("images/flags/fi.svg?v=20260623"); }
.country-flag-fr { background-image: url("images/flags/fr.svg?v=20260623"); }
.country-flag-de { background-image: url("images/flags/de.svg?v=20260623"); }
.country-flag-gr { background-image: url("images/flags/gr.svg?v=20260623"); }
.country-flag-hu { background-image: url("images/flags/hu.svg?v=20260623"); }
.country-flag-ie { background-image: url("images/flags/ie.svg?v=20260623"); }
.country-flag-it { background-image: url("images/flags/it.svg?v=20260623"); }
.country-flag-lv { background-image: url("images/flags/lv.svg?v=20260623"); }
.country-flag-lt { background-image: url("images/flags/lt.svg?v=20260623"); }
.country-flag-lu { background-image: url("images/flags/lu.svg?v=20260623"); }
.country-flag-mt { background-image: url("images/flags/mt.svg?v=20260623"); }
.country-flag-nl { background-image: url("images/flags/nl.svg?v=20260623"); }
.country-flag-pl { background-image: url("images/flags/pl.svg?v=20260623"); }
.country-flag-pt { background-image: url("images/flags/pt.svg?v=20260623"); }
.country-flag-ro { background-image: url("images/flags/ro.svg?v=20260623"); }
.country-flag-sk { background-image: url("images/flags/sk.svg?v=20260623"); }
.country-flag-si { background-image: url("images/flags/si.svg?v=20260623"); }
.country-flag-se { background-image: url("images/flags/se.svg?v=20260623"); }

.country-btn:hover {
    border-color: var(--neon-purple);
    box-shadow:
        0 0 20px rgba(131, 56, 236, 0.4),
        inset 0 0 20px rgba(131, 56, 236, 0.1);
    transform: translateY(-2px);
}

.country-btn.active {
    border-color: var(--neon-cyan);
    background: linear-gradient(135deg,
        rgba(0, 217, 255, 0.3) 0%,
        rgba(131, 56, 236, 0.3) 100%);
    box-shadow:
        0 0 25px rgba(0, 217, 255, 0.5),
        inset 0 0 25px rgba(0, 217, 255, 0.2);
}

.flag {
    font-size: 0.95rem;
    flex-shrink: 0;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    -webkit-user-select: none;
    user-select: none;
}

@media (min-width: 768px) {
    .flag {
        font-size: 1.1rem;
    }

    .country-flag {
        width: 1.25rem;
        height: 0.88rem;
        flex-basis: 1.25rem;
    }
}

.country-code {
    background: rgba(131, 56, 236, 0.6);
    padding: 0.13rem 0.3rem;
    border-radius: 5px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0;
    border: 1px solid rgba(131, 56, 236, 0.8);
    flex-shrink: 0;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Контейнеры поиска */
.search-container {
    position: relative;
    margin: 1rem 0;
}

.form-region-input, .form-city-input {
    width: 100%;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(255, 0, 110, 0.5);
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-region-input:focus, .form-city-input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow:
        0 0 20px rgba(255, 0, 110, 0.3),
        inset 0 0 20px rgba(255, 0, 110, 0.1);
}

.form-region-input::placeholder, .form-city-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Список предложений */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    border: 2px solid rgba(255, 0, 110, 0.3);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 32, 110, 0.85) rgba(255, 255, 255, 0.08);
}

.suggestions-list.active {
    display: block;
}

.suggestions-list::-webkit-scrollbar {
    width: 8px;
}

.suggestions-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
    border-radius: 4px;
    opacity: 1;
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 0, 110, 0.2);
    transition: all 0.2s ease;
    color: #fff;
}

.suggestion-item:hover {
    background: rgba(255, 0, 110, 0.2);
    color: var(--neon-pink);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.missing-city-did-you-mean-modal {
    padding: 16px;
    z-index: 10050;
}

.missing-city-did-you-mean-content {
    max-width: 430px;
    width: min(92vw, 430px);
    padding: 24px;
    border-color: rgba(255, 0, 110, 0.78);
    background: rgba(26, 27, 50, 0.98);
}

.missing-city-did-you-mean-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.missing-city-did-you-mean-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: #fff;
    font-size: 1.8rem;
    font-weight: 900;
    box-shadow: 0 0 18px rgba(255, 0, 110, 0.45);
}

.missing-city-did-you-mean-content h3 {
    margin: 0 36px 8px;
    color: var(--text-light);
    text-align: center;
    font-size: 1.25rem;
}

.missing-city-did-you-mean-content p {
    margin: 0 0 16px;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.45;
}

.missing-city-did-you-mean-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.missing-city-did-you-mean-option,
.missing-city-did-you-mean-force,
.missing-city-did-you-mean-cancel {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 13px 14px;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.missing-city-did-you-mean-option {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.42);
}

.missing-city-did-you-mean-option small {
    color: var(--text-gray);
    font-size: 0.78rem;
    font-weight: 600;
}

.missing-city-did-you-mean-option:hover,
.missing-city-did-you-mean-force:hover,
.missing-city-did-you-mean-cancel:hover {
    transform: translateY(-1px);
}

.missing-city-did-you-mean-option:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.28);
}

.missing-city-did-you-mean-force {
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    box-shadow: 0 10px 26px rgba(255, 0, 110, 0.28);
}

.missing-city-did-you-mean-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
}

/* Отображение выбранной локации */
.form-selected-location {
    margin: 1.5rem 0;
    padding: 1rem;
    background: linear-gradient(135deg,
        rgba(0, 217, 255, 0.1) 0%,
        rgba(255, 0, 110, 0.1) 100%);
    border: 2px solid rgba(0, 217, 255, 0.5);
    border-radius: 15px;
    animation: fadeIn 0.5s ease;
}

/* Настройка локации при первом запуске */
.location-setup-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem 2rem;
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.setup-country-selection,
.setup-region-selection,
.setup-city-selection {
    margin: 1.5rem 0;
    animation: fadeIn 0.5s ease;
    width: 100% !important;
    max-width: 400px !important;
}

.setup-country-selection h3,
.setup-region-selection h3,
.setup-city-selection h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 217, 255, 0.3);
    text-align: center;
    font-weight: 600;
}

#locationSetup .location-setup-container {
    max-width: 430px !important;
    padding: 0.7rem 1rem 1.4rem !important;
}

#locationSetup .auto-location-section {
    margin-bottom: 8px;
}

#locationSetup .auto-location-section .neon-button {
    min-height: 44px;
    color: #ffffff;
    border-color: rgba(255, 0, 110, 0.72);
    background: linear-gradient(135deg, rgba(22, 28, 48, 0.92), rgba(54, 22, 58, 0.9));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28), 0 0 18px rgba(255, 0, 110, 0.2);
}

#locationSetup .or-divider {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 14px 0 6px;
    color: #f7fbff !important;
    opacity: 1;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.86);
}

#locationSetup .or-divider::before,
#locationSetup .or-divider::after {
    position: static;
    flex: 1 1 0;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34));
}

#locationSetup .or-divider::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent);
}

#locationSetup .setup-country-selection {
    margin: 0.8rem 0 1rem;
}

#locationSetup .setup-country-selection.country-dropdown-open {
    margin-bottom: min(46vh, 380px);
}

#locationSetup .setup-country-selection h3 {
    margin-bottom: 0.7rem;
    color: #ffffff !important;
    font-size: 1.08rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.82), 0 0 14px rgba(0, 217, 255, 0.22);
}

#locationSetup .country-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(400px, 45vh);
    gap: 0.65rem;
    margin: 0;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(4, 9, 23, 0.72);
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.05), 0 14px 28px rgba(0, 0, 0, 0.28);
}

#locationSetup .country-btn {
    min-height: 44px;
    padding: 0.62rem 0.7rem;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(247, 250, 255, 0.1);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.78);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

#locationSetup .country-btn:hover {
    border-color: rgba(0, 217, 255, 0.68);
    background: rgba(0, 217, 255, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 18px rgba(0, 217, 255, 0.18);
    transform: translateY(-1px);
}

#locationSetup .country-btn.active {
    border-color: rgba(0, 217, 255, 0.9);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.22), rgba(255, 0, 110, 0.18));
    box-shadow: 0 0 22px rgba(0, 217, 255, 0.34), inset 0 0 18px rgba(0, 217, 255, 0.1);
}

#locationSetup .country-label {
    overflow: visible;
    text-overflow: unset;
}

#locationSetup .country-flag {
    width: 1.25rem;
    height: 0.88rem;
    flex-basis: 1.25rem;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 2px 5px rgba(0, 0, 0, 0.36);
}

.setup-region-input,
.setup-city-input {
    width: 100%;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid rgba(255, 0, 110, 0.5);
    color: #fff;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.setup-region-input:focus,
.setup-city-input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow:
        0 0 20px rgba(255, 0, 110, 0.3),
        inset 0 0 20px rgba(255, 0, 110, 0.1);
}

.setup-selected-location {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg,
        rgba(0, 217, 255, 0.1) 0%,
        rgba(255, 0, 110, 0.1) 100%);
    border: 2px solid rgba(0, 217, 255, 0.5);
    border-radius: 15px;
    animation: fadeIn 0.5s ease;
    text-align: center;
}

.setup-selected-location .neon-button {
    width: fit-content;
    min-width: 160px;
    max-width: 100%;
    margin: 1rem auto 0;
}

.setup-location-text {
    color: var(--neon-cyan);
    font-weight: 500;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    display: block;
    margin-bottom: 1rem;
}

.reset-setup-location {
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid rgba(255, 0, 110, 0.5);
    color: var(--neon-pink);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.reset-setup-location:hover {
    background: rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.4);
}

/* Отображение текущей локации в главном меню */
.user-location {
    margin-top: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.user-location:hover {
    background: rgba(0, 217, 255, 0.1);
    transform: scale(1.02);
}

.location-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--neon-cyan);
    font-size: 0.85rem;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.location-info .app-icon {
    --app-icon-size: 1.25em;
}

/* Статистика по городу */
.city-stats-block {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
    background: rgba(4, 7, 18, 0.74);
    border: 1px solid rgba(0, 217, 255, 0.52);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.city-stats-block div {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.75);
}

.city-stats-block b {
    color: #ffffff;
    font-weight: 800;
}

/* Счетчик посещений */
.site-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat-icon {
    --app-icon-size: 1.3rem;
    font-size: 1rem;
    filter:
        drop-shadow(0 0 4px var(--app-icon-glow, rgba(0, 217, 255, 0.78)))
        drop-shadow(0 1px 5px rgba(0, 0, 0, 0.55));
}

.main-daily-bonus-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(236,72,153,0.3);
    transition: opacity 0.2s;
}

.main-daily-bonus-button .app-icon {
    --app-icon-size: 1em;
}

.main-language-switcher {
    position: relative;
    width: 64px;
    min-height: 28px;
    z-index: 235;
}

.main-language-toggle,
.main-language-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 217, 255, 0.32);
    background:
        linear-gradient(135deg, rgba(9, 13, 34, 0.94), rgba(53, 17, 61, 0.88));
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    cursor: pointer;
    text-align: center;
    text-shadow: 0 1px 7px rgba(0, 0, 0, 0.86);
    box-shadow:
        0 0 12px rgba(0, 217, 255, 0.16),
        0 0 18px rgba(255, 0, 110, 0.12),
        inset 0 0 10px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.main-language-toggle {
    width: 100%;
    height: 28px;
    border-radius: 999px;
    gap: 4px;
    padding: 0 8px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.32), rgba(255, 0, 110, 0.42)),
        linear-gradient(135deg, rgba(9, 13, 34, 0.94), rgba(53, 17, 61, 0.88));
    border-color: rgba(255, 0, 110, 0.46);
    box-shadow:
        0 0 12px rgba(0, 217, 255, 0.28),
        0 0 14px rgba(255, 0, 110, 0.24),
        inset 0 0 10px rgba(255, 255, 255, 0.06);
}

.main-language-toggle span {
    white-space: nowrap;
}

#mainLanguageCurrent,
.hamburger-language-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.main-language-flag {
    width: 1.05rem;
    height: 0.74rem;
    flex: 0 0 1.05rem;
}

.main-language-code {
    line-height: 1;
    white-space: nowrap;
}

.main-language-caret {
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid rgba(255, 255, 255, 0.86);
    transition: transform 0.18s ease;
}

.main-language-switcher.is-open .main-language-caret {
    transform: rotate(180deg);
}

.main-language-list {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 50px;
    padding: 4px;
    border: 1px solid rgba(0, 217, 255, 0.28);
    border-radius: 14px;
    background: rgba(6, 9, 28, 0.94);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.42),
        0 0 16px rgba(0, 217, 255, 0.18),
        inset 0 0 12px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.main-language-list[hidden] {
    display: none !important;
}

.main-language-option {
    width: 100%;
    height: 25px;
    border-radius: 10px;
    padding: 0;
}

.main-language-option:hover,
.main-language-option:focus-visible {
    border-color: rgba(255, 0, 110, 0.58);
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.24), rgba(255, 0, 110, 0.24)),
        rgba(13, 16, 42, 0.94);
}

.main-language-option[hidden] {
    display: none !important;
}

.main-language-toggle:focus-visible,
.main-language-option:focus-visible {
    outline: 2px solid rgba(0, 217, 255, 0.8);
    outline-offset: 2px;
}

#mainMenu .main-logo-wordmark {
    display: inline-block;
    position: relative;
    z-index: 1;
    isolation: isolate;
    width: fit-content;
    max-width: 100%;
    margin: 5px auto 0;
    padding: 0 10px 2px;
    color: #fff;
    font-family: "AnonimkaWordmark", "Dancing Script", "Segoe Script", "Brush Script MT", cursive;
    font-size: 32px;
    font-weight: 700;
    line-height: 0.94;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    background: linear-gradient(
        110deg,
        #ffffff 0%,
        #4ff5ff 22%,
        #00d9ff 38%,
        #ff4fcb 56%,
        #ff006e 74%,
        #fff4fb 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: none;
    animation: main-logo-wordmark-flow 3s linear infinite;
    will-change: background-position;
}

#mainMenu .main-logo-wordmark::before {
    content: "";
    position: absolute;
    left: -20px;
    right: -20px;
    bottom: -11px;
    height: 26px;
    z-index: -2;
    border-radius: 999px;
    background:
        radial-gradient(ellipse at center,
            rgba(1, 4, 18, 0.88) 0%,
            rgba(4, 8, 28, 0.7) 34%,
            rgba(0, 217, 255, 0.22) 55%,
            rgba(255, 0, 110, 0.16) 68%,
            transparent 82%);
    filter: blur(8px);
    pointer-events: none;
}

#mainMenu .main-logo-wordmark::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: -6px;
    height: 11px;
    z-index: -1;
    border-radius: 999px;
    background:
        radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 217, 255, 0.26) 42%,
            rgba(255, 0, 110, 0.18) 58%,
            transparent 78%);
    filter: blur(4px);
    pointer-events: none;
}

@keyframes main-logo-wordmark-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #mainMenu .main-logo-wordmark {
        animation: none;
        background-position: 50% 50%;
    }
}

.stat-value {
    color: var(--neon-pink);
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.stat-divider {
    color: var(--text-gray);
    opacity: 0.5;
}

/* Третичная кнопка для смены города */
.neon-button.tertiary {
    background: linear-gradient(135deg,
        rgba(131, 56, 236, 0.2) 0%,
        rgba(0, 217, 255, 0.2) 100%);
    border: 2px solid rgba(131, 56, 236, 0.5);
    color: var(--neon-purple);
}

.neon-button.tertiary:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-2px);
}

/* Четвертичная кнопка для автоопределения */
.neon-button.quaternary {
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.2) 0%,
        rgba(255, 0, 110, 0.2) 100%);
    border: 2px solid rgba(0, 255, 136, 0.5);
    color: #00ff88;
}

.neon-button.quaternary:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
    transform: translateY(-2px);
}

/* Текущая локация в форме */
.current-location {
    margin: 1rem 0 2rem 0;
    padding: 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    text-align: center;
}

.current-location p {
    color: white;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.ad-geo-visible-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 500px);
    margin: -0.8rem auto 1.4rem;
    padding: 10px 12px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-radius: 10px;
    background: rgba(10, 10, 20, 0.45);
    color: var(--text-light);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

.ad-geo-visible-toggle input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: var(--neon-cyan);
}

.ad-geo-visible-toggle span {
    min-width: 0;
}

.change-location-btn {
    background: rgba(131, 56, 236, 0.2);
    border: 2px solid rgba(131, 56, 236, 0.5);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.change-location-btn:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
    transform: translateY(-2px);
}

.location-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-location-text {
    color: var(--neon-cyan);
    font-weight: 500;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.reset-form-location {
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid rgba(255, 0, 110, 0.5);
    color: var(--neon-pink);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.reset-form-location:hover {
    background: rgba(255, 0, 110, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.4);
}

/* Экран выбора способа определения локации */
.location-choice-container {
    max-width: 500px;
    margin: 1rem auto;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.location-choice-btn {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--text-light);
}

.location-choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-cyan);
    border-color: var(--neon-pink);
}

.location-choice-btn.manual {
    border-color: var(--neon-pink);
}

.location-choice-btn.manual:hover {
    box-shadow: 0 8px 20px var(--shadow-pink);
}

.choice-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.location-choice-btn h3 {
    font-size: 1.1rem;
    margin: 0 0 0.3rem 0;
    color: var(--text-light);
}

.location-choice-btn p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.4;
}

/* Автоматическое определение локации */
.auto-location-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0.5rem 1rem 1rem 1rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.detection-animation {
    margin-bottom: 1.5rem;
}

.radar-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.radar-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 50%;
    animation: outer-glow 3s infinite ease-in-out;
}

@keyframes outer-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
    }
}

.radar-circle {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
    opacity: 0;
    animation: radar-pulse 2.5s infinite ease-out;
}

.radar-circle:nth-child(1) {
    width: 55px;
    height: 55px;
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px var(--neon-pink);
}

.radar-circle:nth-child(2) {
    width: 95px;
    height: 95px;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.radar-circle:nth-child(3) {
    width: 135px;
    height: 135px;
    border-color: var(--neon-purple);
    box-shadow: 0 0 25px var(--neon-purple);
}

.radar-circle.delay-1 {
    animation-delay: 0.8s;
}

.radar-circle.delay-2 {
    animation-delay: 1.6s;
}

.radar-ping {
    position: relative;
    font-size: 2rem;
    z-index: 10;
    animation: ping-glow 2s infinite ease-in-out;
    background: radial-gradient(circle, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes radar-pulse {
    0% {
        transform: scale(0.2);
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes ping-glow {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 10px var(--neon-cyan)) drop-shadow(0 0 20px var(--neon-pink));
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        filter: drop-shadow(0 0 20px var(--neon-pink)) drop-shadow(0 0 30px var(--neon-cyan));
    }
}

.detection-text {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-purple));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-gradient 2s ease-in-out infinite, text-pulse 1.5s infinite ease-in-out;
    position: relative;
}

.detection-text::after {
    content: '...';
    position: absolute;
    right: -20px;
    animation: dots 1.5s infinite;
}

@keyframes text-gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes text-pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes dots {
    0%, 20% { opacity: 0; }
    40% { opacity: 1; }
    60% { opacity: 1; }
    80%, 100% { opacity: 0; }
}

.pulse {
    animation: neon-pulse 2s infinite ease-in-out;
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: var(--shadow-pink);
        transform: scale(1);
    }
    50% {
        text-shadow: var(--shadow-cyan);
        transform: scale(1.05);
    }
}

.auto-detection-status {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 15px;
    border: 2px solid var(--neon-purple);
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    font-size: 2rem;
    animation: spin 1s linear infinite;
    color: var(--neon-cyan);
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-animation p {
    color: var(--text-gray);
}

/* Результат определения локации */
.detection-result {
    background: linear-gradient(135deg, var(--bg-card), #2a2a3e);
    border: 2px solid var(--neon-purple);
    border-radius: 15px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    animation: result-appear 0.8s ease-out;
    text-align: center;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.detection-result::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple));
    border-radius: 15px;
    z-index: -1;
    animation: border-glow 3s infinite ease-in-out;
}

@keyframes result-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes border-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.detected-location, .detection-error {
    text-align: center;
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.success-icon, .error-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: icon-bounce 0.6s ease-out;
}

.success-icon {
    filter: drop-shadow(0 0 10px #00ff88);
}

.error-icon {
    filter: drop-shadow(0 0 10px var(--neon-pink));
}

@keyframes icon-bounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.detected-location h3, .detection-error h3 {
    margin-bottom: 0.8rem;
    color: var(--text-light);
    text-shadow: var(--shadow-cyan);
    font-size: 1.1rem;
}

.location-info {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 0.7rem;
    margin: 0.8rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.location-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.location-flag {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.location-text {
    text-shadow: none;
    font-weight: 600;
    color: var(--neon-cyan);
}

.detection-note {
    font-size: 0.9rem;
    color: #ffa500;
    margin: 0.5rem 0;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

.detection-source {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-style: italic;
    opacity: 0.8;
    text-align: center;
    width: 100%;
}

.location-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    margin: 1rem auto 0 auto;
    text-align: center;
    width: 100%;
}

.confirm-btn, .manual-btn {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(42, 42, 62, 0.9));
    border: 2px solid transparent;
    color: var(--text-light);
    padding: 0.7rem 1.3rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 0.85rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.confirm-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 100, 0.15));
    border: 2px solid #00ff88;
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
}

.confirm-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff88, #00cc6a, #00ff88);
    background-size: 200% 200%;
    border-radius: 20px;
    z-index: -1;
    animation: border-glow 2s ease-in-out infinite;
    opacity: 0.7;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 30px rgba(0, 255, 136, 0.7),
        0 6px 20px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 20px rgba(0, 255, 136, 1);
    border-color: #00ff88;
}

.manual-btn {
    background: linear-gradient(135deg, rgba(255, 136, 0, 0.15), rgba(255, 100, 0, 0.15));
    border: 2px solid #ff8800;
    box-shadow:
        0 0 20px rgba(255, 136, 0, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 136, 0, 0.6);
}

.manual-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff8800, #ff6600, #ff8800);
    background-size: 200% 200%;
    border-radius: 20px;
    z-index: -1;
    animation: border-glow 2.5s ease-in-out infinite;
    opacity: 0.7;
}

.manual-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 30px rgba(255, 136, 0, 0.7),
        0 6px 20px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 20px rgba(255, 136, 0, 1);
    border-color: #ff8800;
}

@keyframes border-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.confirm-btn::after, .manual-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.confirm-btn:hover::after, .manual-btn:hover::after {
    width: 100%;
    height: 100%;
}

/* Популярные локации */
.popular-locations {
    text-align: center;
}

.info-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: icon-bounce 0.6s ease-out;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.popular-locations h3 {
    margin-bottom: 1rem;
    color: var(--text-light);
    text-shadow: var(--shadow-cyan);
    font-size: 1.4rem;
}

.popular-locations p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.popular-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.location-option {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(42, 42, 62, 0.8));
    border: 2px solid var(--neon-purple);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.location-option::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-purple), var(--neon-cyan), var(--neon-purple));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-option:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 25px rgba(0, 217, 255, 0.4);
}

.location-option:hover::before {
    opacity: 1;
}

.location-option.russia:hover {
    box-shadow: 0 5px 25px rgba(255, 0, 110, 0.4);
}

.location-option.russia:hover::before {
    background: linear-gradient(45deg, var(--neon-pink), #ff4081, var(--neon-pink));
}

.location-option.kazakhstan:hover {
    box-shadow: 0 5px 25px rgba(0, 255, 136, 0.4);
}

.location-option.kazakhstan:hover::before {
    background: linear-gradient(45deg, #00ff88, #00cc6a, #00ff88);
}

.location-option .flag {
    font-size: 2rem;
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.location-details {
    text-align: left;
    flex: 1;
}

.location-details strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.location-details span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.manual-choice {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 0, 110, 0.2);
}

.manual-choice .manual-btn {
    background: rgba(26, 26, 46, 0.5);
    border: 2px solid var(--neon-purple);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

/* =============== ГАМБУРГЕР МЕНЮ =============== */

/* Кнопка гамбургер-меню */
.hamburger-menu {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Глобальная кнопка гамбургер-меню (показывается на всех страницах) */
.global-hamburger-menu {
    position: fixed;
    top: 14px;
    left: 14px;
    width: 42px;
    height: 42px;
    background: linear-gradient(145deg, rgba(62, 52, 112, 0.97), rgba(34, 30, 68, 0.97));
    border: 1px solid rgba(198, 162, 255, 0.6);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    z-index: 1500;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
    transition: all 0.3s ease;
}

.global-hamburger-menu:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.6);
    border-color: var(--neon-cyan);
}

.global-hamburger-menu .hamburger-line {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.global-hamburger-menu:hover .hamburger-line {
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

html.telegram-fullscreen .global-hamburger-menu {
    top: calc(20px + var(--telegram-main-controls-top));
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.hamburger-menu:hover .hamburger-line {
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.8);
    transform: scaleX(1.1);
}

/* Overlay меню */
.hamburger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10005; /* Выше всего, включая premium-toggle (999), онбординг (10000) и снежинок (1000) */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hamburger-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Контент меню */
.hamburger-menu-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-card));
    border-right: 2px solid var(--neon-pink);
    box-shadow:
        0 0 50px rgba(255, 0, 110, 0.3),
        inset 0 0 50px rgba(255, 0, 110, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hamburger-overlay.active .hamburger-menu-content {
    transform: translateX(0);
}

/* Заголовок меню */
.hamburger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid rgba(255, 0, 110, 0.3);
    background: rgba(255, 0, 110, 0.1);
}

html.telegram-fullscreen .hamburger-header {
    padding-top: calc(1.2rem + var(--telegram-main-controls-top));
}

.hamburger-header h2 {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

.hamburger-close {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    color: var(--neon-pink);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-close:hover {
    background: var(--neon-pink);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.6);
    transform: rotate(90deg);
}

/* Навигация */
.hamburger-nav {
    padding: 1rem 0;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 120px);
    scrollbar-gutter: stable;
}

.hamburger-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    flex: 0 0 auto;
    padding: 0.8rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255, 0, 110, 0.1);
    border-left: 4px solid transparent;
    box-sizing: border-box;
    min-height: 52px;
    transition: color 0.2s ease, text-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hamburger-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, rgba(255, 0, 110, 0.2), rgba(131, 56, 236, 0.2));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
    z-index: 0;
    pointer-events: none;
}

.hamburger-item:hover::before,
.hamburger-item.active::before {
    transform: scaleX(1);
}

.hamburger-item > * {
    position: relative;
    z-index: 1;
}

.hamburger-item:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
    transform: none;
}

.hamburger-item.active {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
    border-left-color: var(--neon-pink);
}

.hamburger-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-left-color: transparent;
}

.hamburger-item.disabled::before {
    transform: scaleX(0);
}

.hamburger-item.disabled:hover {
    color: var(--text-light);
    text-shadow: none;
}

.hamburger-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.hamburger-icon svg {
    display: block;
    margin: 0 auto;
}

/* Android-специфичные элементы меню */
.android-only {
    display: none;
}

/* iOS-специфичные элементы меню */
.ios-only {
    display: none;
}

/* Скрыть для iOS */
.hide-on-ios {
    display: flex;
}

.non-android-only {
    display: flex;
}

/* Подменю настроек */
.hamburger-submenu {
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--neon-purple);
    margin-left: 10px;
}

.hamburger-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex: 0 0 auto;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.2;
    min-height: 45px;
    box-sizing: border-box;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hamburger-subitem:hover {
    color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.1);
    transform: none;
}

.hamburger-subitem.danger {
    color: #ff6b6b;
}

.hamburger-subitem.danger:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff4444;
}

.hamburger-subitem-toggle {
    justify-content: space-between;
    gap: 10px;
}

.hamburger-subitem-select {
    justify-content: space-between;
    gap: 12px;
}

.hamburger-subitem-language {
    justify-content: space-between;
    gap: 12px;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.hamburger-language-current {
    flex: 0 0 auto;
    min-width: 66px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 217, 255, 0.36);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(255, 0, 110, 0.18)),
        rgba(10, 12, 24, 0.9);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}

.hamburger-subitem-label {
    flex: 1;
}

.hamburger-select {
    min-width: 116px;
    max-width: 148px;
    height: 34px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(0, 217, 255, 0.36);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(255, 0, 110, 0.1)),
        rgba(10, 12, 24, 0.92);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    font-family: inherit;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image:
        linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(255, 0, 110, 0.1)),
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.9) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 50%, transparent 50%);
    background-position:
        0 0,
        calc(100% - 18px) 14px,
        calc(100% - 12px) 14px;
    background-size:
        100% 100%,
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

.hamburger-select:focus {
    border-color: rgba(0, 217, 255, 0.78);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.18), 0 0 18px rgba(0, 217, 255, 0.16);
}

.hamburger-select option {
    background: #10142a;
    color: #fff;
}

.language-modal {
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3, 6, 18, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 10050;
}

.language-modal-content {
    width: min(420px, 100%);
    max-height: min(82vh, 680px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.34);
    border-radius: 18px;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 217, 255, 0.18), transparent 34%),
        radial-gradient(circle at 85% 12%, rgba(255, 0, 110, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(11, 15, 39, 0.98), rgba(22, 12, 45, 0.98));
    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.6),
        0 0 28px rgba(0, 217, 255, 0.2),
        inset 0 0 18px rgba(255, 255, 255, 0.04);
}

.language-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.language-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.18rem;
    line-height: 1.15;
    letter-spacing: 0;
    text-shadow: 0 0 14px rgba(0, 217, 255, 0.35);
}

.language-modal-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.88rem;
    line-height: 1.35;
}

.language-modal-close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.language-modal-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.language-modal-option {
    position: relative;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.language-modal-option:hover,
.language-modal-option:focus-visible {
    border-color: rgba(0, 217, 255, 0.55);
    background: rgba(0, 217, 255, 0.12);
    outline: none;
}

.language-modal-option.is-active {
    border-color: rgba(255, 0, 110, 0.66);
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(255, 0, 110, 0.2)),
        rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 16px rgba(255, 0, 110, 0.16);
}

.language-modal-flag {
    flex: 0 0 auto;
    width: 2.15rem;
    height: 1.5rem;
    border-radius: 4px;
}

.language-modal-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.language-modal-code {
    color: #fff;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
}

.language-modal-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-modal-check {
    margin-left: auto;
    color: #00ff88;
    font-size: 1rem;
    font-weight: 900;
    opacity: 0;
}

.language-modal-option.is-active .language-modal-check {
    opacity: 1;
}

@media (max-width: 360px) {
    .language-modal-list {
        grid-template-columns: 1fr;
    }
}

.hamburger-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.hamburger-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hamburger-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.25s;
    border-radius: 999px;
}

.hamburger-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: #fff;
    transition: 0.25s;
    border-radius: 50%;
}

.hamburger-switch input:checked + .hamburger-slider {
    background: linear-gradient(135deg, #00d4ff, #00a8cc);
    border-color: rgba(0, 212, 255, 0.6);
}

.hamburger-switch input:checked + .hamburger-slider:before {
    transform: translateX(20px);
}

.hamburger-switch input:disabled + .hamburger-slider {
    opacity: 0.55;
    cursor: not-allowed;
}

.hamburger-subitem.disabled,
.hamburger-subitem-action.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    color: var(--text-light);
    text-shadow: none;
}

.hamburger-subitem-note {
    padding: 0 15px 10px 44px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hamburger-subitem-status {
    margin-left: auto;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 4px 8px;
    border: 1px solid rgba(0, 217, 255, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
}

.hamburger-subitem-status.enabled {
    color: #77ff9d;
    border-color: rgba(119, 255, 157, 0.48);
    background: rgba(0, 255, 136, 0.12);
}

.hamburger-subitem-status.warning {
    color: #ffd05a;
    border-color: rgba(255, 208, 90, 0.42);
    background: rgba(255, 208, 90, 0.1);
}

.app-lock-status-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        ". status";
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    margin: 12px 14px 0 44px;
    width: calc(100% - 58px);
    padding: 13px 12px 10px;
    min-height: 0;
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(255, 0, 110, 0.08)),
        rgba(10, 12, 24, 0.78);
    box-shadow: inset 0 0 18px rgba(0, 217, 255, 0.05);
}

.app-lock-status-row:hover {
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.15), rgba(255, 0, 110, 0.1)),
        rgba(10, 12, 24, 0.82);
    transform: none;
}

.app-lock-status-row .hamburger-icon {
    grid-area: icon;
    align-self: start;
    margin-top: 1px;
}

.app-lock-status-row .hamburger-subitem-label {
    grid-area: label;
}

.app-lock-status-row .hamburger-subitem-status {
    grid-area: status;
    justify-self: start;
    margin-left: 0;
    white-space: nowrap;
}

.app-lock-status-row .hamburger-subitem-label,
#biometricToggleContainer .hamburger-subitem-label {
    min-width: 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.app-lock-actions {
    display: flex;
    gap: 8px;
    margin: 0 14px 0 44px;
    padding: 8px 12px 10px;
    border-left: 1px solid rgba(0, 217, 255, 0.22);
    border-right: 1px solid rgba(0, 217, 255, 0.22);
    background: rgba(10, 12, 24, 0.78);
}

.app-lock-actions .hamburger-subitem-action {
    margin: 0;
    width: auto;
    flex: 1;
    min-height: 42px;
    border-radius: 12px;
}

.app-lock-actions .app-lock-action-danger {
    border-color: rgba(255, 90, 120, 0.45);
    background: rgba(255, 0, 110, 0.1);
    color: #ff8cab;
}

.app-lock-actions .app-lock-action-danger:hover {
    border-color: rgba(255, 90, 120, 0.7);
    background: rgba(255, 0, 110, 0.18);
}

#biometricToggleContainer {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 46px;
    grid-template-areas:
        "icon label switch"
        "icon status switch";
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    margin: 0 14px 0 44px;
    width: calc(100% - 58px);
    padding: 12px;
    min-height: 0;
    border-left: 1px solid rgba(0, 217, 255, 0.22);
    border-right: 1px solid rgba(0, 217, 255, 0.22);
    background: rgba(10, 12, 24, 0.78);
}

#biometricToggleContainer:hover {
    background: rgba(10, 12, 24, 0.84);
    transform: none;
}

#biometricToggleContainer .hamburger-icon {
    grid-area: icon;
    align-self: start;
    margin-top: 1px;
    justify-self: center;
}

#biometricToggleContainer .hamburger-subitem-label {
    grid-area: label;
    align-self: center;
}

#biometricToggleContainer .hamburger-subitem-status {
    grid-area: status;
    justify-self: start;
    align-self: start;
    max-width: 100%;
    margin-left: 0;
    white-space: nowrap;
    line-height: 1.12;
    padding: 3px 7px;
    font-size: 0.72rem;
}

#biometricToggleContainer .hamburger-switch {
    grid-area: switch;
    justify-self: end;
    align-self: center;
    margin-left: 0;
}

#appLockHint {
    margin: 0 14px 12px 44px;
    padding: 0 12px 13px;
    border: 1px solid rgba(0, 217, 255, 0.22);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: rgba(10, 12, 24, 0.78);
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    line-height: 1.35;
}

#biometricSettingsButton {
    margin: 0 14px 0 44px;
    width: calc(100% - 58px);
    min-height: 42px;
    border: 0;
    border-top: 1px solid rgba(0, 217, 255, 0.14);
    border-left: 1px solid rgba(0, 217, 255, 0.22);
    border-right: 1px solid rgba(0, 217, 255, 0.22);
    border-radius: 0;
    background: rgba(10, 12, 24, 0.78);
}

#biometricSettingsButton:hover {
    background: rgba(0, 217, 255, 0.1);
    border-color: rgba(0, 217, 255, 0.32);
}

@media (max-width: 420px) {
    .app-lock-status-row,
    .app-lock-actions,
    #biometricToggleContainer,
    #biometricSettingsButton,
    #appLockHint {
        margin-left: 28px;
        width: calc(100% - 42px);
    }
}

.hamburger-subitem-action {
    margin: 0 15px 12px 44px;
    width: calc(100% - 59px);
    border: 1px solid rgba(0, 217, 255, 0.45);
    border-radius: 8px;
    background: rgba(0, 217, 255, 0.12);
    color: var(--neon-cyan);
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hamburger-subitem-action:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.75);
}

.hamburger-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.hamburger-arrow.open {
    transform: rotate(90deg);
}

.hamburger-item #notificationStatus {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.hamburger-item:hover #notificationStatus {
    transform: none;
}

/* Кнопка выхода */
.logout-item {
    border-top: 2px solid rgba(255, 0, 110, 0.2);
    border-bottom: none;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.05), rgba(255, 50, 50, 0.05));
}

.logout-item:hover {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(255, 50, 50, 0.15));
    color: #ff3232;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.6);
}

/* Информационные экраны */
.info-screen {
    padding: 20px;
}

.info-content {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#blockedUsers .info-content {
    max-width: 360px !important;
    width: 100% !important;
}

#blockedUsersContainer {
    width: 100%;
}

/* Контакты */
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, var(--bg-card), #2a2a3e);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

#contacts .contact-item {
    position: relative;
    justify-content: center;
}

#contacts .contact-icon {
    position: absolute;
    left: 1rem;
}

#contacts .contact-details {
    box-sizing: border-box;
    width: 100%;
    padding: 0 2.8rem;
    text-align: center;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 30px rgba(0, 217, 255, 0.5);
}

.contact-item:active {
    transform: translateY(-2px) scale(0.98);
}

.contact-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.contact-details {
    flex-grow: 1;
}

.contact-details h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
}

.contact-details p {
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* Юридические ссылки */
.legal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-link {
    display: block;
    padding: 0.8rem 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    color: var(--neon-cyan);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.legal-link:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: translateX(5px);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
    margin-bottom: 0.2rem;
}

.contact-action {
    font-size: 0.85rem;
    color: var(--neon-cyan);
    font-style: italic;
    opacity: 0.8;
}

/* Форма отправки письма */
.email-form-container {
    padding: 0.5rem;
}

.contact-form {
    background: linear-gradient(135deg, var(--bg-card), #2a2a3e);
    border: 2px solid var(--neon-cyan);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

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

.form-group label {
    display: block;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.4);
}

.input-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-top: 0.2rem;
    opacity: 0.8;
}

.form-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.form-actions .neon-button {
    flex: 1;
}

.email-status {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.email-status.success {
    background: linear-gradient(135deg, #1a4d1a, #2d7a2d);
    border: 2px solid #00ff00;
    color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.email-status.error {
    background: linear-gradient(135deg, #4d1a1a, #7a2d2d);
    border: 2px solid #ff0040;
    color: #ff0040;
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.3);
}

.email-status.loading {
    background: linear-gradient(135deg, #1a1a4d, #2d2d7a);
    border: 2px solid var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.3);
}

.loading-spinner {
    display: block;
    width: 120px;
    height: 120px;
    background-image: url('images/loading.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 1rem auto;
}

/* Убираем вращение для loading-spinner */
.loading-spinner,
.loading-spinner * {
    animation: none !important;
    transform: none !important;
}

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

/* Правила и политика */
.rules-section,
.privacy-section,
.about-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-card), #2a2a3e);
    border: 2px solid var(--neon-purple);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(131, 56, 236, 0.3);
}

/* Интро для правил */
.rules-intro {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(131, 56, 236, 0.1);
    border-left: 3px solid var(--neon-purple);
    border-radius: 8px;
    font-size: 0.85rem;
}

.rules-section h3,
.privacy-section h3,
.about-section h3 {
    color: var(--neon-purple);
    font-size: 1.05rem;
    margin-bottom: 0.8rem;
    margin-top: 1.2rem;
    text-shadow: 0 0 10px rgba(131, 56, 236, 0.6);
    word-spacing: 0.2rem;
}

.rules-section h3:first-of-type {
    margin-top: 0;
}

/* Подзаголовки в правилах */
.rules-section h4 {
    color: var(--neon-cyan);
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.rules-section p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

/* Примечания */
.rules-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-top: 0.4rem;
    padding-left: 1rem;
}

.rules-section ul,
.about-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.8rem;
}

.rules-section li,
.about-section li {
    padding: 0.3rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.rules-section li::before,
.about-section li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--neon-purple);
    text-shadow: 0 0 5px rgba(131, 56, 236, 0.8);
}

.privacy-section p,
.about-section p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
}

/* Интро для политики конфиденциальности */
.privacy-intro {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.1);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Списки в политике */
.privacy-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0.8rem;
}

.privacy-section li {
    padding: 0.3rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.privacy-section li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--neon-cyan);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.privacy-section strong {
    color: var(--neon-cyan);
    font-weight: 600;
}

/* Примечание в политике */
.privacy-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-top: 0.6rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 255, 255, 0.3);
}

/* Ссылка на email */
.email-link {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.email-link:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(131, 56, 236, 0.8);
}

/* О приложении */
.app-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.app-logo .logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 0.8rem;
    filter: drop-shadow(0 0 10px rgba(131, 56, 236, 0.5));
}

.app-logo .neon-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
}

.app-logo h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

/* Модальное окно авторизации через Telegram */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    position: relative;
    z-index: 10001;
    background: #2a2a40;
    border: 2px solid var(--neon-purple);
    border-radius: 20px;
    max-width: 380px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(131, 56, 236, 0.5);
    animation: modalSlideIn 0.3s ease-out forwards;
    padding: 20px;
    opacity: 1;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
    }
    to {
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(131, 56, 236, 0.3);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--neon-purple);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--neon-pink);
    background: rgba(255, 0, 255, 0.1);
    transform: rotate(90deg);
}

/* Кнопки подтверждения в модальном окне */
.confirm-buttons {
    display: flex !important;
    gap: 10px;
    padding: 0 20px 20px 20px;
}

#confirmYesBtn:hover,
#confirmNoBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 30px rgba(0, 217, 255, 0.6);
}

#confirmNoBtn:hover {
    box-shadow: 0 5px 30px rgba(255, 0, 110, 0.6);
}

#confirmYesBtn:active,
#confirmNoBtn:active {
    transform: translateY(0);
}

.modal-body {
    padding: 25px;
}

/* Стили для модального окна жалобы */
#reportModal:not(.report-details-open) .modal-content {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 18px;
}

#reportModal:not(.report-details-open) .modal-body {
    max-height: none;
    overflow: visible;
    padding: 20px 25px 18px;
}

#reportModal:not(.report-details-open) .modal-header {
    padding: 16px 25px 18px;
}

#reportModal:not(.report-details-open) .modal-body > p {
    margin-bottom: 0.75rem !important;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.report-reason-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.8rem;
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(0, 217, 255, 0.1));
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.report-reason-btn:hover {
    border-color: var(--neon-cyan);
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.2), rgba(0, 217, 255, 0.2));
    transform: translateX(3px);
}

.report-reason-btn.selected {
    border-color: var(--neon-pink);
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(131, 56, 236, 0.2));
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.reason-icon {
    font-size: 1.5rem;
    min-width: 32px;
}

.reason-text h4 {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.reason-text p {
    color: var(--text-gray);
    font-size: 0.7rem;
    margin: 0;
}

.neon-button.danger-outline {
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
}

.neon-button.danger-outline:hover {
    background: rgba(255, 0, 110, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

.auth-warning {
    background: rgba(255, 153, 0, 0.1);
    border: 2px solid rgba(255, 153, 0, 0.5);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.auth-warning h3 {
    color: #ff9900;
    margin-bottom: 10px;
}

.auth-warning p {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.5;
}

.auth-warning ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    text-align: left;
}

.auth-warning ul li {
    color: var(--text-light);
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 153, 0, 0.2);
}

.auth-warning ul li:last-child {
    border-bottom: none;
}

.telegram-login-container {
    text-align: center;
}

.telegram-login-container h4 {
    color: var(--neon-cyan);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: center;
}

.qr-instruction {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.qr-code-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    margin: 20px 0;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(131, 56, 236, 0.3);
}

#qrcode {
    display: block;
    text-align: center;
}

/* QRCode.js создаёт canvas внутри, показываем только его */
#qrcode canvas {
    border-radius: 10px;
    display: inline-block !important;
}

/* Скрываем дублирующийся img который библиотека создаёт рядом с canvas */
#qrcode > img {
    display: none !important;
}

.qr-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.qr-loading.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(131, 56, 236, 0.2);
    border-top: 4px solid var(--neon-purple);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.qr-loading p {
    color: var(--neon-purple);
    font-weight: bold;
}

.or-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(131, 56, 236, 0.3);
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

.or-divider span {
    background: var(--bg-card);
    padding: 0 15px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

#telegramLoginWidget {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    margin: 20px 0;
}

.telegram-login-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0088cc 0%, #00a0e9 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.telegram-login-button:hover {
    background: linear-gradient(135deg, #0077b3 0%, #0090d0 100%);
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4);
    transform: translateY(-2px);
}

.telegram-login-button svg {
    width: 20px;
    height: 20px;
}

.login-hint {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 15px;
}

/* Детали анкеты */
.ad-full {
    padding: 20px 0;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(131, 56, 236, 0.3);
}

.ad-header h3 {
    color: var(--neon-purple);
    margin: 0;
    font-size: 1.5rem;
}

.ad-date {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.ad-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(131, 56, 236, 0.1);
    border: 1px solid rgba(131, 56, 236, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(131, 56, 236, 0.15);
    border-color: rgba(131, 56, 236, 0.5);
    transform: translateY(-2px);
}

.info-item .icon {
    font-size: 1.8rem;
}

.info-item .label {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.info-item .value {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
}

.ad-description {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(255, 0, 255, 0.05));
    border: 2px solid rgba(255, 0, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.ad-description h4 {
    color: var(--neon-pink);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.ad-description p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Компактное отображение информации */
.ad-info-compact {
    background: rgba(131, 56, 236, 0.08);
    border: 1px solid rgba(131, 56, 236, 0.2);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.info-row {
    padding: 6px 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-row:not(:last-child) {
    border-bottom: 1px solid rgba(131, 56, 236, 0.1);
}

.info-label {
    color: var(--text-light);
    font-weight: 500;
}

/* Новый компактный дизайн карточки анкеты */
.ad-details-card {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(8, 8, 18, 0.42), rgba(26, 26, 46, 0.34));
    border: 1px solid rgba(0, 217, 255, 0.32);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ad-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(131, 56, 236, 0.2);
}

.ad-location {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-icon {
    font-size: 1.3rem;
}

.location-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.ad-date-badge {
    background: rgba(131, 56, 236, 0.2);
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(131, 56, 236, 0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

/* Фото в детальном просмотре */
.ad-details-photos {
    margin-bottom: 20px;
}

.ad-main-photo {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 217, 255, 0.3);
}

.ad-photo-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0;
    scroll-snap-type: x mandatory;
}

.ad-photo-thumbnail-small {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    scroll-snap-align: start;
}

.ad-photo-thumbnail-small:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.05);
}

.ad-author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.25), rgba(131, 56, 236, 0.25));
    border: 2px solid rgba(0, 217, 255, 0.4);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.author-avatar {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(131, 56, 236, 0.2);
    border-radius: 50%;
    border: 2px solid rgba(131, 56, 236, 0.4);
}

.author-details {
    flex: 1;
}

.author-name {
    color: var(--neon-cyan);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.author-params {
    color: var(--text-light);
    font-size: 0.95rem;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.author-last-seen {
    font-size: 0.8rem;
    color: #6cc070;
    margin-top: 4px;
    padding: 2px 8px;
    background: rgba(108, 192, 112, 0.12);
    border-radius: 6px;
    display: inline-block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.ad-search-info {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.25), rgba(131, 56, 236, 0.25));
    border: 2px solid rgba(255, 0, 255, 0.4);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
}

.search-title {
    color: var(--neon-pink);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.search-params {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.param-item {
    display: flex;
    align-items: flex-start; /* Fix align to top when wrapped */
    flex-wrap: wrap; /* Fix: allow long text to wrap */
    gap: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.param-icon {
    font-size: 1.2rem;
}

.ad-description-box {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.25), rgba(255, 0, 255, 0.25));
    border: 2px solid rgba(131, 56, 236, 0.4);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.description-title {
    color: var(--neon-purple);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.description-text {
    color: var(--text-light);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
}

.version {
    color: var(--text-gray);
    font-size: 0.85rem;
    opacity: 0.7;
}

.copyright {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.85rem;
    opacity: 0.6;
    margin-top: 2rem;
}

/* Текущая локация на экране просмотра анкет */
.current-location-display {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(131, 56, 236, 0.1));
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
    text-align: center;
}

/* Компактная строка локации */
.current-location-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: rgba(0, 217, 255, 0.08);
    border-radius: 20px;
}

#browseAds .current-location-compact {
    flex-wrap: wrap;
}

.current-location-compact .location-icon {
    font-size: 0.9rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.current-location-compact .location-value {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#browseAds .current-location-compact .location-value {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

#browseAds .current-location-compact .change-location-btn {
    flex: 0 1 auto;
    max-width: min(190px, 100%);
    padding: 7px 10px;
    font-size: clamp(0.72rem, 2.6vw, 0.86rem);
    text-align: center;
}

/* Стиль удален - конфликтовал с основным .change-location-btn */

.location-label {
    color: var(--neon-cyan);
    font-size: 0.8rem;
    margin: 0 0 5px 0;
    opacity: 0.7;
}

.location-value {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.neon-button.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Секция автоопределения локации */
.auto-location-section {
    margin-bottom: 20px;
    text-align: center;
    width: 100% !important;
    max-width: 400px !important;
}

.or-divider {
    color: var(--text-gray);
    margin: 12px 0;
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Кнопка удаления анкеты в списке "Мои анкеты" */
.edit-ad-btn {
    background: linear-gradient(135deg, rgba(137, 104, 255, 0.18), rgba(224, 82, 167, 0.14));
    border: 2px solid rgba(176, 128, 255, 0.42);
    color: #d7c4ff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.2s ease;
}

.edit-ad-btn:hover {
    border-color: rgba(214, 169, 255, 0.72);
    box-shadow: 0 0 15px rgba(154, 104, 255, 0.24);
}

.delete-ad-btn {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(255, 100, 100, 0.2));
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: #ff4444;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.delete-ad-btn:hover {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
}

/* Кнопка статистики анкеты (Premium) */
.stats-ad-btn {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.2), rgba(180, 100, 255, 0.2));
    border: 2px solid rgba(131, 56, 236, 0.5);
    color: var(--neon-purple);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.stats-ad-btn:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.4);
    transform: scale(1.05);
}

/* Кнопка поднятия анкеты */
.boost-ad-btn {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2), rgba(0, 150, 255, 0.2));
    border: 2px solid rgba(0, 200, 255, 0.5);
    color: #00c8ff;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.boost-ad-btn:hover {
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.4);
    transform: scale(1.05);
}

/* Кнопка закрепления анкеты */
.pin-ad-btn {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #ffd700;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.pin-ad-btn:hover {
    border-color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.edit-gender-locked-hint {
    max-width: 440px;
    margin: 10px auto 0;
    padding: 9px 12px;
    border: 1px solid rgba(183, 150, 255, 0.22);
    border-radius: 11px;
    background: rgba(94, 64, 148, 0.12);
    color: rgba(225, 215, 244, 0.78);
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

#createAd.is-editing-ad .gender-btn.is-locked {
    cursor: not-allowed !important;
    opacity: 0.46;
}

#createAd.is-editing-ad .gender-btn.is-locked.selected {
    opacity: 1;
    border-color: rgba(242, 80, 161, 0.46) !important;
    background: rgba(242, 80, 161, 0.12) !important;
}

/* Индикатор закрепленного анкеты */
.pinned-badge {
    position: absolute;
    top: -16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #000;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28), 0 0 15px rgba(255, 215, 0, 0.5);
    z-index: 5;
    max-width: min(240px, calc(100% - 36px));
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    pointer-events: none;
}

@media (max-width: 480px) {
    .ad-card.is-pinned,
    .profile-card.is-pinned {
        margin-top: 16px;
    }

    .pinned-badge {
        top: -14px;
        right: 14px;
        padding: 6px 12px;
        font-size: 0.72rem;
        max-width: min(132px, calc(100% - 28px));
    }
}

/* Premium бейдж — единая корона */
.pro-badge {
    display: inline-block;
    font-size: 0.95rem;
    margin-left: 4px;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.8));
    vertical-align: middle;
}

.ad-card .pro-badge,
.profile-card .pro-badge,
.ad-author-row .pro-badge,
.profile-author-row .pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-left: 6px;
    padding: 0;
    border-radius: 999px;
    line-height: 1;
    overflow: visible;
    vertical-align: -3px;
    background: linear-gradient(135deg, #ff00aa 0%, #7c3cff 55%, #ffd700 100%);
    color: #fffbe6;
    box-shadow: 0 0 8px rgba(255, 0, 170, 0.55), 0 0 10px rgba(255, 215, 0, 0.45);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.9);
    filter: none;
    box-sizing: border-box;
}

/* Элегантная золотая подсветка для Premium объявлений */
.ad-card.premium-ad {
    background-color: #1b1b2a;
    background-image:
        linear-gradient(135deg, rgba(255, 215, 0, 0.10), rgba(255, 165, 0, 0.06)),
        linear-gradient(135deg, #151521, #262636);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow:
        0 0 7px rgba(255, 215, 0, 0.22),
        0 0 14px rgba(255, 215, 0, 0.12),
        0 0 20px rgba(255, 215, 0, 0.08),
        0 4px 15px rgba(0, 0, 0, 0.2);
    /* Статичный золотой flow без постоянной анимации, чтобы не тормозил скролл. */
    animation: none;
}

@keyframes premiumGlow {
    0%, 100% {
        border-color: rgba(255, 215, 0, 0.5);
        box-shadow:
            0 0 8px rgba(255, 215, 0, 0.25),
            0 0 16px rgba(255, 215, 0, 0.15),
            0 0 24px rgba(255, 215, 0, 0.1),
            0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        border-color: rgba(255, 215, 0, 0.7);
        box-shadow:
            0 0 12px rgba(255, 215, 0, 0.35),
            0 0 24px rgba(255, 215, 0, 0.25),
            0 0 36px rgba(255, 215, 0, 0.15),
            0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

.ad-card.premium-ad:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.25),
        0 0 45px rgba(255, 215, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

/* ===== ТОП-3 АНКЕТЫ ПО ЛАЙКАМ ===== */

/* 🥇 ТОП-1 - Красная/розовая неоновая подсветка */
.ad-card.top-1 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(255, 50, 100, 0.6);
    box-shadow:
        0 0 10px rgba(255, 50, 100, 0.35),
        0 0 20px rgba(255, 50, 100, 0.2),
        0 0 32px rgba(255, 50, 100, 0.12);
}

/* Пульс через opacity на псевдоэлементе — без repaint */
.ad-card.top-1::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(255, 50, 100, 0.5);
    animation: topGlowPulse 2.5s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity;
    z-index: 0;
}

/* 🥈 ТОП-2 - Золотая/янтарная подсветка */
.ad-card.top-2 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(255, 170, 50, 0.5);
    box-shadow:
        0 0 10px rgba(255, 170, 50, 0.28),
        0 0 20px rgba(255, 170, 50, 0.16),
        0 0 32px rgba(255, 170, 50, 0.1);
}

.ad-card.top-2::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(255, 170, 50, 0.4);
    animation: topGlowPulse 2.5s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity;
    z-index: 0;
}

/* 🥉 ТОП-3 - Изумрудная/зелёная подсветка */
.ad-card.top-3 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(50, 205, 100, 0.45);
    box-shadow:
        0 0 10px rgba(50, 205, 100, 0.22),
        0 0 20px rgba(50, 205, 100, 0.14),
        0 0 32px rgba(50, 205, 100, 0.08);
}

.ad-card.top-3::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(50, 205, 100, 0.35);
    animation: topGlowPulse 2.5s ease-in-out infinite;
    pointer-events: none;
    will-change: opacity;
    z-index: 0;
}

/* Единый keyframe для всех топ-карточек — только opacity, без repaint */
@keyframes topGlowPulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* Бейдж ТОП - на верхнем краю рамки */
.top-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    z-index: 5;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.ad-card.top-1 .top-badge {
    background: linear-gradient(135deg, rgba(255, 0, 60, 1), rgba(200, 0, 50, 1));
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.8);
    border: 2px solid rgba(255, 100, 120, 0.5);
}

.ad-card.top-2 .top-badge {
    background: linear-gradient(135deg, rgba(255, 140, 0, 1), rgba(200, 100, 0, 1));
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.7);
    border: 2px solid rgba(255, 180, 100, 0.5);
}

.ad-card.top-3 .top-badge {
    background: linear-gradient(135deg, rgba(0, 200, 80, 1), rgba(0, 150, 60, 1));
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 200, 80, 0.6);
    border: 2px solid rgba(100, 230, 150, 0.5);
}

/* ===== КНОПКА ЛАЙКА И НАПИСАТЬ ===== */

.ad-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
    box-sizing: border-box;
    overflow: visible;
}

/* Счётчик просмотров */
.view-count {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.view-icon {
    font-size: 0.8rem;
    opacity: 0.7;
}

.views-number {
    font-weight: 500;
}

.ad-likes-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-share-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.32);
    background: rgba(0, 212, 255, 0.08);
    color: var(--neon-cyan);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.profile-share-icon,
.share-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-share-icon svg {
    width: 17px;
    height: 17px;
}

.profile-share-btn:hover {
    transform: translateY(-1px) scale(1.04);
    border-color: rgba(0, 212, 255, 0.7);
    background: rgba(0, 212, 255, 0.16);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.28);
}

.profile-share-btn:active {
    transform: scale(0.94);
}

.profile-share-details-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(131, 56, 236, 0.18)) !important;
    border: 1px solid rgba(0, 212, 255, 0.45) !important;
    color: var(--neon-cyan) !important;
}

.profile-share-details-btn .share-btn-icon svg {
    width: 18px;
    height: 18px;
}

html.vk-mini-app .profile-share-btn,
html.vk-mini-app .profile-share-details-btn,
html.vk-mini-app #shareAdDetailsBtn,
html.vk-mini-app #adShareModal {
    display: none !important;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.1) 0%, rgba(0, 150, 255, 0.15) 100%);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.contact-btn.contact-write-cta {
    position: relative;
    isolation: isolate;
    color: #ffe8a6;
    background: linear-gradient(135deg, rgba(255, 190, 60, 0.13) 0%, rgba(255, 145, 25, 0.2) 100%);
    border-color: rgba(255, 210, 92, 0.9);
    box-shadow: 0 0 12px rgba(255, 204, 64, 0.42), 0 0 24px rgba(255, 166, 0, 0.24), inset 0 0 9px rgba(255, 220, 130, 0.1);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

.contact-btn.contact-write-cta::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 220, 130, 0.52) 0%, rgba(255, 188, 70, 0.3) 38%, rgba(255, 166, 0, 0.1) 72%, rgba(255, 166, 0, 0) 100%);
    opacity: 0.3;
    transform: scale(1);
    filter: blur(6px);
    /* На карточках кнопок много, поэтому отключаем постоянную анимацию в idle. */
    animation: none;
}

.contact-btn.contact-write-cta > * {
    position: relative;
    z-index: 1;
}

.contact-btn:hover {
    background: linear-gradient(135deg, rgba(0, 200, 255, 0.2) 0%, rgba(0, 150, 255, 0.25) 100%);
    border-color: rgba(0, 200, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 200, 255, 0.3);
}

.contact-btn.contact-write-cta:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 0 14px rgba(255, 210, 92, 0.55), 0 0 30px rgba(255, 166, 0, 0.32), inset 0 0 12px rgba(255, 230, 150, 0.14);
}

.contact-btn:active {
    transform: scale(0.95);
}

.contact-btn.contact-write-cta .contact-icon {
    animation: none;
}

.contact-btn.contact-write-cta .contact-text {
    color: #ffe8a6;
    animation: none;
}

.contact-icon {
    font-size: 0.85rem;
}

.contact-text {
    font-size: 0.7rem;
    font-weight: 500;
}

.profile-share-modal-content {
    width: min(92vw, 420px);
    padding: 0;
    overflow: hidden;
}

.profile-share-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-share-preview {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(255, 0, 110, 0.07));
}

.profile-share-preview-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.12);
    color: var(--neon-cyan);
}

.profile-share-preview-icon svg {
    width: 22px;
    height: 22px;
}

.profile-share-preview-title {
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.95rem;
}

.profile-share-preview-text {
    color: var(--text-gray);
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 3px;
}

.profile-share-url {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-all;
}

.profile-share-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-share-actions button {
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.profile-share-actions button:hover {
    transform: translateY(-1px);
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.58);
}

.profile-share-actions .profile-share-copy {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.74), rgba(131, 56, 236, 0.72));
    border-color: rgba(255, 0, 110, 0.5);
}

.profile-share-actions-vk {
    grid-template-columns: 1fr;
}

html.vk-mini-app #contactsPaymentBlock {
    display: none !important;
}

/* Кнопка удаления анкеты (для своих анкет) */
.delete-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: linear-gradient(135deg, rgba(255, 60, 60, 0.1) 0%, rgba(200, 0, 0, 0.15) 100%);
    border: 1px solid rgba(255, 60, 60, 0.3);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    color: #ff5555;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.delete-btn:hover {
    background: linear-gradient(135deg, rgba(255, 60, 60, 0.2) 0%, rgba(200, 0, 0, 0.25) 100%);
    border-color: rgba(255, 60, 60, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 60, 60, 0.3);
}

.delete-btn:active {
    transform: scale(0.95);
}

.delete-icon {
    font-size: 0.85rem;
}

.delete-text {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Кнопка генерации текста анкеты */
.generate-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(9, 10, 24, 0.96) 0%, rgba(34, 18, 52, 0.94) 100%);
    border: 1px solid rgba(0, 217, 255, 0.58);
    border-radius: 20px;
    color: #f8fbff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.42);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32), 0 0 14px rgba(0, 217, 255, 0.16);
    transition: all 0.3s ease;
}

.generate-text-btn:hover {
    background: linear-gradient(135deg, rgba(16, 18, 38, 0.98) 0%, rgba(58, 24, 78, 0.96) 100%);
    border-color: rgba(255, 0, 255, 0.68);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38), 0 0 18px rgba(255, 0, 255, 0.28);
    transform: scale(1.02);
}

.generate-text-btn:active {
    transform: scale(0.98);
}

.generate-text-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.like-btn:hover {
    background: rgba(255, 70, 100, 0.15);
    border-color: rgba(255, 70, 100, 0.4);
    transform: scale(1.05);
}

.like-btn:active {
    transform: scale(0.95);
}

.like-btn.liked {
    background: rgba(255, 70, 100, 0.2);
    border-color: rgba(255, 70, 100, 0.5);
}

.like-btn.liked .like-icon {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.like-icon {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.likes-count {
    font-size: 0.7rem;
    color: var(--text-gray);
    min-width: 12px;
}

.like-btn.liked .likes-count {
    color: #ff4664;
    font-weight: 600;
}

/* Анимация +1 при лайке */
.like-plus-one {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff4664;
    text-shadow: 0 0 10px rgba(255, 70, 100, 0.8);
    animation: plusOneFloat 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes plusOneFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px) scale(1.5);
    }
}

/* Летящее сердечко */
.flying-heart {
    position: absolute;
    top: 0;
    left: 50%;
    font-size: 1rem;
    animation: heartFlyToCounter 0.7s ease-in forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes heartFlyToCounter {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0.5);
    }
}

/* Анимация +1 от других пользователей */
.like-plus-one.incoming {
    color: #00ff88;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.9);
    animation: incomingLikeFloat 1s ease-out forwards;
}

@keyframes incomingLikeFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-25px) scale(1);
    }
}

/* Пульсация кнопки при получении лайка */
.like-btn.like-pulse {
    animation: likePulse 0.5s ease;
}

@keyframes likePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Анимация обновления счётчика */
.likes-count.count-update {
    animation: countBounce 0.5s ease;
    color: #00ff88 !important;
}

@keyframes countBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

/* Анимация появления новой анкеты */
.ad-card.ad-new-animation {
    animation: slideInNew 0.5s ease-out;
}

@keyframes slideInNew {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Анимация изменения ТОП-позиции */
.ad-card.top-rank-up {
    animation: rankUpPulse 1s ease-out;
}

.ad-card.top-rank-down {
    animation: rankDownPulse 0.8s ease-out;
}

@keyframes rankUpPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 100, 0.7);
    }
    40% {
        box-shadow: 0 0 30px 15px rgba(0, 255, 100, 0.4);
    }
    100% {
        box-shadow: none;
    }
}

@keyframes rankDownPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Уведомление об изменении ранга */
.rank-change-notice {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    z-index: 100;
    animation: rankNoticeAppear 1.5s ease-out forwards;
    pointer-events: none;
}

.rank-change-notice.up {
    background: linear-gradient(135deg, rgba(0, 200, 100, 0.95), rgba(0, 150, 80, 0.95));
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 100, 0.5);
    box-shadow: 0 0 25px rgba(0, 255, 100, 0.6);
}

@keyframes rankNoticeAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.8);
    }
}

/* ===== СТИЛИ ДЛЯ ЧАТОВ ===== */

/* Вкладки чатов */
.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 5px;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 10px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6), rgba(16, 16, 32, 0.6));
    border: 2px solid rgba(255, 0, 110, 0.2);
    border-radius: 12px;
    color: var(--text-gray);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    border-color: var(--neon-pink);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(131, 56, 236, 0.2));
    border-color: var(--neon-pink);
    color: var(--text-light);
    box-shadow: var(--shadow-pink);
}

.tab-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.tab-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.tab-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--neon-pink);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.tab-btn.active .tab-badge {
    background: var(--neon-cyan);
}

/* Контент вкладок */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Контейнер чатов */
.chats-container {
    padding: 10px 0;
}

.chats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chats-list > .loading-spinner {
    width: min(100%, 300px);
    height: auto;
    min-height: 0;
    margin: 22px auto 0;
    padding: 18px 20px 20px;
    background: rgba(10, 10, 20, 0.78);
    background-image: none;
    border: 1px solid rgba(0, 217, 255, 0.32);
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(0, 217, 255, 0.12);
    backdrop-filter: blur(8px);
}

.chats-list > .loading-spinner .spinner {
    width: 96px;
    height: 96px;
    margin: 0 auto 12px;
}

.chats-list > .loading-spinner p {
    margin: 0;
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

/* Карточка чата */
.chat-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(16, 16, 32, 0.9));
    border: 2px solid var(--border-glow);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chat-card:hover {
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-pink);
    transform: translateY(-2px);
}

.chat-card.is-typing {
    border-color: rgba(0, 217, 255, 0.55);
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.18);
}

.chat-card.is-admin-support {
    border-color: rgba(0, 255, 136, 0.72);
    background: linear-gradient(135deg, rgba(8, 38, 29, 0.92), rgba(16, 16, 32, 0.92));
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.16);
}

.chat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.05), rgba(131, 56, 236, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-card:hover::before {
    opacity: 1;
}

.chat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chat-ad-id {
    font-size: 0.9rem;
    color: var(--neon-cyan);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.chat-time {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.unread-badge {
    background: var(--neon-pink);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s ease-in-out infinite;
}

.chat-support-badge {
    display: inline-flex;
    align-items: center;
    max-width: 112px;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.38);
    background: rgba(0, 255, 136, 0.14);
    color: #00ff88;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--neon-pink), 0 0 10px var(--neon-pink);
    }
    50% {
        box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
    }
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.pulse-icon {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.pulse-gift {
    animation: pulse-icon 2s ease-in-out infinite;
}

.referral-button {
    background: linear-gradient(135deg, #ff006e, #8338ec);
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
    animation: pulse 2s ease-in-out infinite;
    font-weight: 600;
}

.referral-button:hover {
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.8);
    transform: translateY(-2px);
}

#referralModal {
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
}

#referralModal .modal-content {
    display: flex;
    flex-direction: column;
    width: min(92vw, 460px);
    max-width: 460px !important;
    height: auto !important;
    max-height: calc(100dvh - 32px) !important;
    overflow: hidden !important;
    padding: 0 !important;
    overscroll-behavior: contain;
}

#referralModal .referral-modal-content {
    transform: translateZ(0);
}

#referralModal .modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(16, 16, 32, 0.98));
    padding: 18px 20px;
    min-height: 74px;
    box-sizing: border-box;
    overflow: hidden;
}

#referralModal .modal-header h2 {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

#referralModal .modal-header h2 .app-icon {
    --app-icon-size: 1.15em;
    vertical-align: 0;
}

#referralModal .modal-close {
    position: static !important;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    margin-left: 12px;
    line-height: 1;
}

#referralModal .modal-body {
    flex: 0 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

#referralModal .referral-info {
    min-width: 0;
}

#referralModal .referral-modal-hero-icon {
    --app-icon-size: 56px;
    display: block;
    margin: 10px auto 12px;
}

#referralModal #referralLink {
    overflow-wrap: anywhere;
}

#referralModal .referral-target-platform-picker {
    margin: 14px 0;
}

#referralModal .referral-target-platform-label {
    color: var(--text-gray);
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 10px;
}

#referralModal .referral-target-platform-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#referralModal .referral-target-platform-btn {
    min-height: 42px;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    background: rgba(0, 217, 255, 0.06);
    color: var(--text-light);
    font-weight: 800;
    cursor: pointer;
}

#referralModal .referral-target-platform-btn.is-active {
    border-color: var(--neon-pink);
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.26), rgba(131, 56, 236, 0.26));
    box-shadow: 0 0 14px rgba(255, 0, 110, 0.28);
}

#referralModal .referral-native-qr-card {
    width: min(190px, 100%);
    margin: 12px auto 0;
    padding: 10px 8px;
    border: 1px solid rgba(0, 217, 255, 0.25);
    border-radius: 10px;
    background: rgba(0, 217, 255, 0.06);
}

#referralModal .referral-desktop-qr-container {
    margin: 16px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 12px;
}

#referralModal .referral-qr-card {
    background: rgba(0, 217, 255, 0.06);
    border: 1px solid rgba(0, 217, 255, 0.25);
    border-radius: 10px;
    padding: 10px 8px;
    min-width: 0;
    overflow: hidden;
    text-align: center;
}

#referralModal .referral-qr-title {
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.78rem;
    margin-top: 8px;
}

#referralModal .referral-qr-code {
    width: min(96px, 100%);
    aspect-ratio: 1;
    height: auto;
    margin: 0 auto;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

#referralModal .referral-qr-code canvas,
#referralModal .referral-qr-code img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#referralModal.referral-native-share-mode .modal-content {
    width: min(92vw, 430px);
    max-height: min(720px, calc(100dvh - 28px)) !important;
}

#referralModal.referral-native-share-mode .modal-body {
    flex: 0 0 auto;
    max-height: calc(100dvh - 96px) !important;
    padding-bottom: 16px !important;
}

#referralModal.referral-native-share-mode .referral-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#referralModal.referral-native-share-mode .referral-modal-hero-icon {
    --app-icon-size: 44px;
    margin: 4px auto 0;
}

#referralModal.referral-native-share-mode #referralModalHeadline {
    margin: 0 !important;
    font-size: 1rem !important;
}

#referralModal.referral-native-share-mode #referralModalDescription {
    margin: 0 !important;
    line-height: 1.35 !important;
    font-size: 0.84rem !important;
}

#referralModal.referral-native-share-mode #referralModalLimitNote {
    margin: 0 !important;
    line-height: 1.3 !important;
    font-size: 0.74rem !important;
}

#referralModal.referral-native-share-mode .referral-target-platform-picker,
#referralModal.referral-native-share-mode #referralLinkContainer {
    margin: 6px 0 !important;
}

#referralModal.referral-native-share-mode .referral-target-platform-label,
#referralModal.referral-native-share-mode #referralLinkLabel {
    margin-bottom: 6px !important;
    font-size: 0.8rem !important;
}

#referralModal.referral-native-share-mode .referral-target-platform-btn {
    min-height: 38px;
    border-radius: 9px;
}

#referralModal.referral-native-share-mode .referral-native-qr-card {
    width: min(150px, 100%);
    margin-top: 8px;
    padding: 8px;
}

#referralModal.referral-native-share-mode .referral-qr-code {
    width: min(76px, 100%);
    height: auto;
    padding: 5px;
}

#referralModal.referral-native-share-mode .referral-qr-code canvas,
#referralModal.referral-native-share-mode .referral-qr-code img {
    max-width: 100%;
    max-height: 100%;
}

#referralModal.referral-native-share-mode #referralLink {
    padding: 8px !important;
    line-height: 1.25 !important;
}

#referralModal.referral-native-share-mode .neon-button {
    min-height: 42px;
    margin: 4px 0 !important;
    padding: 9px 10px !important;
}

@media (min-width: 768px) {
    #referralModal .modal-content {
        width: min(84vw, 760px);
        max-width: 760px !important;
        max-height: calc(100dvh - 48px) !important;
    }

    #referralModal .modal-body {
        padding: 24px 28px !important;
    }

    #referralModal .referral-desktop-qr-container {
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
        gap: 14px;
    }

    #referralModal .referral-qr-code {
        width: min(118px, 100%);
        height: auto;
    }

    #referralModal .referral-qr-code canvas,
    #referralModal .referral-qr-code img {
        max-width: 100%;
        max-height: 100%;
    }
}

@media (min-width: 1024px) {
    #referralModal.referral-desktop-qr-mode .modal-content {
        width: min(88vw, 920px);
        max-width: 920px !important;
    }

    #referralModal.referral-desktop-qr-mode .modal-body {
        padding: 26px 34px !important;
    }

    #referralModal.referral-desktop-qr-mode .referral-desktop-qr-container {
        grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    #referralModal {
        padding: max(10px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom)) !important;
    }

    #referralModal .modal-content {
        width: min(92vw, 430px);
        max-height: calc(100dvh - 28px) !important;
    }

    #referralModal .modal-header {
        padding: 14px 16px;
        min-height: 62px;
    }

    #referralModal .modal-header h2 {
        font-size: 1.35rem;
    }

    #referralModal .modal-body {
        padding: 16px !important;
    }

    #referralModal .referral-modal-hero-icon {
        --app-icon-size: 50px;
        margin: 6px auto 10px;
    }

    #referralModal .referral-target-platform-picker,
    #referralModal #referralLinkContainer {
        margin: 12px 0;
    }

    #referralModal .referral-native-qr-card {
        width: min(168px, 100%);
        margin-top: 10px;
        padding: 8px;
    }

    #referralModal .referral-qr-code {
        width: min(88px, 100%);
        height: auto;
    }

    #referralModal .referral-qr-code canvas,
    #referralModal .referral-qr-code img {
        max-width: 100%;
        max-height: 100%;
    }

    #referralModal.referral-native-share-mode .modal-header {
        min-height: 58px;
    }

    #referralModal.referral-native-share-mode .modal-body {
        padding: 14px 16px 16px !important;
    }
}

.chat-preview {
    font-size: 0.9rem;
    color: var(--text-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.chat-preview-typing {
    color: var(--neon-cyan);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.45);
}

/* Онлайн-статус в чатах */
.chat-online-status {
    padding: 2px 0;
    font-size: 0.75rem;
}

.online-status {
    font-size: 0.75rem;
    font-weight: 500;
}

.online-status.online {
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.online-status.recently {
    color: #ffbb00;
    text-shadow: 0 0 6px rgba(255, 187, 0, 0.3);
}

.online-status.away {
    color: var(--text-gray);
}

.online-status.offline {
    color: rgba(255, 255, 255, 0.35);
}

.chat-unread-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--neon-pink);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Карточка запроса на чат */
.chat-request-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(16, 16, 32, 0.9));
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 15px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.chat-request-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.05), rgba(131, 56, 236, 0.05));
    opacity: 1;
    pointer-events: none;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.request-ad-id {
    font-size: 0.9rem;
    color: var(--neon-cyan);
    font-weight: 600;
}

.request-time {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.request-message {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.chat-custom-quick-reply {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin: 2px 0 13px;
    position: relative;
    z-index: 1;
}

.chat-custom-quick-reply-input {
    min-width: 0;
    flex: 1;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(0, 217, 255, 0.38);
    border-radius: 10px;
    background: rgba(5, 12, 24, 0.72);
    color: var(--text-light);
    font-size: 0.88rem;
    outline: none;
    box-shadow: inset 0 0 10px rgba(0, 217, 255, 0.08);
}

.chat-custom-quick-reply-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.24), inset 0 0 10px rgba(0, 217, 255, 0.1);
}

.chat-custom-quick-reply-input::placeholder {
    color: rgba(255, 255, 255, 0.46);
}

.chat-custom-quick-reply-send {
    width: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(0, 217, 255, 0.55);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.22), rgba(131, 56, 236, 0.28));
    color: #fff;
    cursor: pointer;
    font-size: 1.05rem;
    line-height: 1;
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.16);
}

.chat-custom-quick-reply-send:disabled,
.chat-custom-quick-reply-input:disabled {
    opacity: 0.55;
    cursor: wait;
}

.request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.request-btn {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.request-btn-accept {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.request-btn-accept:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
}

.request-btn-reject,
.request-btn-decline {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.request-btn-reject:hover,
.request-btn-decline:hover {
    background: var(--neon-pink);
    color: var(--bg-dark);
    box-shadow: var(--shadow-pink);
    text-shadow: none;
}

.request-btn-profile {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}
.request-btn-profile:hover {
    background: var(--neon-purple);
    color: #fff;
}

.sender-identity-badge {
    font-size: 0.78rem;
    color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    margin: 4px 0 2px 0;
    display: inline-block;
}

/* Premium запросы - подсветка золотом */
.chat-request-card.pro-request {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(40, 35, 20, 0.9), rgba(30, 26, 16, 0.9));
}

.chat-request-card.pro-request::before {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 170, 0, 0.08));
}

/* Исходящие запросы - синий акцент */
.chat-request-card.outgoing-request {
    border-color: rgba(100, 149, 237, 0.5);
    background: linear-gradient(135deg, rgba(25, 30, 45, 0.9), rgba(18, 22, 36, 0.9));
}

.chat-request-card.outgoing-request::before {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.08), rgba(70, 130, 220, 0.08));
}

.request-ad-info {
    font-size: 0.8rem;
    color: #888;
    margin: 4px 0;
}

.request-last-seen {
    font-size: 0.75rem;
    color: #6cc070;
    margin: 2px 0 6px 0;
    padding: 3px 8px;
    background: rgba(108, 192, 112, 0.1);
    border-radius: 6px;
    display: inline-block;
}

.request-status {
    font-size: 0.85rem;
    color: #ffa500;
    margin: 8px 0;
    padding: 6px 12px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

.outgoing-message {
    font-style: italic;
    color: #a0a0b0;
}

.request-btn-cancel {
    background: linear-gradient(135deg, #444, #333) !important;
    color: #ff6666 !important;
    border: 1px solid rgba(255, 100, 100, 0.3) !important;
}

.request-btn-cancel:hover {
    background: linear-gradient(135deg, #553333, #442222) !important;
}

/* Premium значок */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    animation: proPulse 2s ease-in-out infinite;
}

@keyframes proPulse {
    0%, 100% {
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.9), 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

/* Экран чата */
.chat-header {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(16, 16, 32, 0.95));
    border-bottom: 2px solid var(--border-glow);
    padding: calc(8px + var(--safe-area-top)) 12px 8px !important;
    margin-bottom: 0 !important;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    min-height: calc(44px + var(--safe-area-top));
}

#chatView.screen.active > .chat-header {
    position: fixed !important;
    top: var(--chat-viewport-top-inset, 0px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translate3d(-50%, 0, 0) !important;
    width: 100% !important;
    max-width: 768px !important;
    margin: 0 !important;
    will-change: top, transform;
    -webkit-transform: translate3d(-50%, 0, 0) !important;
}

html.chat-ios-viewport.chat-keyboard-open #chatView.screen.active > .chat-header,
html.chat-ios-viewport.chat-keyboard-open #chatView.screen.active > .chat-input-container {
    transform: translate3d(-50%, 0, 0) !important;
    -webkit-transform: translate3d(-50%, 0, 0) !important;
    will-change: top, bottom, transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

html.chat-native-ios-shell #chatView.screen.active > .chat-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    -webkit-transform: none !important;
    width: 100% !important;
    max-width: none !important;
    will-change: auto;
}

html.chat-native-ios-shell #chatView.screen.active > .chat-input-container {
    position: absolute !important;
    left: var(--chat-input-side-gap) !important;
    right: var(--chat-input-side-gap) !important;
    bottom: calc(var(--chat-safe-bottom-extra, 0px) + var(--chat-input-float-gap)) !important;
    transform: none !important;
    -webkit-transform: none !important;
    width: auto !important;
    max-width: none !important;
    will-change: auto;
}

html.android-webview:not(.telegram-webapp) #chatView.screen,
html.android-webview:not(.telegram-webapp) #worldChatScreen.screen,
html.android-webview:not(.telegram-webapp) #createAd.screen,
html.android-webview:not(.telegram-webapp) #browseAds.screen,
html.android-webview:not(.telegram-webapp) #myAds.screen,
html.android-webview:not(.telegram-webapp) #myGuests.screen,
html.android-webview:not(.telegram-webapp) #myChats.screen,
html.android-webview:not(.telegram-webapp) #lonelinessMapScreen.screen {
    --safe-area-top: 0px;
}

html.telegram-webapp #chatView.screen {
    --safe-area-top: max(var(--device-safe-area-top), var(--telegram-safe-area-top), var(--telegram-main-controls-top));
}

.header h2 {
    margin-left: 0;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Кнопка FAQ для Мир чата */
.world-chat-faq-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    color: var(--neon-cyan);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.world-chat-faq-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.world-chat-faq-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Стили для FAQ модального окна */
.modal-content.world-chat-faq-content {
    --world-chat-faq-text-size: 13px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-content.world-chat-faq-content.world-chat-faq-text-medium {
    --world-chat-faq-text-size: 15px;
}

.modal-content.world-chat-faq-content.world-chat-faq-text-large {
    --world-chat-faq-text-size: 17px;
}

.world-chat-faq-content .world-chat-faq-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 42, 64, 0.94);
    border: 1px solid rgba(255, 0, 110, 0.45);
    border-radius: 50%;
    line-height: 1;
    color: var(--text-light);
    opacity: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.world-chat-faq-size-toggle {
    position: absolute;
    top: 12px;
    right: 58px;
    z-index: 5;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 42, 64, 0.94);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    color: var(--neon-cyan);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.65);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.world-chat-faq-size-toggle:hover,
.world-chat-faq-size-toggle.is-active {
    border-color: rgba(255, 0, 110, 0.65);
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 255, 255, 0.3), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.world-chat-faq-size-toggle:active {
    transform: scale(0.94);
}

.world-chat-faq-content h2 {
    flex: 0 0 auto;
    padding-right: 104px;
    min-height: 38px;
    line-height: 1.25;
}

.world-chat-faq-text {
    font-size: var(--world-chat-faq-text-size) !important;
    line-height: 1.55;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 12px;
    padding-bottom: 12px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 32, 110, 0.9) rgba(255, 255, 255, 0.08);
}

.world-chat-faq-text::-webkit-scrollbar {
    width: 8px;
}

.world-chat-faq-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.world-chat-faq-text::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
    border-radius: 999px;
    opacity: 1;
}

.world-chat-faq-text::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
}

.world-chat-faq-text p {
    font-size: var(--world-chat-faq-text-size) !important;
    margin-bottom: 10px;
}

.world-chat-faq-text ul {
    font-size: var(--world-chat-faq-text-size) !important;
    margin-left: 15px;
    margin-bottom: 10px;
}

.world-chat-faq-text li {
    font-size: var(--world-chat-faq-text-size) !important;
    margin-bottom: 5px;
}

.world-chat-faq-text strong {
    font-size: var(--world-chat-faq-text-size) !important;
    color: var(--neon-cyan);
}

.world-chat-faq-icon,
.world-chat-faq-tab,
.world-chat-faq-prefix,
.world-chat-faq-menu-chip,
.world-chat-faq-send-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.world-chat-faq-icon {
    min-width: 18px;
    height: 18px;
    margin-right: 5px;
    padding: 0 4px;
    border: 1px solid rgba(0, 255, 255, 0.65);
    border-radius: 999px;
    background: rgba(0, 255, 255, 0.08);
    color: var(--neon-cyan);
    font-size: 10px !important;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

.world-chat-faq-icon.world,
.world-chat-faq-icon.tabs,
.world-chat-faq-icon.send,
.world-chat-faq-icon.font,
.world-chat-faq-icon.profile,
.world-chat-faq-icon.example,
.world-chat-faq-icon.tip {
    color: var(--neon-cyan);
}

.world-chat-faq-icon.private {
    border-color: rgba(255, 0, 110, 0.65);
    background: rgba(255, 0, 110, 0.12);
    color: #ff5cad;
    text-shadow: 0 0 8px rgba(255, 0, 110, 0.7);
}

.world-chat-faq-icon.rules {
    border-color: rgba(255, 170, 0, 0.7);
    background: rgba(255, 170, 0, 0.12);
    color: #ffaa00;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.55);
}

.world-chat-faq-tab {
    min-width: 42px;
    margin: 0 4px 2px 0;
    padding: 1px 6px;
    border-radius: 7px;
    font-size: 10px !important;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0;
}

.world-chat-faq-tab.world,
.world-chat-faq-prefix.world {
    color: #ffaa00;
    background: rgba(255, 170, 0, 0.12);
    border: 1px solid rgba(255, 170, 0, 0.45);
}

.world-chat-faq-tab.city,
.world-chat-faq-prefix.city {
    color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.45);
}

.world-chat-faq-tab.private,
.world-chat-faq-prefix.private {
    color: #ff5cad;
    background: rgba(255, 0, 110, 0.12);
    border: 1px solid rgba(255, 0, 110, 0.45);
}

.world-chat-faq-prefix {
    min-width: 18px;
    height: 18px;
    margin: 0 2px;
    border-radius: 50%;
    font-size: 11px !important;
    font-weight: 900;
    line-height: 1;
}

.world-chat-faq-menu-chip {
    padding: 1px 7px;
    border: 1px solid rgba(0, 255, 255, 0.45);
    border-radius: 7px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan) !important;
    font-size: 10px !important;
    line-height: 1.35;
}

.world-chat-faq-crown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin: 0 3px;
    border: 1px solid rgba(221, 144, 203, 0.22);
    border-radius: 7px;
    vertical-align: -5px;
    background: rgba(47, 28, 66, 0.76);
    color: #dda4cf;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.world-chat-faq-crown svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.world-chat-faq-send-arrow {
    width: 18px;
    height: 18px;
    margin-left: 2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff006e, #8338ec);
    color: #ffffff;
    font-size: 11px !important;
    font-weight: 900;
    line-height: 1;
}

.chat-font-size-btn {
    position: absolute;
    right: 45px;
    top: calc(10px + var(--safe-area-top));
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s ease;
    z-index: 101;
    line-height: 1;
}

.chat-font-size-btn:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.chat-menu-btn {
    position: absolute;
    right: 8px;
    top: calc(10px + var(--safe-area-top));
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s ease;
    z-index: 101;
    line-height: 1;
}

.chat-menu-btn:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.chat-menu-dropdown {
    position: absolute;
    right: 15px;
    top: calc(50px + var(--safe-area-top));
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(16, 16, 32, 0.98));
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
    z-index: 200;
    min-width: 250px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-menu-item {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.chat-menu-item:last-child {
    border-bottom: none;
}

.chat-menu-item:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--neon-cyan);
}

.chat-menu-item.danger {
    color: var(--neon-pink);
}

.chat-menu-item.danger:hover {
    background: rgba(255, 0, 255, 0.1);
}

.chat-menu-item.warning {
    color: #ffaa00;
}

.chat-menu-item.warning:hover {
    background: rgba(255, 170, 0, 0.15);
}

/* Модальное окно справки по чату */
.chat-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.chat-help-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(16, 16, 32, 0.98));
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.chat-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 1), rgba(16, 16, 32, 1));
    border-radius: 16px 16px 0 0;
}

.chat-help-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--neon-cyan);
}

.chat-help-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 0, 255, 0.2);
    color: var(--neon-pink);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-help-close:hover {
    background: rgba(255, 0, 255, 0.4);
    transform: scale(1.1);
}

.chat-help-body {
    padding: 12px 16px;
}

.chat-help-item {
    display: block;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-color);
}

.chat-help-item:last-child {
    margin-bottom: 0;
}

.block-warning {
    background: linear-gradient(135deg, rgba(255, 0, 100, 0.25), rgba(255, 0, 255, 0.25));
    border: 2px solid var(--neon-pink);
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    color: var(--neon-pink);
    font-weight: bold;
    animation: pulse 2s infinite;
    position: relative;
    z-index: 150;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--neon-pink);
    }
    50% {
        box-shadow: 0 0 20px var(--neon-pink);
    }
}

/* Заблокированные пользователи */
.blocked-user-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(16, 16, 32, 0.9));
    border: 2px solid rgba(255, 0, 100, 0.3);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.blocked-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.blocked-user-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.blocked-user-details {
    flex: 1;
}

.blocked-user-name {
    color: var(--neon-cyan);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.blocked-user-date {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.unblock-btn {
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.unblock-btn:hover {
    background: var(--neon-pink);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--neon-pink);
    transform: rotate(90deg);
}

.neon-button.small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.chat-info {
    flex: 1;
    text-align: center;
    margin-left: 0;
}

.chat-info h2 {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.1;
}

.chat-subtitle {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    margin-top: 1px;
    line-height: 1.1;
}

.view-ad-link {
    color: var(--neon-pink);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.view-ad-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Контейнер сообщений */
.chat-messages-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    padding: calc(var(--chat-header-height, 92px) + 5px) 15px calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 12px) 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
    box-sizing: border-box;
}

html.chat-typing-visible #chatView.screen.active > .chat-messages-container {
    padding-bottom: calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 56px);
}

html.chat-typing-visible.chat-reply-preview-visible #chatView.screen.active > .chat-messages-container {
    padding-bottom: calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 118px);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

.chat-typing-host {
    position: fixed;
    left: 50%;
    bottom: calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 8px);
    transform: translateX(-50%);
    z-index: 98;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    width: 100%;
    max-width: 768px;
    min-height: 0;
    padding: 0 calc(var(--chat-input-side-gap) + 8px);
    box-sizing: border-box;
    background: transparent;
    pointer-events: none;
}

html.chat-reply-preview-visible .chat-typing-host {
    bottom: calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 70px);
    z-index: 101;
}

/* Разделитель даты между сообщениями (как в Telegram) */
.chat-date-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    user-select: none;
    pointer-events: none;
}

.chat-date-separator span {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 16px;
    letter-spacing: 0.2px;
}

/* Сообщение */
.message {
    box-sizing: border-box;
    max-width: min(75%, calc(100% - 24px));
    min-width: 0;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    animation: messageSlideIn 0.3s ease;
    transition: transform 0.2s ease, background 0.3s ease;
    touch-action: pan-y;
    cursor: pointer;
    user-select: none;
    overflow-wrap: anywhere;
}

.message.has-media,
.message:has(.message-photo),
.message:has(.message-photo-secure),
.message:has(video) {
    max-width: min(86%, 340px, calc(100% - 24px));
    padding: 8px;
    overflow: hidden;
}

.chat-messages.is-virtualized .message {
    animation: none !important;
    opacity: 1 !important;
}

html.chat-native-ios-shell #chatView .message {
    animation: none !important;
    transition: none !important;
}

.typing-indicator {
    align-self: flex-start;
    display: none;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 75%;
    margin: 1px 0 2px;
    padding: 8px 12px;
    border-radius: 14px 14px 14px 4px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(0, 217, 255, 0.08));
    border: 1px solid rgba(0, 217, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    animation: messageSlideIn 0.2s ease;
    user-select: none;
    pointer-events: none;
}

.typing-indicator.has-draft-preview {
    max-width: min(92%, 560px);
}

.typing-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.8);
    animation: typingPulse 1.1s ease-in-out infinite;
    flex: 0 0 auto;
}

.typing-text {
    min-width: 72px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.typing-indicator.has-draft-preview .typing-text {
    min-width: 0;
}

@keyframes typingPulse {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

/* Подсветка при скролле к сообщению */
.message.highlight {
    animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
    0%, 100% {
        background: inherit;
    }
    50% {
        background: rgba(0, 217, 255, 0.3);
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Реакция на сообщение */
.message-reaction {
    position: absolute;
    bottom: -8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 2px;
    animation: reactionPop 0.3s ease;
    z-index: 1;
}

.message-reaction-emoji {
    font-size: 14px;
    line-height: 1;
}

.message-reaction-count {
    font-size: 11px;
    color: var(--neon-cyan);
    font-weight: 500;
}

@keyframes reactionPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Меню выбора реакций */
.reaction-picker {
    position: fixed;
    background: rgba(20, 20, 30, 0.98);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    gap: 4px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
    animation: pickerSlideIn 0.2s ease;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 90vw;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: thin;
}

.reaction-picker::-webkit-scrollbar {
    height: 4px;
}

.reaction-picker::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

.reaction-picker::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

@keyframes pickerSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.reaction-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.reaction-option:hover {
    background: rgba(0, 217, 255, 0.3);
    border-color: var(--neon-cyan);
    transform: scale(1.2);
}

.reaction-option:active {
    transform: scale(0.95);
}

/* Кнопки действий в меню реакций */
.reaction-picker-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 217, 255, 0.3);
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

.reaction-picker-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    color: var(--neon-cyan);
    font-size: 11px;
    gap: 4px;
}

.reaction-picker-action:hover {
    background: rgba(0, 217, 255, 0.3);
    border-color: var(--neon-cyan);
}

.reaction-picker-action:active {
    transform: scale(0.95);
}

.reaction-picker-action-icon {
    font-size: 18px;
}

.reaction-picker-action.delete {
    color: #ff4757;
}

.reaction-picker-action.delete:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
}

/* Мое сообщение */
.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 3px;
}

.message.is-pending-send {
    opacity: 0.84;
}

.message.is-failed-send {
    opacity: 0.9;
    filter: saturate(0.85);
}

/* Полученное сообщение */
.message.received {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 1px solid var(--border-glow);
    color: var(--text-light);
    border-bottom-left-radius: 3px;
}

.message-text {
    margin-bottom: 3px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message-photo {
    display: block;
    max-width: min(320px, 100%, calc(100vw - 72px)) !important;
    width: auto;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 0 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    user-drag: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Защищенное фото в сообщении */
.message-photo-secure {
    display: block;
    max-width: min(320px, 100%, calc(100vw - 72px)) !important;
    width: auto;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 0 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-size: cover; /* Заполняем квадрат без черных полей */
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; /* Блокирует меню при долгом нажатии на iOS/Telegram */
    -webkit-user-drag: none;
    user-drag: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .message-photo:hover,
    .message-photo-secure:hover {
        transform: scale(1.02);
        box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
    }
}

.message-photo-secure:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.message-voice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(190px, 100%);
    max-width: min(270px, 100%, calc(100vw - 72px));
    padding: 3px 0 5px;
}

.voice-play-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex: 0 0 auto;
}

.voice-play-button:disabled {
    cursor: default;
    opacity: 0.55;
}

.message.received .voice-play-button {
    color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.12);
}

.voice-play-button svg {
    width: 19px;
    height: 19px;
}

.voice-play-button.is-playing .voice-play-icon {
    display: none;
}

.voice-play-button:not(.is-playing) .voice-pause-icon {
    display: none;
}

.voice-body {
    flex: 1;
    min-width: 0;
}

.message-voice.is-uploading {
    opacity: 0.82;
}

.voice-waveform {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    align-items: center;
    gap: 2px;
    height: 22px;
}

.voice-waveform span {
    display: block;
    width: 2px;
    min-height: 5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.72);
}

.message.received .voice-waveform span {
    background: rgba(0, 217, 255, 0.75);
}

.voice-duration {
    display: block;
    margin-top: 1px;
    min-width: 72px;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

.voice-duration.is-playing-time {
    opacity: 0.95;
}

/* Старый класс для обратной совместимости */
.secure-photo {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.secure-photo::selection {
    background: transparent;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.6;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 2px;
}

/* Статусы сообщений (галочки) */
.message-status {
    font-size: 0.75rem;
    line-height: 1;
    display: inline-block;
    margin-left: 3px;
}

.message-status.sent {
    /* Одна серая галочка - отправлено */
    color: #888;
    opacity: 0.7;
}

.message-status.delivered {
    /* Две серые галочки - доставлено */
    color: #888;
    opacity: 0.8;
}

.message-status.read {
    /* Две неоновые галочки - прочитано */
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
    opacity: 1;
    animation: neon-pulse 2s ease-in-out infinite;
}

.message-send-state {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    line-height: 1;
    margin-left: 3px;
    white-space: nowrap;
}

.message-send-state.failed {
    color: #ffb3c4;
}

.message-retry-button {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.message-failed-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff4d6d;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.message-send-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: inline-block;
    animation: voiceSendSpin 0.75s linear infinite;
}

/* Nickname над сообщениями */
.message-nickname {
    font-size: 0.7rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 3px var(--neon-cyan);
    margin-bottom: 3px;
    font-weight: 500;
    opacity: 0.85;
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 0 0 8px var(--neon-cyan);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 12px var(--neon-cyan), 0 0 20px var(--neon-cyan);
        opacity: 0.9;
    }
}

/* Превью ответа на сообщение */
.reply-preview {
    position: fixed;
    bottom: calc(var(--chat-input-height) + var(--chat-input-float-gap) + var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + 8px);
    left: 50%;
    right: auto;
    transform: translate3d(-50%, 0, 0);
    width: min(calc(100vw - (var(--chat-input-side-gap) * 2)), 744px);
    max-width: calc(100vw - (var(--chat-input-side-gap) * 2));
    background: linear-gradient(135deg, rgba(20, 20, 34, 0.78), rgba(10, 10, 22, 0.62));
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-left: 3px solid var(--neon-cyan);
    border-radius: 16px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    z-index: 99;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 217, 255, 0.18);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    animation: replyPreviewSlideUp 0.2s ease;
    box-sizing: border-box;
}

@keyframes replyPreviewSlideUp {
    from {
        opacity: 0;
        transform: translate3d(-50%, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(-50%, 0, 0);
    }
}

.reply-preview-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.reply-preview-header {
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 2px;
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#replyToNickname {
    display: inline-block;
    max-width: calc(100% - 46px);
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reply-preview-text {
    font-size: 13px;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-preview-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reply-preview-close:hover {
    color: var(--neon-red);
}

/* Индикатор ответа в сообщениях */
.message-reply-indicator {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.message-reply-indicator:hover {
    background: rgba(0, 0, 0, 0.5);
}

.reply-indicator-line {
    width: 3px;
    background: var(--neon-cyan);
    border-radius: 2px;
    flex-shrink: 0;
}

.reply-indicator-content {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.reply-indicator-header {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    margin-bottom: 2px;
    text-transform: lowercase;
}

.reply-indicator-name {
    color: var(--neon-cyan);
    font-weight: 600;
}

.reply-indicator-nickname {
    font-size: 10px;
    color: var(--neon-cyan);
    font-weight: 600;
    margin-bottom: 1px;
    opacity: 0.9;
}

.reply-indicator-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Старые классы для совместимости */
.reply-nickname {
    display: none;
}

.reply-text {
    display: none;
}

/* Размеры шрифта для сообщений в чате */
.chat-messages.font-small .message {
    font-size: 13px;
}

.chat-messages.font-medium .message {
    font-size: 15px;
}

.chat-messages.font-large .message {
    font-size: 18px;
}

/* Контейнер ввода */
.chat-input-container {
    position: fixed;
    bottom: calc(var(--chat-vk-bottom-inset) + var(--chat-safe-bottom-extra, env(safe-area-inset-bottom, 0px)) + var(--chat-input-float-gap));
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: calc(100% - (var(--chat-input-side-gap) * 2));
    max-width: 744px;
    background: linear-gradient(135deg, rgba(20, 20, 34, 0.72), rgba(10, 10, 22, 0.58));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 255, 255, 0.2);
    border-bottom-color: rgba(255, 0, 110, 0.22);
    border-radius: 28px;
    padding: 7px 8px;
    display: flex;
    gap: 8px;
    z-index: 100;
    flex-wrap: nowrap;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), 0 0 22px rgba(255, 0, 110, 0.2);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    will-change: bottom, transform;
}

.attach-photo-button {
    background: rgba(0, 217, 255, 0.14);
    border: 1px solid rgba(0, 217, 255, 0.8);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.attach-photo-button:hover {
    background: rgba(0, 217, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    transform: scale(1.05);
}

.attach-photo-button:active {
    transform: scale(0.95);
}

.chat-tool-icon,
.chat-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: currentColor;
}

.chat-tool-icon svg,
.chat-action-icon svg {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.photo-preview {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
    flex-shrink: 0;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-photo-button {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(255, 0, 110, 0.9);
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-photo-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
}

.chat-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    background: rgba(10, 10, 22, 0.44);
    border: 1px solid rgba(255, 0, 110, 0.35);
    border-radius: 22px;
    padding: 10px 16px;
    color: var(--text-light);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.voice-recording-bar {
    --voice-cancel-progress: 0;
    flex: 1;
    min-width: 0;
    height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 12px;
    border-radius: 22px;
    background: rgba(255, 0, 110, 0.12);
    border: 1px solid rgba(255, 0, 110, 0.42);
    color: #fff;
    box-shadow: inset 0 0 18px rgba(255, 0, 110, 0.14);
    overflow: hidden;
    transform: translateX(calc(var(--voice-cancel-progress) * -10px));
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.voice-recording-bar[hidden] {
    display: none;
}

.voice-lock-target {
    position: absolute;
    right: 8px;
    bottom: calc(100% + 8px);
    width: 42px;
    height: 86px;
    border-radius: 22px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(11, 13, 27, 0.7);
    border: 1px solid rgba(0, 217, 255, 0.38);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), inset 0 0 18px rgba(0, 217, 255, 0.1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    pointer-events: none;
    z-index: 2;
}

.voice-lock-target[hidden] {
    display: none;
}

.voice-lock-target::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 9px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    opacity: 0.58;
    transform: translateX(-50%) rotate(45deg);
}

.voice-lock-target-icon,
.voice-lock-status,
.voice-gesture-trash {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.voice-lock-target-icon {
    width: 21px;
    height: 21px;
}

.voice-lock-target-icon svg,
.voice-lock-status svg,
.voice-gesture-trash svg,
.voice-cancel-button svg {
    width: 100%;
    height: 100%;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.voice-gesture-trash {
    width: 0;
    height: 24px;
    color: #ff5c91;
    opacity: 0;
    transform: translateX(-12px) scale(0.72);
    transition: width 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.voice-recording-bar.is-cancel-gesture .voice-gesture-trash {
    width: 24px;
    opacity: 1;
    transform: translateX(0) scale(calc(0.78 + (var(--voice-cancel-progress) * 0.22)));
}

.voice-recording-bar.is-cancel-ready {
    border-color: rgba(255, 75, 125, 0.85);
    background: rgba(255, 0, 86, 0.2);
}

.chat-input-container.is-voice-lock-ready .voice-lock-target {
    color: #00e1ff;
    border-color: rgba(0, 217, 255, 0.82);
    box-shadow: 0 0 26px rgba(0, 217, 255, 0.38), inset 0 0 20px rgba(0, 217, 255, 0.16);
}

.voice-recording-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff2d72;
    box-shadow: 0 0 12px rgba(255, 45, 114, 0.85);
    animation: voiceRecordingPulse 1s ease-in-out infinite;
    flex: 0 0 auto;
}

.voice-recording-timer {
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
}

.voice-recording-hint {
    min-width: 0;
    flex: 1 1 auto;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voice-recording-bar.is-cancel-ready .voice-recording-hint {
    color: #fff;
}

.voice-lock-status {
    width: 21px;
    height: 21px;
    color: #00e1ff;
}

.voice-lock-status[hidden] {
    display: none;
}

.voice-cancel-button {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 6px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.chat-input-container.is-voice-recording-locked .voice-cancel-button {
    opacity: 1;
    pointer-events: auto;
}

.voice-cancel-button:hover {
    background: rgba(255, 45, 114, 0.32);
}

.voice-cancel-button:active {
    transform: scale(0.92);
}

.chat-input-container.is-recording-voice .chat-input,
.chat-input-container.is-recording-voice .attach-photo-button,
.chat-input-container.is-recording-voice .photo-preview {
    display: none !important;
}

@keyframes voiceRecordingPulse {
    0%, 100% {
        opacity: 0.55;
        transform: scale(0.86);
    }
    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

.send-button {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(131, 56, 236, 0.5);
    -webkit-tap-highlight-color: transparent;
}

.send-button[data-mode="mic"],
.send-button[data-mode="recording"],
.send-button[data-mode="sendingVoice"] {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.send-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.send-button:hover {
    box-shadow: 0 0 20px var(--neon-purple), 0 0 30px var(--neon-pink);
    transform: scale(1.1);
}

.send-button:hover .send-icon {
    transform: translateX(2px) translateY(-2px) rotate(-15deg);
}

.send-button:active {
    transform: scale(0.95);
}

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

.send-button[data-mode="mic"] {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.92), rgba(131, 56, 236, 0.94));
    box-shadow: 0 0 14px rgba(0, 217, 255, 0.38);
}

.send-button[data-mode="recording"] {
    background: linear-gradient(135deg, #ff2d72, #8338ec);
    box-shadow: 0 0 18px rgba(255, 45, 114, 0.5);
}

.send-button[data-mode="sendingVoice"] {
    background: linear-gradient(135deg, #00d9ff, #8338ec);
    box-shadow: 0 0 18px rgba(0, 217, 255, 0.45);
}

.voice-send-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: voiceSendSpin 0.75s linear infinite;
}

.send-button[data-mode="recording"] .send-icon,
.send-button[data-mode="sendingVoice"] .send-icon,
.send-button[data-mode="mic"]:hover .send-icon {
    transform: none;
}

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

/* Кнопка Мои чаты */
.chat-button {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.2), rgba(255, 0, 110, 0.2));
    border-color: var(--neon-purple);
    position: relative;
}

.chat-button:hover {
    box-shadow: 0 0 20px rgba(131, 56, 236, 0.5);
}

/* Счетчик новых запросов */
.chat-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff006e, #8338ec);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 0, 110, 0.5);
    animation: pulse 2s infinite;
}

/* Badge непрочитанных на отдельных чатах */
.chat-unread-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff006e, #8338ec);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 0, 110, 0.5);
    animation: pulse 2s infinite;
}

.limit-badge {
    position: absolute;
    bottom: 6px;
    right: 10px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    border: 1px solid #00ffff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    white-space: normal;
    line-height: 1.2;
    min-width: 50px;
    pointer-events: none;
}

.limit-badge.warning {
    color: #ffd700;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.limit-badge.danger {
    color: #ff006e;
    border-color: #ff006e;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 0, 110, 0.5);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 0, 110, 0.8);
    }
}

/* Плейсхолдер загрузки */
.loading-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.loading-placeholder .neon-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Пустой список чатов */
.empty-chats {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.empty-chats .neon-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-chats h3 {
    color: var(--text-light);
    margin-bottom: 10px;
}

.empty-chats p {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============= МОДАЛЬНОЕ ОКНО ДЛЯ анкет ============= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        transform: scale(0.95);
    }
    to {
        transform: scale(1);
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(16, 16, 32, 0.98));
    border: 2px solid var(--border-glow);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border-glow);
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* Прокрутка в модалке */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.5);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--neon-cyan);
}

/* Детальный просмотр анкеты */
.ad-detail-view {
    color: var(--text-light);
}

.ad-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.ad-detail-header h3 {
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    margin: 0;
    flex: 1;
}

.ad-price {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    font-weight: bold;
    white-space: nowrap;
}

.ad-photo {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-glow);
}

.ad-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-detail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ad-description {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    padding: 15px;
    background: rgba(26, 26, 46, 0.5);
    border-radius: 10px;
    border-left: 3px solid var(--neon-cyan);
}

.ad-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-glow);
}

.meta-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.meta-value {
    color: var(--text-light);
    font-weight: 500;
}

/* Спиннер загрузки в модалке */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner .spinner {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    background-image: url('/webapp/images/loading.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Сброс стилей от базового .spinner */
    border: none;
    border-radius: 0;
    animation: none;
}

/* Убираем старую анимацию */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-gray);
    font-size: 1rem;
    margin-top: 10px;
}

.step9-photo-item.is-deleting {
    cursor: wait !important;
    opacity: 0.78;
    transform: none !important;
}

.step9-photo-item.is-deleting img {
    filter: brightness(0.48) saturate(0.75);
}

.step9-photo-item [data-step9-photo-delete="true"] {
    z-index: 12;
}

.step9-photo-item.is-deleting [data-step9-photo-delete="true"] {
    cursor: wait !important;
    opacity: 0.45;
    pointer-events: none;
}

.step9-photo-delete-loading {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(3, 6, 16, 0.74);
    color: #ffffff;
    text-align: center;
    pointer-events: all;
    backdrop-filter: blur(2px);
}

.step9-photo-delete-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.24);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 12px rgba(0, 217, 255, 0.28);
}

.step9-photo-delete-text {
    max-width: 78px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

/* Пустое состояние в модалке */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state .neon-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-light);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.empty-state p {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

#blockedUsers .empty-state {
    width: 100%;
    max-width: min(360px, calc(100vw - 36px));
    margin: 34px auto 0;
    padding: 30px 22px;
    background: rgba(4, 7, 18, 0.76);
    border: 1px solid rgba(0, 217, 255, 0.45);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.36), 0 0 18px rgba(0, 217, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#blockedUsers .empty-state .neon-icon {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.28));
}

#blockedUsers .empty-state h3 {
    color: #ffffff;
    font-weight: 800;
}

#blockedUsers .empty-state p {
    color: #f8fbff;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7);
}

.profiles-empty-state {
    width: min(520px, calc(100vw - 32px));
    margin: 28px auto;
    padding: 28px 22px;
    border: 1px solid rgba(0, 217, 255, 0.5);
    border-radius: 12px;
    background: rgba(10, 10, 24, 0.78);
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.16);
    visibility: visible !important;
    opacity: 1 !important;
}

.profiles-empty-state .neon-button {
    margin-top: 14px;
}

.guests-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 14px rgba(0, 217, 255, 0.22);
}

.guests-empty-state--compact {
    padding: 30px 20px;
}

.guests-empty-state--hero {
    padding-top: 42px;
}

.guests-empty-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 18px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75));
}

.guests-empty-state h3 {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.98);
    font-size: 1.3rem;
    font-weight: 800;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.95),
        0 0 16px rgba(255, 255, 255, 0.22);
}

.guests-empty-state p {
    max-width: 320px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
    line-height: 1.35;
    text-shadow:
        0 2px 7px rgba(0, 0, 0, 0.95),
        0 0 12px rgba(0, 217, 255, 0.16);
}

/* ============= PREMIUM ПЕРЕКЛЮЧАТЕЛЬ ============= */

.premium-toggle {
    display: flex;
    gap: 2px;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    padding: 3px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.premium-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--text-gray);
    position: relative;
}

.premium-btn.active.free {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.3), rgba(255, 0, 110, 0.3));
    color: var(--text-light);
    box-shadow: 0 0 15px rgba(131, 56, 236, 0.5);
    text-shadow: 0 0 8px var(--neon-purple);
}

.premium-btn.active.pro {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.8), 0 0 30px rgba(131, 56, 236, 0.6);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: premium-glow 2s ease-in-out infinite;
}

@keyframes premium-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 0, 110, 0.8), 0 0 30px rgba(131, 56, 236, 0.6);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 110, 1), 0 0 50px rgba(131, 56, 236, 0.8);
    }
}

.premium-btn:not(.active):hover {
    color: var(--text-light);
    transform: scale(1.05);
}

/* ============= PREMIUM МОДАЛЬНОЕ ОКНО ============= */

#premiumModal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 12px 0;
}

.premium-modal {
    max-width: 560px;
    width: 94vw;
    width: min(94vw, 560px);
    height: 86vh;
    height: min(calc(var(--premium-visual-height, 86vh) - 24px), 760px);
    max-height: calc(var(--premium-visual-height, 100vh) - 24px);
    overflow: hidden; /* Убираем внешний скролл */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 !important;
}

.premium-modal .modal-header {
    flex-shrink: 0;
    padding: 16px 20px;
}

.premium-modal .modal-header h2 {
    margin: 0;
}

.premium-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto; /* Скролл только внутри body */
    overflow-x: hidden;
    padding: 14px 16px 18px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

@supports (height: 100dvh) {
    .premium-modal {
        height: min(calc(var(--premium-visual-height, 86dvh) - 24px), 760px);
        max-height: calc(var(--premium-visual-height, 100dvh) - 24px);
    }
}

/* Переключатель валют удален - валюта определяется автоматически */

.pricing-table {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 6px 4px;
    max-width: 100%;
}

/* На широких экранах показываем 2 колонки */
@media (min-width: 600px) {
    .pricing-table {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pricing-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8), rgba(16, 16, 32, 0.8));
    border: 2px solid var(--border-glow);
    border-radius: 9px;
    padding: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(131, 56, 236, 0.4);
}

.pricing-card.featured {
    border-color: var(--neon-pink);
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.1), rgba(255, 0, 110, 0.1));
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.premium-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(255, 0, 110, 0.5);
    animation: pulse 2s infinite;
}

.pricing-header {
    text-align: center;
    margin-bottom: 10px;
}

.pricing-header h3 {
    font-size: 1.08rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    margin-bottom: 4px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    margin: 6px 0;
}

.price-amount {
    font-size: 1.55rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-currency {
    font-size: 0.9rem;
    color: var(--neon-pink);
}

.price-period {
    color: var(--text-gray);
    font-size: 0.7rem;
}

.pricing-features {
    margin: 8px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item.disabled {
    opacity: 0.5;
}

.feature-item.disabled .feature-text {
    text-decoration: line-through;
    color: var(--text-gray);
}

.feature-icon {
    font-size: 0.88rem;
    min-width: 16px;
}

/* Плоские SVG-иконки вместо эмодзи (единый набор по всему интерфейсу). */
.feat-svg {
    display: inline-block;
    vertical-align: -0.18em;
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
    fill: none;
    stroke: #a78bfa;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.feature-icon .feat-svg {
    width: 17px;
    height: 17px;
}

.feature-text {
    color: var(--text-light);
    font-size: 0.71rem;
    line-height: 1.12;
    flex: 1;
    min-width: 0;
}

.feature-info-btn {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    border: 1px solid rgba(0, 217, 255, 0.65);
    background: rgba(0, 217, 255, 0.12);
    color: var(--neon-cyan);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.18);
}

.feature-info-btn[aria-expanded="true"] {
    background: rgba(0, 217, 255, 0.25);
    border-color: var(--neon-cyan);
}

.feature-info-panel {
    flex-basis: 100%;
    margin: 2px 0 3px 22px;
    padding: 7px 9px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-radius: 8px;
    background: rgba(7, 12, 29, 0.82);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.68rem;
    line-height: 1.25;
}

.pricing-btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.3), rgba(255, 0, 110, 0.3));
    color: var(--text-light);
    border: 2px solid var(--border-glow);
}

.pricing-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(131, 56, 236, 0.5);
}

.pricing-btn.premium {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    box-shadow: 0 3px 15px rgba(255, 0, 110, 0.5);
}

.pricing-btn.premium:hover {
    box-shadow: 0 6px 30px rgba(255, 0, 110, 0.8);
    transform: scale(1.04);
}

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

/* Premium значок в запросах */
.chat-request-card .pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
    animation: neon-pulse 2s ease-in-out infinite;
}

/* ============= МОДАЛЬНОЕ ОКНО ДЛЯ ПРОСМОТРА ФОТО ============= */

.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
}

.photo-modal.active {
    display: flex;
}

.photo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Защищенное модальное изображение через DIV с background */
.photo-modal-image-secure {
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.5);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    /* Для плавного зума */
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
}

/* Старый стиль для совместимости */
.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.5);
    object-fit: contain;
}

.photo-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: rgba(255, 0, 110, 0.9);
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.6);
    z-index: 2001;
}

.photo-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.8);
}

.photo-modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

/* Меню выбора источника фото */
.photo-source-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.photo-source-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.photo-source-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #0a0a0f 100%);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 -5px 30px rgba(0, 217, 255, 0.3);
    border-top: 2px solid var(--neon-cyan);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.source-btn {
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(0, 217, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.source-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

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

.source-btn.cancel {
    background: rgba(255, 0, 110, 0.1);
    border-color: var(--neon-pink);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.2);
    margin-bottom: 0;
}

.source-btn.cancel:hover {
    background: rgba(255, 0, 110, 0.2);
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}


/* ===== ONBOARDING СТИЛИ УДАЛЕНЫ (функционал отключен) ===== */


/* ===== STICKY NOTE BETA NOTICE ===== */
.sticky-note {
    display: none;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}

.onboarding-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

.onboarding-logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.onboarding-title {
    text-align: center;
    font-size: 32px;
    color: #ff006e; /* fallback if gradient-clip unsupported */
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.onboarding-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 16px;
    margin-bottom: 40px;
}

.onboarding-card {
    background: var(--bg-card);
    border: 2px solid var(--neon-cyan);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: var(--shadow-cyan);
}

.onboarding-step {
    margin-bottom: 30px;
}

.onboarding-step:last-of-type {
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.onboarding-step h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.step-description {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.nickname-input-group {
    position: relative;
}

.onboarding-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.onboarding-input:focus {
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.3);
}

.nickname-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.nickname-status.available {
    background: rgba(0, 255, 100, 0.1);
    border: 1px solid #00ff64;
    color: #00ff64;
    display: block;
}

.nickname-status.taken {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff0040;
    color: #ff0040;
    display: block;
}

.nickname-status.checking {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    display: block;
}

.onboarding-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.onboarding-checkbox:hover {
    background: rgba(0, 0, 0, 0.3);
}

.onboarding-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid var(--neon-cyan);
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.onboarding-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--neon-pink);
    border-color: var(--neon-pink);
}

.onboarding-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
}

.checkbox-label {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--neon-cyan);
    text-decoration: none;
    border-bottom: 1px solid var(--neon-cyan);
}

.onboarding-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

.onboarding-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 0, 110, 0.6);
}

/* ==================== COMPACT ONBOARDING STYLES ==================== */

.onboarding-logo-compact {
    text-align: center;
    margin-bottom: 20px;
}

.onboarding-logo-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 25px rgba(236, 72, 153, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.onboarding-title-compact {
    text-align: center;
    font-size: 26px;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.onboarding-subtitle-compact {
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 25px;
}

.onboarding-card-compact {
    background: var(--bg-card);
    border: 2px solid var(--neon-cyan);
    border-radius: 18px;
    padding: 20px 16px;
    box-shadow: var(--shadow-cyan);
}

.onboarding-step-compact {
    margin-bottom: 20px;
}

.onboarding-step-compact:last-of-type {
    margin-bottom: 16px;
}

.onboarding-step-compact h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.step-description-compact {
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 12px;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 0, 110, 0.3);
    position: relative;
    z-index: 10001;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
}

.modal-content h2 {
    color: var(--neon-pink);
    margin-bottom: 20px;
    font-size: 24px;
}

.modal-text {
    color: #fff;
    line-height: 1.8;
    font-size: 15px;
}

.modal-text p {
    margin-bottom: 15px;
}

.modal-text strong {
    color: var(--neon-cyan);
    display: block;
    margin-top: 20px;
    margin-bottom: 10px;
}

.modal-text ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-text li {
    margin-bottom: 8px;
}

/* ==================== WORLD CHAT STYLES ==================== */

/* Кнопка Мир чат в главном меню */
.world-chat-button {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 8px 12px;
    justify-content: flex-start;
    /* Наследуем стиль от neon-button */
    background: linear-gradient(45deg, var(--bg-card), #2a2a3e) !important;
    border: 2px solid var(--neon-pink) !important;
    position: relative;
}

.world-chat-button .icon {
    --app-icon-size: 1.85em;
    flex-shrink: 0;
}

.world-chat-content {
    flex: 1;
    min-width: 0;
    text-align: left;
    overflow: hidden;
}

.world-chat-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
    text-align: left;
}

.world-chat-preview {
    font-size: 13px;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.world-chat-preview-emoji,
.world-chat-message-emoji {
    width: 1em;
    height: 1em;
    display: inline-block;
    margin: 0 1px;
    vertical-align: -0.15em;
}

.world-chat-reply-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff7b00, #ff006e);
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 0, 110, 0.45);
    animation: pulse 2s infinite;
}

/* Фиксированный футер Мир чата */
#worldChatScreen {
    --world-chat-footer-height-fallback: 98px;
    --world-chat-footer-gap: 10px;
}

.world-chat-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

/* Вкладки Мир чата - компактные над полем ввода */
.world-chat-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 12px 4px 12px;
    background: transparent;
    justify-content: center;
    align-items: center;
}

.world-chat-tab {
    flex: 0 1 auto;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 80px;
}

.world-chat-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.world-chat-tab.active {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Кнопка размера шрифта */
.world-chat-font-size-btn {
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
    min-width: 35px;
}

.world-chat-font-size-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--neon-cyan);
}

.world-chat-font-size-btn:active {
    transform: scale(0.95);
}

/* Контейнер сообщений */
.world-chat-messages-container {
    position: fixed;
    top: calc(60px + var(--safe-area-top)); /* Высота header + Telegram fullscreen inset */
    bottom: 0; /* До самого низа */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    padding-bottom: calc(var(--world-chat-footer-height, var(--world-chat-footer-height-fallback)) + var(--world-chat-footer-gap));
    background: rgba(0, 0, 0, 0.2);
    scroll-behavior: smooth;
}

html.telegram-fullscreen #swipeScreen.screen > .screen-header {
    padding-top: calc(8px + var(--telegram-main-controls-top)) !important;
    min-height: calc(52px + var(--telegram-main-controls-top)) !important;
}

.world-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
}

/* Спиннер загрузки в мир-чате */
.world-chat-messages .loading-spinner {
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.world-chat-messages .loading-spinner .spinner {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    background-image: url('/webapp/images/loading.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none !important;
    border-radius: 0 !important;
    animation: none !important;
}

.world-chat-messages .loading-spinner p {
    color: var(--text-gray);
    font-size: 1rem;
    margin-top: 10px;
}

/* Сообщение в чате */
.world-chat-message {
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 3px solid;
    overflow: visible;
    white-space: normal;
}

.world-chat-message.world-type {
    border-left-color: #FFD700;
}

.world-chat-message.galya-ai-message {
    border-left-color: #00FF64;
    background: linear-gradient(90deg, rgba(0, 255, 100, 0.12), rgba(0, 0, 0, 0.42));
}

.world-chat-message.city-type {
    border-left-color: #00D9FF;
}

.world-chat-message.private-type {
    border-left-color: #FF006E;
}

/* Заголовок сообщения (никнейм + время) */
.world-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    gap: 8px;
}

/* Никнейм в сообщении */
.world-chat-nickname {
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 1;
}

.world-chat-nickname:hover {
    opacity: 0.8;
}

/* Профиль-чипы рядом с ником в ленте (пол · возраст, город) из последней анкеты.
   margin-left вместо flex gap — gap не работает в старых WebView (Chrome 74). */
.wc-profile-chip {
    display: inline-block;
    font-weight: normal;
    font-size: 10.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.62);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 6px;
    margin-left: 5px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Цвета никнеймов */
.world-chat-nickname.world-type {
    color: #FFD700;
}

.world-chat-nickname.world-type.premium {
    color: #FFA500; /* Оранжевый для Premium */
}

.world-chat-nickname.galya-ai {
    color: #00FF64 !important;
    text-shadow: 0 0 8px rgba(0, 255, 100, 0.48);
}

.world-chat-nickname.city-type {
    color: #00D9FF;
}

.world-chat-nickname.city-type.premium {
    color: #00FF64; /* Зеленый для Premium */
}

.world-chat-nickname.private-type {
    color: #FF006E;
}

/* Админ - красный цвет с приоритетом */
.world-chat-nickname.admin {
    color: #FF3333 !important;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.5);
}

/* Бейдж админа */
.world-chat-admin-badge {
    font-size: 12px;
    margin-right: 2px;
}

/* Корона Premium */
.world-chat-pro-badge {
    color: #FFD700;
    font-size: 12px;
}

/* Бейдж Гали — тот же лёгкий стиль иконки, что у бейджа админа */
.world-chat-galya-badge {
    font-size: 12px;
    margin-right: 2px;
}

/* Флаг страны отправителя рядом с ником — единый Мир чат без разделения по аудиториям */
.world-chat-country-flag {
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
    flex: 0 0 1rem;
    width: 1rem;
    height: 0.71rem;
}

/* Текст сообщения */
.world-chat-text {
    font-size: 13px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    word-break: break-word;
}

/* Размеры шрифта */
.world-chat-messages.font-small .world-chat-text {
    font-size: 11px;
}

.world-chat-messages.font-small .world-chat-nickname {
    font-size: 11px;
}

.world-chat-messages.font-medium .world-chat-text {
    font-size: 13px;
}

.world-chat-messages.font-medium .world-chat-nickname {
    font-size: 13px;
}

.world-chat-messages.font-large .world-chat-text {
    font-size: 16px;
}

.world-chat-messages.font-large .world-chat-nickname {
    font-size: 15px;
}

/* Цвета текста по типу */
.world-chat-message.world-type .world-chat-text {
    color: #FFD700;
}

.world-chat-message.galya-ai-message .world-chat-text {
    color: #C8FFD9;
    text-shadow: 0 0 5px rgba(0, 255, 100, 0.18);
}

.world-chat-message.city-type .world-chat-text {
    color: #00D9FF;
}

.world-chat-message.private-type .world-chat-text {
    color: #FF006E;
}

/* Сообщения админа - красный текст с приоритетом */
.world-chat-message.admin-message .world-chat-text {
    color: #FF3333 !important;
    text-shadow: 0 0 5px rgba(255, 51, 51, 0.3);
}

/* Время сообщения */
.world-chat-time {
    font-size: 10px;
    color: var(--text-gray);
    flex-shrink: 0;
    white-space: nowrap;
}

.world-chat-galya-profile-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 380px);
    padding: 20px;
    border: 2px solid rgba(0, 255, 100, 0.76);
    border-radius: 16px;
    background: rgba(14, 18, 22, 0.98);
    box-shadow: 0 0 28px rgba(0, 255, 100, 0.18);
    z-index: 10000;
    color: var(--text-light);
}

.world-chat-galya-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.world-chat-galya-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00FF64, #00D9FF);
    color: #06130C;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 0 16px rgba(0, 255, 100, 0.28);
    flex-shrink: 0;
}

.world-chat-galya-profile-name {
    color: #00FF64;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(0, 255, 100, 0.4);
}

.world-chat-galya-profile-subtitle {
    margin-top: 3px;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.3;
}

.world-chat-galya-profile-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 255, 100, 0.28);
    border-radius: 8px;
    background: rgba(0, 255, 100, 0.08);
    color: #C8FFD9;
    font-size: 13px;
}

.world-chat-galya-profile-meta strong {
    color: #00FF64;
    font-size: 14px;
}

.world-chat-galya-profile-text,
.world-chat-galya-profile-hint {
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: break-word;
}

.world-chat-galya-profile-text {
    color: var(--text-light);
}

.world-chat-galya-profile-hint {
    margin-top: 12px;
    color: #00D9FF;
}

.world-chat-galya-profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.world-chat-galya-profile-actions button {
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

.world-chat-galya-profile-primary {
    flex: 1;
    border: none;
    background: linear-gradient(135deg, #00FF64, #00D9FF);
    color: #06130C;
    font-weight: 800;
}

.world-chat-galya-profile-secondary {
    flex: 0 0 96px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
}

.world-chat-reply-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 8px 10px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.world-chat-reply-preview-content {
    flex: 1;
    min-width: 0;
}

.world-chat-reply-preview-header {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 2px;
}

.world-chat-reply-preview-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.world-chat-reply-preview-close {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    width: 28px;
    height: 28px;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.world-chat-reply-preview-close:hover {
    color: var(--neon-red);
}

.world-chat-private-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 10px 8px 10px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 0, 110, 0.4);
    border-radius: 10px;
    background: rgba(255, 0, 110, 0.12);
}

.world-chat-private-chip-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.72);
}

.world-chat-private-chip-nickname {
    font-size: 12px;
    color: #ffd6e7;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.world-chat-private-chip-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    width: 24px;
    height: 24px;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.world-chat-private-chip-close:hover {
    color: #ff9bbf;
}

.world-chat-reply-indicator {
    margin-bottom: 6px;
}

.world-chat-reply-indicator .reply-indicator-line {
    background: rgba(0, 217, 255, 0.9);
}

/* Инпут для сообщений */
.world-chat-input-container {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: transparent;
}

.world-chat-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 8px 10px;
    position: relative;
    min-width: 0;
}

.world-chat-prefix {
    font-weight: bold;
    font-size: 15px;
    color: var(--neon-cyan);
    min-width: 14px;
    flex-shrink: 0;
}

.world-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 14px;
    min-width: 0;
}

.world-chat-char-counter {
    font-size: 10px;
    color: var(--text-gray);
    min-width: 38px;
    text-align: right;
    flex-shrink: 0;
}

.world-chat-send-btn {
    min-width: 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.world-chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.world-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для узких экранов (Z Fold 5 и подобные) */
@media (max-width: 380px) {
    #worldChatScreen {
        --world-chat-footer-height-fallback: 88px;
        --world-chat-footer-gap: 8px;
    }

    .world-chat-tabs {
        gap: 4px;
        padding: 6px 8px 4px 8px;
    }

    .world-chat-tab {
        padding: 5px 6px;
        font-size: 12px;
        min-width: 70px;
    }

    .world-chat-font-size-btn {
        padding: 5px 8px;
        font-size: 13px;
        min-width: 30px;
        margin-left: auto;
    }

    .world-chat-messages-container {
        padding: 8px;
        padding-bottom: calc(var(--world-chat-footer-height, var(--world-chat-footer-height-fallback)) + var(--world-chat-footer-gap));
    }

    .world-chat-message {
        padding: 6px 8px;
    }

    .world-chat-nickname {
        font-size: 12px;
    }

    .world-chat-text {
        font-size: 12px;
    }

    .world-chat-input-container {
        gap: 6px;
        padding: 6px 8px;
    }

    .world-chat-input-wrapper {
        gap: 4px;
        padding: 6px 8px;
    }

    .world-chat-prefix {
        font-size: 14px;
        min-width: 12px;
    }

    .world-chat-input {
        font-size: 13px;
    }

    .world-chat-char-counter {
        font-size: 9px;
        min-width: 32px;
    }

    .world-chat-send-btn {
        min-width: 38px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

/* Адаптивная верстка для экрана выбора локации */
/* Узкие экраны (сложенный Z Fold5, узкие телефоны) */
@media (max-width: 400px) {
    .header {
        margin-bottom: 15px;
        padding-top: calc(5px + var(--safe-area-top));
    }

    .back-btn {
        padding: 4px 8px;
        font-size: 12px;
        left: 5px;
        top: calc(5px + var(--safe-area-top));
    }

    .logo {
        padding-top: 40px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .logo p {
        font-size: 12px;
        margin-top: 5px;
    }

    .neon-icon {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .location-setup-container {
        padding: 0.5rem 1rem 1rem 1rem;
    }

    .setup-country-selection h3,
    .setup-region-selection h3,
    .setup-city-selection h3 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .auto-location-section {
        margin-bottom: 15px;
    }

    .or-divider {
        margin: 10px 0;
        font-size: 0.8rem;
    }

    .setup-country-selection,
    .setup-region-selection,
    .setup-city-selection {
        margin: 1rem 0;
    }

    .country-buttons {
        gap: 0.45rem;
        padding: 0.2rem 0.25rem 0.3rem;
    }

    .country-btn {
        padding: 8px 6px;
        font-size: 12px;
        gap: 3px;
    }

    .country-code {
        padding: 0.1rem 0.24rem;
        font-size: 0.62rem;
    }

    .country-flag {
        width: 0.95rem;
        height: 0.68rem;
        flex-basis: 0.95rem;
    }

    #locationSetup.screen.active {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #locationSetup .header {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #locationSetup .logo h1 {
        font-size: 19px;
    }

    #locationSetup .logo p {
        font-size: 12.5px;
    }

    #locationSetup .location-setup-container {
        padding-left: 0.35rem !important;
        padding-right: 0.35rem !important;
    }

#locationSetup .country-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        padding: 0.35rem;
    }

    #locationSetup .country-btn {
        min-height: 40px;
        padding: 0.46rem 0.42rem;
        gap: 0.26rem;
        font-size: 0.74rem;
        justify-content: flex-start;
    }

    #locationSetup .country-label {
        overflow: hidden;
        text-overflow: clip;
        white-space: nowrap;
    }

    #locationSetup .country-flag {
        width: 0.92rem;
        height: 0.66rem;
        flex-basis: 0.92rem;
    }

    @media (max-width: 360px) {
        .country-buttons {
            gap: 0.35rem;
        }

        .country-btn {
            padding: 7px 5px;
            font-size: 11.5px;
            gap: 2px;
        }

        .country-code {
            font-size: 0.58rem;
            padding: 0.08rem 0.2rem;
        }

        .country-flag {
            width: 0.85rem;
            height: 0.61rem;
            flex-basis: 0.85rem;
        }

        #locationSetup .country-buttons {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            max-height: 44vh;
        }

        #locationSetup .country-btn {
            min-height: 38px;
            padding: 0.42rem 0.36rem;
            gap: 0.22rem;
            font-size: 0.72rem;
            justify-content: flex-start;
        }

        #locationSetup .country-flag {
            width: 0.84rem;
            height: 0.6rem;
            flex-basis: 0.84rem;
        }
    }

    .neon-button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

#locationSetup .country-buttons.country-buttons-fallback {
    display: none !important;
}

#locationSetup .country-select-shell {
    position: relative;
    width: 100%;
}

#locationSetup .setup-country-select {
    width: 100%;
    min-height: 48px;
    padding: 0.78rem 2.7rem 0.78rem 0.9rem;
    border: 1px solid rgba(0, 217, 255, 0.46);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(255, 0, 110, 0.1)),
        rgba(4, 9, 23, 0.82);
    color: #fff;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.06), 0 12px 26px rgba(0, 0, 0, 0.28);
    outline: none;
    cursor: pointer;
    appearance: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
    background-image:
        linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(255, 0, 110, 0.1)),
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.95) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 50%, transparent 50%);
    background-position:
        0 0,
        calc(100% - 22px) 21px,
        calc(100% - 15px) 21px;
    background-size:
        100% 100%,
        7px 7px,
        7px 7px;
    background-repeat: no-repeat;
}

#locationSetup .setup-country-select:focus {
    border-color: rgba(0, 217, 255, 0.88);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.18), 0 0 22px rgba(0, 217, 255, 0.24), inset 0 0 0 1px rgba(0, 217, 255, 0.12);
}

#locationSetup .setup-country-select option,
#locationSetup .setup-country-select optgroup {
    background: #10142a;
    color: #fff;
}

#locationSetup .country-select-shell.is-custom-ready .setup-country-select {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 1px;
    padding: 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#locationSetup .setup-country-dropdown {
    position: relative;
    width: 100%;
    z-index: 30;
}

#locationSetup .setup-country-dropdown.open {
    z-index: 1200;
}

#locationSetup .setup-country-dropdown-toggle {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.78rem 0.9rem;
    border: 1px solid rgba(0, 217, 255, 0.62);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.16), rgba(255, 0, 110, 0.1)),
        rgba(4, 9, 23, 0.86);
    color: #fff;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.06), 0 12px 26px rgba(0, 0, 0, 0.28);
    text-align: left;
    cursor: pointer;
}

#locationSetup .setup-country-dropdown-toggle:disabled {
    cursor: wait;
    opacity: 0.84;
}

#locationSetup .setup-country-dropdown-toggle:focus-visible,
#locationSetup .setup-country-dropdown.open .setup-country-dropdown-toggle {
    outline: none;
    border-color: rgba(0, 217, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.18), 0 0 22px rgba(0, 217, 255, 0.24), inset 0 0 0 1px rgba(0, 217, 255, 0.12);
}

#locationSetup .setup-country-dropdown-text,
#locationSetup .setup-country-option {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    min-width: 0;
}

#locationSetup .setup-country-dropdown-text {
    flex: 1;
    overflow: hidden;
}

#locationSetup .setup-country-dropdown .country-flag {
    width: 1.35rem;
    height: 0.94rem;
    flex: 0 0 1.35rem;
    border-radius: 2px;
}

#locationSetup .setup-country-code {
    flex: 0 0 auto;
    min-width: 1.55rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

#locationSetup .setup-country-name,
#locationSetup .setup-country-placeholder {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#locationSetup .setup-country-placeholder {
    color: rgba(255, 255, 255, 0.92);
}

#locationSetup .setup-country-dropdown-caret {
    width: 0;
    height: 0;
    flex: 0 0 auto;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.92);
    transition: transform 0.18s ease;
}

#locationSetup .setup-country-dropdown.open .setup-country-dropdown-caret {
    transform: rotate(180deg);
}

#locationSetup .setup-country-dropdown-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(52vh, 430px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.45rem;
    border: 1px solid rgba(0, 217, 255, 0.48);
    border-radius: 14px;
    background: rgba(9, 14, 32, 0.98);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.48), 0 0 28px rgba(0, 217, 255, 0.12);
    backdrop-filter: blur(16px);
}

#locationSetup .setup-country-option-group + .setup-country-option-group {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#locationSetup .setup-country-option-group-title {
    padding: 0.45rem 0.55rem 0.3rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
}

#locationSetup .setup-country-option {
    width: 100%;
    min-height: 40px;
    padding: 0.52rem 0.6rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.96rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

#locationSetup .setup-country-option:hover,
#locationSetup .setup-country-option:focus-visible {
    outline: none;
    background: rgba(0, 217, 255, 0.12);
}

#locationSetup .setup-country-option.selected {
    background: rgba(38, 111, 214, 0.92);
}

/* Средние экраны (обычные смартфоны) */
@media (min-width: 401px) and (max-width: 768px) {
    .header {
        margin-bottom: 20px;
    }

    .logo {
        padding-top: 45px;
    }

    .location-setup-container {
        padding: 0.75rem 1.5rem 1.5rem 1.5rem;
    }
}

/* Широкие экраны (планшеты, развернутый Z Fold5) */
@media (min-width: 769px) {
    .header {
        margin-bottom: 30px;
    }

    .logo {
        padding-top: 50px;
    }

    .location-setup-container {
        padding: 1rem 2rem 2rem 2rem;
        max-width: 600px;
    }

    .setup-country-selection h3,
    .setup-region-selection h3,
    .setup-city-selection h3 {
        font-size: 1.3rem;
    }

    /* Центрирование главного меню на широких экранах */
    #mainMenu {
        max-width: 600px;
        margin: 0 auto;
    }

    .menu-buttons {
        max-width: 360px;
        margin-bottom: 10px;
    }
}


/* ===== STICKY NOTE BETA NOTICE ===== */
.sticky-note {
    position: relative;
    width: 200px;
    margin: 15px auto 0;
    background: linear-gradient(135deg, #FFF740 0%, #FFE135 100%);
    padding: 15px 12px 12px 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    z-index: 10;
    animation: flutter 3s ease-in-out infinite;
    cursor: pointer;
}

/* Неоновое розовое свечение ПО ВСЕМУ периметру стикера (тусклое, небольшой радиус) */
.sticky-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    box-shadow:
        0 0 15px rgba(255, 0, 110, 0.4),
        0 0 30px rgba(255, 0, 110, 0.3),
        0 0 45px rgba(255, 0, 110, 0.2);
    border-radius: 2px;
    animation: neonFlicker 6s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.02);
    animation: none;
}

.sticky-note-tape {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 16px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.sticky-note-content {
    position: relative;
    text-align: center;
}

.sticky-note-text {
    margin: 0 0 8px 0;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    font-weight: 500;
    text-align: center;
}

.sticky-note-link {
    display: block;
    font-size: 11px;
    color: #0066cc;
    text-align: center;
    margin: 0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.sticky-note-link:hover {
    color: #004499;
    text-decoration: underline;
}

@keyframes flutter {
    0%, 100% {
        transform: rotate(-2deg);
    }
    25% {
        transform: rotate(-1deg) translateY(-1px);
    }
    50% {
        transform: rotate(-2.5deg);
    }
    75% {
        transform: rotate(-1.5deg) translateY(-0.5px);
    }
}

/* Анимация мерцания неоновой лампочки (плавное, редкое, тусклое) */
@keyframes neonFlicker {
    0%, 100% {
        opacity: 1;
        box-shadow:
            0 0 15px rgba(255, 0, 110, 0.4),
            0 0 30px rgba(255, 0, 110, 0.3),
            0 0 45px rgba(255, 0, 110, 0.2);
    }
    15% {
        opacity: 0.85;
        box-shadow:
            0 0 12px rgba(255, 0, 110, 0.35),
            0 0 25px rgba(255, 0, 110, 0.25),
            0 0 38px rgba(255, 0, 110, 0.15);
    }
    18% {
        opacity: 1;
        box-shadow:
            0 0 15px rgba(255, 0, 110, 0.4),
            0 0 30px rgba(255, 0, 110, 0.3),
            0 0 45px rgba(255, 0, 110, 0.2);
    }
    45% {
        opacity: 0.75;
        box-shadow:
            0 0 10px rgba(255, 0, 110, 0.3),
            0 0 20px rgba(255, 0, 110, 0.2),
            0 0 32px rgba(255, 0, 110, 0.15);
    }
    48% {
        opacity: 0.6;
        box-shadow:
            0 0 8px rgba(255, 0, 110, 0.25),
            0 0 16px rgba(255, 0, 110, 0.18),
            0 0 25px rgba(255, 0, 110, 0.12);
    }
    51% {
        opacity: 0.9;
        box-shadow:
            0 0 13px rgba(255, 0, 110, 0.38),
            0 0 27px rgba(255, 0, 110, 0.28),
            0 0 40px rgba(255, 0, 110, 0.18);
    }
    55% {
        opacity: 1;
        box-shadow:
            0 0 15px rgba(255, 0, 110, 0.4),
            0 0 30px rgba(255, 0, 110, 0.3),
            0 0 45px rgba(255, 0, 110, 0.2);
    }
    80% {
        opacity: 0.8;
        box-shadow:
            0 0 12px rgba(255, 0, 110, 0.33),
            0 0 24px rgba(255, 0, 110, 0.24),
            0 0 36px rgba(255, 0, 110, 0.16);
    }
    85% {
        opacity: 1;
        box-shadow:
            0 0 15px rgba(255, 0, 110, 0.4),
            0 0 30px rgba(255, 0, 110, 0.3),
            0 0 45px rgba(255, 0, 110, 0.2);
    }
}

/* Адаптивные стили для маленьких экранов */
@media (max-width: 600px) {
    .sticky-note {
        width: 180px;
        padding: 12px 10px 10px 10px;
        bottom: 15px;
        right: 15px;
        font-size: 11px;
    }

    .sticky-note-text {
        font-size: 10px;
        margin-bottom: 6px;
    }

    .sticky-note-link {
        font-size: 10px;
    }
}

/* Оптимизация для очень маленьких экранов (до 380px) */
@media (max-width: 380px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 14px;
    }

    /* Уменьшаем заголовки */
    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    /* Уменьшаем кнопки */
    .neon-button {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    /* Уменьшаем модальные окна */
    .modal-content {
        padding: 20px !important;
        max-width: 95% !important;
    }

    /* Уменьшаем формы */
    .form-step {
        padding: 15px !important;
    }

    .neon-input,
    .neon-textarea {
        font-size: 14px !important;
        padding: 10px !important;
    }

    /* Уменьшаем карточки анкет */
    .ad-card {
        padding: 12px !important;
    }

    /* Уменьшаем иконки и флаги */
    .location-flag {
        font-size: 1.1rem !important;
    }

    /* Компактные списки городов */
    .city-list button {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}

/* Оптимизация для экранов среднего размера (380-600px) */
@media (min-width: 381px) and (max-width: 600px) {
    html {
        font-size: 15px;
    }

    /* Уменьшаем заголовки */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.6rem !important;
    }

    /* Уменьшаем кнопки */
    .neon-button {
        padding: 12px 18px !important;
        font-size: 15px !important;
    }
}
/* ==================== КАРТА ОДИНОЧЕСТВА STYLES ==================== */

/* Кнопка Карта Одиночества в главном меню */
.loneliness-map-button {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 8px 12px;
    justify-content: center;
    background: linear-gradient(45deg, var(--bg-card), #2a3e2a) !important;
    border: 2px solid #4CAF50 !important;
}

.loneliness-map-button .icon {
    --app-icon-size: 1.85em;
    flex-shrink: 0;
}

.loneliness-map-button:hover {
    border-color: #66BB6A !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.loneliness-map-content {
    flex: none;
    min-width: 0;
    text-align: center;
}

.loneliness-map-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 4px;
    color: #4CAF50;
    text-align: center;
}

.loneliness-map-subtitle {
    font-size: 12px;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Browse ads filters: keep long labels inside the panel on narrow WebViews. */
#browseAds #filtersPanel {
    overflow: visible;
}

#browseAds #filtersPanel .filter-buttons,
#browseAds #filtersPanel .gender-target-buttons,
#browseAds #filtersPanel .orientation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 6px;
    max-width: 100%;
    overflow: visible;
}

#browseAds #filtersPanel .filter-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    box-sizing: border-box;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    font-size: 0.74rem;
    line-height: 1.12;
}

#browseAds #filtersPanel .filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#browseAds #filtersPanel .filter-actions .neon-button {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.15;
}

@media (max-width: 380px) {
    #browseAds #filtersPanel .filter-buttons,
    #browseAds #filtersPanel .gender-target-buttons,
    #browseAds #filtersPanel .orientation-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 330px) {
    #browseAds #filtersPanel .filter-actions {
        grid-template-columns: 1fr;
    }
}

/* ============= TELEGRAM AUTH MODAL - CLEAN REDESIGN ============= */
#telegramAuthModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#telegramAuthModal.show,
#telegramAuthModal[style*="display: flex"] {
    display: flex !important;
}

/* Контент модалки */
.telegram-auth-modal-content {
    background: linear-gradient(180deg, #1e1e2f 0%, #151521 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 360px;
    position: relative;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    max-height: 90vh;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .telegram-auth-modal-content {
        max-width: 660px;
        padding: 28px 32px;
        max-height: 85vh;
    }
}

@media (min-width: 1024px) {
    .telegram-auth-modal-content {
        max-width: 700px;
        padding: 32px 36px;
    }
}

/* Кнопка закрытия */
.telegram-auth-modal-content .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.telegram-auth-modal-content .modal-close:hover {
    background: rgba(255, 0, 110, 0.2);
    color: #ff006e;
    border-color: rgba(255, 0, 110, 0.3);
}

/* Заголовок */
.auth-modal-title {
    text-align: center;
    color: #00d4ff;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

/* Body - две колонки */
.auth-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .auth-modal-body {
        flex-direction: row;
        gap: 28px;
    }
}

/* Левая колонка */
.auth-left-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Блок предупреждения */
.auth-notice {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-notice-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.auth-notice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.auth-notice-text strong {
    color: #fbbf24;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-notice-text span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Список фич */
.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-features li {
    color: #4ade80;
    font-size: 0.88rem;
    padding-left: 4px;
}

/* Альтернативные способы */
.auth-alternatives {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-alt-label {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.auth-alt-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-btn {
    border: none;
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-btn:hover {
    transform: translateY(-2px);
}

.auth-btn-email {
    background: linear-gradient(135deg, #ff006e, #ff4d94);
}

.auth-btn-google {
    background: linear-gradient(135deg, #4285f4, #5a95f5);
}

.auth-btn-apple {
    background: linear-gradient(135deg, #1a1a1a, #333);
}

.auth-btn-vk {
    background: linear-gradient(135deg, #0077ff, #0055cc);
}

/* Правая колонка - QR */
.auth-right-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .auth-right-col {
        padding-left: 28px;
        border-left: 1px solid rgba(139, 92, 246, 0.2);
    }
}

.qr-title {
    color: #00d4ff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 14px 0;
    text-align: center;
}

/* QR обертка */
.qr-wrapper {
    background: white;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
    display: inline-block;
}

.qr-wrapper #qrcode {
    display: block !important;
}

.qr-wrapper #qrcode img {
    display: block !important;
    width: 180px !important;
    height: 180px !important;
}

@media (min-width: 768px) {
    .qr-wrapper {
        padding: 20px;
    }

    .qr-wrapper #qrcode img {
        width: 200px !important;
        height: 200px !important;
    }
}

/* Шаги */
.qr-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}

.qr-steps li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-steps li::before {
    counter-increment: step;
    content: counter(step);
    width: 18px;
    height: 18px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #a78bfa;
    flex-shrink: 0;
}

/* Разделитель */
.or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    width: 100%;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Telegram deep link */
.telegram-deep-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0088cc, #00aaff);
    color: white;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.telegram-deep-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.4);
}

/* QR код - показываем ТОЛЬКО canvas, скрываем img */
#telegramAuthModal #qrcode canvas {
    display: inline-block !important;
    max-width: 100%;
    height: auto;
}

#telegramAuthModal #qrcode img {
    display: none !important;
}

/* На мобильных устройствах делаем QR меньше */
@media (max-width: 480px) {
    #telegramAuthModal #qrcode canvas {
        width: 200px !important;
        height: 200px !important;
    }
}

/* QR-коды для скачивания (видны только на широких экранах) */
@media (max-width: 1200px) {
    .qr-codes-container {
        display: none !important;
    }
}

/* На десктопе добавляем hover эффект */
@media (min-width: 769px) {
    .qr-code-item {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .qr-code-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 24px rgba(236, 72, 153, 0.4) !important;
    }
}

/* ========================================
   🏷️ Banner Ad Disclosure UI
   Wrapper, badge "Реклама", три-точие кнопка, дропдаун
   ======================================== */

.banner-disc-wrap {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

/* Бейдж «Реклама» снизу слева */
.banner-disc-label {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.42);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(2px);
    z-index: 5;
}

/* Кнопка ··· сверху справа — появляется при наведении */
.banner-disc-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.banner-disc-wrap:hover .banner-disc-btn {
    opacity: 1;
}
.banner-disc-btn:hover {
    background: rgba(0, 0, 0, 0.78);
}

/* Глобальный дропдаун (appended to body, position: fixed) */
#bannerDiscDropdown {
    position: fixed;
    z-index: 99999;
    background: #16162a;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 12px;
    padding: 4px 0;
    min-width: 210px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
    display: none;
}
#bannerDiscDropdown.banner-disc-open {
    display: block;
    animation: bannerDiscFadeIn 0.12s ease;
}
@keyframes bannerDiscFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.banner-disc-dd-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    padding: 8px 14px 6px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 2px;
}
.banner-disc-dd-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background 0.1s;
    box-sizing: border-box;
    font-family: inherit;
}
.banner-disc-dd-item:hover {
    background: rgba(255, 255, 255, 0.07);
}
.banner-disc-dd-item.banner-disc-danger {
    color: #ff6b7a;
}
.banner-disc-dd-item span {
    font-size: 15px;
    flex-shrink: 0;
}

/* ── Banner Advertiser Info Modal ──────────────────── */
.banner-adv-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s;
    padding: 0 0 24px;
}
.banner-adv-modal.banner-adv-open {
    background: rgba(0, 0, 0, 0.5);
}
.banner-adv-inner {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 520px;
    padding: 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    overflow: hidden;
}
.banner-adv-modal.banner-adv-open .banner-adv-inner {
    transform: translateY(0);
    opacity: 1;
}
.banner-adv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.banner-adv-title {
    font-size: 16px;
    font-weight: 700;
    color: #111;
}
.banner-adv-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.banner-adv-close:hover { color: #333; }
.banner-adv-body {
    padding: 16px 20px 8px;
}
.banner-adv-org {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}
.banner-adv-link {
    color: #3b7cf4;
    text-decoration: none;
    font-weight: 500;
}
.banner-adv-link:hover { text-decoration: underline; }
.banner-adv-row {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    gap: 8px;
}
.banner-adv-row span {
    color: #888;
    min-width: 80px;
    font-size: 13px;
}
.banner-adv-mediakit {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #999;
    text-decoration: none;
}
.banner-adv-mediakit:hover { color: #555; text-decoration: underline; }
.banner-adv-footer {
    padding: 10px 20px 16px;
    font-size: 11px;
    color: #bbb;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}

/* Нейтральные классы карточек анкет: Kaspersky/AdBlock часто режут className с "ad". */
.profiles-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

.profiles-list.compact {
    display: grid;
    gap: 8px;
}

.profile-card {
    display: block;
    background: linear-gradient(135deg, var(--bg-card), #262636);
    border: 1px solid var(--neon-purple);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: visible;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-card.is-pinned {
    margin-top: 18px;
    padding-top: 12px;
}

.profile-card.compact {
    padding: 10px 12px;
    border-radius: 12px;
}

.profile-card.compact.is-pinned {
    padding-top: 10px;
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.1) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.profile-card:hover::before {
    opacity: 1;
}

.profile-card:hover {
    border-color: var(--neon-pink);
    box-shadow: var(--shadow-pink);
    transform: translateY(-5px);
}

.profile-photo-thumbnail {
    width: calc(100% + 24px);
    height: 100px;
    margin: -12px -12px 8px -12px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border-bottom: 2px solid var(--neon-purple);
}

.profile-photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background: rgba(0, 0, 0, 0.1);
}

.profile-card:hover .profile-photo-thumbnail img {
    transform: scale(1.05);
}

.profile-card.compact .profile-photo-thumbnail {
    height: 80px;
    margin: -10px -12px 6px -12px;
    border-radius: 12px 12px 0 0;
}

.profile-photo-thumbnails {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: center;
}

.profile-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-author-row h3 {
    margin: 0;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 0, 110, 0.15);
}

.profile-header h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--neon-pink);
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-card.compact .profile-header {
    margin-bottom: 6px;
    padding-bottom: 4px;
}

.profile-card.compact h3 {
    font-size: 0.9rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-info {
    display: grid;
    gap: 6px;
}

.profile-card.compact .profile-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.profile-field {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.profile-field .icon {
    font-size: 15px;
}

.profile-field .label {
    color: var(--text-gray);
    min-width: 100px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-field .value {
    color: var(--text-light);
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-card.compact .profile-field {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 11px;
    color: var(--text-light);
    gap: 3px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-card.compact .profile-field .label {
    display: none;
}

.profile-card.compact .profile-field .icon {
    flex: 0 0 auto;
}

.profile-card.compact .profile-field .value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light);
}

.profile-distance-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.35);
    background: rgba(0, 217, 255, 0.12);
    color: var(--neon-cyan);
    font-size: 0.78em;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.profile-card.compact .profile-distance-badge {
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 0.86em;
}

.profile-field.full-width {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 3px solid var(--neon-cyan);
}

.profile-field.full-width span:last-child {
    width: 100%;
    word-wrap: break-word;
}

.profile-text {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 2px solid var(--neon-cyan);
    font-style: italic;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-card.compact .profile-text {
    margin-top: 4px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 11.5px;
    font-style: normal;
    line-height: 1.5;
    color: var(--text-light);
    opacity: 0.85;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.profile-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.ad-card.compact .ad-actions-row,
.profile-card.compact .profile-actions-row {
    gap: 8px;
    padding-right: 6px;
    padding-bottom: 6px;
}

.ad-card.compact .like-btn,
.profile-card.compact .like-btn,
.ad-card.compact .view-count,
.profile-card.compact .view-count,
.ad-card.compact .profile-share-btn,
.profile-card.compact .profile-share-btn {
    flex-shrink: 0;
}

.ad-card.compact .contact-btn,
.profile-card.compact .contact-btn,
.ad-card.compact .delete-btn,
.profile-card.compact .delete-btn {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 120px;
}

.ad-card.compact .contact-text,
.profile-card.compact .contact-text,
.ad-card.compact .delete-text,
.profile-card.compact .delete-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#myAds .profile-card,
#myAds .profile-card .profile-info,
#myAds .profile-card .profile-field,
#myAds .profile-card .profile-field.full-width,
#myAds .profile-card .profile-text {
    color: #f4f7fb !important;
    -webkit-text-fill-color: #f4f7fb !important;
}

#myAds .profile-card .profile-field strong,
#myAds .profile-card .profile-field.full-width strong {
    color: #dbeafe !important;
    -webkit-text-fill-color: #dbeafe !important;
}

#myAds .profile-card .profile-field.full-width,
#myAds .profile-card .profile-text {
    background: rgba(8, 8, 18, 0.72) !important;
    border-left-color: var(--neon-cyan) !important;
}

#myAds .profile-card .profile-field .label {
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
}

#myAds .profile-card .profile-field .value {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.profile-card.premium-profile {
    background-color: #1b1b2a;
    background-image:
        linear-gradient(135deg, rgba(255, 215, 0, 0.10), rgba(255, 165, 0, 0.06)),
        linear-gradient(135deg, #151521, #262636);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow:
        0 0 7px rgba(255, 215, 0, 0.22),
        0 0 14px rgba(255, 215, 0, 0.12),
        0 0 20px rgba(255, 215, 0, 0.08),
        0 4px 15px rgba(0, 0, 0, 0.2);
    animation: none;
}

.profile-card.premium-profile:hover {
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow:
        0 0 15px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.25),
        0 0 45px rgba(255, 215, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.profile-card.top-1 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(255, 50, 100, 0.6);
    box-shadow:
        0 0 10px rgba(255, 50, 100, 0.35),
        0 0 20px rgba(255, 50, 100, 0.2),
        0 0 32px rgba(255, 50, 100, 0.12);
}

.profile-card.top-2 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(255, 170, 50, 0.5);
    box-shadow:
        0 0 10px rgba(255, 170, 50, 0.28),
        0 0 20px rgba(255, 170, 50, 0.16),
        0 0 32px rgba(255, 170, 50, 0.1);
}

.profile-card.top-3 {
    margin-top: 18px;
    position: relative;
    overflow: visible !important;
    border: 2px solid rgba(50, 205, 100, 0.45);
    box-shadow:
        0 0 10px rgba(50, 205, 100, 0.22),
        0 0 20px rgba(50, 205, 100, 0.14),
        0 0 32px rgba(50, 205, 100, 0.08);
}

.profile-card.top-1::after,
.profile-card.top-2::after,
.profile-card.top-3::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    pointer-events: none;
    will-change: opacity;
    z-index: 0;
    animation: topGlowPulse 2.5s ease-in-out infinite;
}

.profile-card.top-1::after {
    border: 2px solid rgba(255, 50, 100, 0.5);
}

.profile-card.top-2::after {
    border: 2px solid rgba(255, 170, 50, 0.4);
}

.profile-card.top-3::after {
    border: 2px solid rgba(50, 205, 100, 0.35);
}

.profile-card.top-1 .top-badge {
    background: linear-gradient(135deg, rgba(255, 0, 60, 1), rgba(200, 0, 50, 1));
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.8);
    border: 2px solid rgba(255, 100, 120, 0.5);
}

.profile-card.top-2 .top-badge {
    background: linear-gradient(135deg, rgba(255, 140, 0, 1), rgba(200, 100, 0, 1));
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 140, 0, 0.7);
    border: 2px solid rgba(255, 180, 100, 0.5);
}

.profile-card.top-3 .top-badge {
    background: linear-gradient(135deg, rgba(0, 200, 80, 1), rgba(0, 150, 60, 1));
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 200, 80, 0.6);
    border: 2px solid rgba(100, 230, 150, 0.5);
}

.profile-card.profile-new-animation {
    animation: slideInNew 0.5s ease-out;
}

.profile-card.top-rank-up {
    animation: rankUpPulse 1s ease-out;
}

.profile-card.top-rank-down {
    animation: rankDownPulse 0.8s ease-out;
}

@media (max-width: 380px) {
    .profile-card {
        padding: 12px !important;
    }
}

/* ========================================
   🛡️ Anti-AdBlock Defense (MUST BE LAST!)
   Адблокеры скрывают элементы с "ad-" в className
   и инжектят цветные фоны. Эти правила это отменяют.
   ======================================== */
.ad-card,
.profile-card,
.ad-header,
.profile-header,
.ad-info,
.profile-info,
.ad-field,
.profile-field,
.ad-text,
.profile-text,
.ad-actions,
.profile-actions,
.ad-actions-row,
.profile-actions-row,
.ad-author-row,
.profile-author-row,
.ad-details,
.ad-details-card,
.ad-details-header,
.ad-details-photos,
.ad-author-info,
.ad-search-info,
.ad-description-box,
.ad-date,
.profile-date,
.ad-date-badge,
.profile-date-badge,
.ad-main-photo,
.ad-photo-gallery,
.ad-photo-thumbnail-small,
.ad-photo-thumbnails,
.profile-photo-thumbnails,
.ad-photo-thumbnail,
.profile-photo-thumbnail,
.ads-list,
.profiles-list {
    visibility: visible !important;
    opacity: 1 !important;
}

#adContent.ad-details,
.ad-details-card,
.ad-details-photos,
.ad-search-info,
.ad-description-box,
.ad-main-photo,
.ad-photo-thumbnail-small,
.ad-slide-photo {
    display: block !important;
}

.ad-details-header,
.ad-author-info,
.ad-photo-gallery {
    display: flex !important;
}

.ad-slide-photo {
    display: block !important;
    visibility: visible !important;
}

/* Защита фона карточки от инжекции адблокером */
.ad-card,
.profile-card {
    background: linear-gradient(135deg, var(--bg-card), #262636) !important;
}
#adContent.ad-details {
    background: transparent !important;
    background-image: none !important;
}
.ad-details-card {
    background: linear-gradient(135deg, rgba(8, 8, 18, 0.42), rgba(26, 26, 46, 0.34)) !important;
    background-color: rgba(8, 8, 18, 0.34) !important;
}
.ad-card.premium-ad,
.profile-card.premium-profile {
    background-color: #1b1b2a !important;
    background-image:
        linear-gradient(135deg, rgba(255, 215, 0, 0.10), rgba(255, 165, 0, 0.06)),
        linear-gradient(135deg, #151521, #262636) !important;
}

/* Keep the main menu CTA light sweep visible on desktop/web after late safety overrides. */
#mainMenu .location-info,
#mainMenu .main-menu-action {
    animation-name: main-menu-button-bg-flow !important;
    animation-duration: var(--main-menu-bg-flow-duration) !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
}

#mainMenu .location-info::before,
#mainMenu .main-menu-action::before {
    display: block !important;
    left: 0 !important;
    right: auto !important;
    width: 76% !important;
    top: -28% !important;
    bottom: -28% !important;
    height: auto !important;
    opacity: 0.16;
    filter: blur(5px);
    transform: translateX(-130%) skewX(-16deg);
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--menu-flow-sheen, rgba(0, 229, 255, 0.52)) 24%,
        var(--menu-flow-accent, rgba(255, 255, 255, 0.9)) 50%,
        var(--menu-flow-sheen, rgba(0, 229, 255, 0.52)) 76%,
        transparent 100%
    ) !important;
    will-change: transform, opacity;
    animation-name: main-menu-surface-flow-steady !important;
    animation-duration: var(--main-menu-flow-duration) !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
    animation-delay: var(--menu-flow-delay, 0s) !important;
    animation-direction: var(--menu-flow-direction, normal) !important;
}

#mainMenu .location-info::after,
#mainMenu .main-menu-action::after {
    display: block !important;
    opacity: 0.3;
    will-change: opacity;
    animation-name: main-menu-surface-breathe-steady !important;
    animation-duration: var(--main-menu-breathe-duration) !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
    animation-delay: calc(var(--menu-flow-delay, 0s) + 0.2s) !important;
}

#mainMenu .neon-button.browse-ads-cta.main-menu-action::after {
    animation-name: gold-flow-soft !important;
    animation-duration: var(--main-menu-bg-flow-duration) !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    animation-play-state: running !important;
}

@keyframes main-menu-surface-flow-steady {
    0% {
        transform: translateX(-130%) skewX(-16deg);
        opacity: 0.16;
    }
    16% {
        opacity: 0.3;
    }
    34%, 60% {
        opacity: 0.92;
    }
    82% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(230%) skewX(-16deg);
        opacity: 0.16;
    }
}

@keyframes main-menu-surface-breathe-steady {
    0%, 100% {
        opacity: 0.2;
    }
    45% {
        opacity: 0.34;
    }
    68% {
        opacity: 0.28;
    }
}

@media (prefers-reduced-motion: reduce) {
    #mainMenu .location-info,
    #mainMenu .main-menu-action,
    #mainMenu .location-info::before,
    #mainMenu .location-info::after,
    #mainMenu .main-menu-action::before,
    #mainMenu .main-menu-action::after {
        animation: none !important;
    }
}
.ads-list,
.profiles-list {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* Browse profiles must stay inside the central column even when compact chips are long. */
#browseAds #adsList,
#browseAds .ads-list,
#browseAds .profiles-list {
    width: 100% !important;
    max-width: 400px !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    justify-items: stretch !important;
    overflow-x: clip !important;
}

/* ========================================================================
   MAIN DASHBOARD 2026
   Calm product hierarchy: one bright CTA, matte surfaces, one icon system.
   ======================================================================== */

:root {
    --product-bg: #050610;
    --product-surface: rgba(15, 17, 36, 0.96);
    --product-surface-raised: rgba(20, 22, 45, 0.98);
    --product-border: rgba(255, 255, 255, 0.09);
    --product-border-strong: rgba(255, 255, 255, 0.14);
    --product-text: #f8f8fc;
    --product-muted: rgba(226, 228, 240, 0.6);
    --product-accent: #f22786;
    --product-accent-deep: #b81472;
    --product-accent-soft: rgba(242, 39, 134, 0.14);
    --product-blue: #8b8cff;
    --primary-nav-height: 78px;
}

#mainMenu.screen {
    background:
        radial-gradient(circle at 84% 7%, rgba(100, 60, 205, 0.13), transparent 30%),
        radial-gradient(circle at 12% 34%, rgba(242, 39, 134, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(4, 5, 15, 0.94), rgba(5, 6, 16, 0.985)) !important;
    padding:
        calc(12px + var(--telegram-main-controls-top))
        14px
        calc(var(--primary-nav-height) + 26px + var(--chat-safe-bottom-extra)) !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
}

#mainMenu.screen::-webkit-scrollbar {
    width: 0;
    height: 0;
}

#mainMenu.screen.active {
    max-width: none !important;
}

#mainMenu.screen.active > .main-dashboard-shell {
    width: 100% !important;
    max-width: 430px !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}

#mainMenu .main-dashboard-shell {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#mainMenu .main-product-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 142px;
    padding-top: 4px;
}

#mainMenu .main-product-header > .hamburger-menu {
    position: absolute !important;
    top: 4px !important;
    left: 0 !important;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 11px 9px;
    border: 1px solid rgba(198, 162, 255, 0.6);
    border-radius: 13px;
    /* Более светлый градиент + заметное неон-свечение: бургер не должен
       проваливаться в тёмный фон на Android, где backdrop-filter не работает
       (Chrome-74 WebView) и «фростед-стекло» не подсвечивает кнопку. */
    background:
        linear-gradient(145deg, rgba(62, 52, 112, 0.97), rgba(34, 30, 68, 0.97));
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.34),
        0 0 16px rgba(151, 82, 213, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

#mainMenu .main-product-header .hamburger-line {
    flex: 0 0 2px;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    border-radius: 99px;
    background: #ffffff;
    /* Лёгкое свечение вместо тёмной тени — полоски читаются ярко на любом фоне. */
    box-shadow: 0 0 5px rgba(197, 168, 255, 0.5);
}

@media (hover: hover) {
    #mainMenu .main-product-header > .hamburger-menu:hover {
        transform: translateY(-1px);
        border-color: rgba(216, 163, 255, 0.58);
        background:
            linear-gradient(145deg, rgba(45, 34, 82, 0.98), rgba(17, 18, 40, 0.98));
        box-shadow:
            0 10px 24px rgba(0, 0, 0, 0.38),
            0 0 18px rgba(151, 82, 213, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

#mainMenu .main-product-header > .hamburger-menu:focus-visible {
    outline: 2px solid rgba(221, 171, 255, 0.78);
    outline-offset: 3px;
}

#mainMenu .main-product-header > .hamburger-menu:active {
    transform: translateY(1px) scale(0.98);
}

#mainMenu .main-product-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

#mainMenu .main-brand-avatar {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(242, 39, 134, 0.45);
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.42),
        0 0 24px rgba(242, 39, 134, 0.17);
}

#mainMenu .main-logo-wordmark {
    font-family: "AnonimkaRoboto", "Segoe UI", sans-serif !important;
    font-size: 25px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.8px !important;
    color: var(--product-text) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
    background-clip: initial !important;
    text-shadow: none !important;
}

/* Referral/share */
#referralModal .pulse-icon,
#referralModal .pulse-gift {
    animation: none !important;
    filter: none !important;
}

#referralModal.referral-share-only-mode #referralModalHeadline {
    display: none !important;
}

#referralModal .referral-modal-hero-icon {
    width: 42px !important;
    height: 42px !important;
    margin: 0 auto 12px !important;
    border: 1px solid rgba(242, 80, 161, 0.18) !important;
    border-radius: 13px !important;
    background-color: rgba(242, 39, 134, 0.06) !important;
    color: #e47faf !important;
    box-shadow: none !important;
}

#referralModal #referralModalDescription {
    margin: 0 auto 8px !important;
    max-width: 330px !important;
    color: rgba(229, 231, 240, 0.72) !important;
    font-size: 12px !important;
    line-height: 1.48 !important;
    text-shadow: none !important;
}

#referralModal #referralModalLimitNote,
#referralModal #referralLinkLabel {
    color: rgba(202, 205, 219, 0.5) !important;
    font-size: 10px !important;
    text-shadow: none !important;
}

#referralModal #referralLink {
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: rgba(230, 232, 242, 0.7) !important;
    box-shadow: none !important;
}

#referralModal.friend-share-mode .modal-content {
    width: min(92vw, 620px);
    max-width: 620px !important;
    border-color: rgba(232, 201, 119, 0.16) !important;
    background:
        radial-gradient(circle at 92% 3%, rgba(232, 201, 119, 0.08), transparent 28%),
        linear-gradient(145deg, rgba(22, 22, 45, 0.99), rgba(13, 14, 31, 0.99)) !important;
}

#referralModal.friend-share-mode .referral-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#referralModal.friend-share-mode .referral-benefits,
#referralModal.friend-share-mode .referral-target-platform-picker {
    display: none !important;
}

#referralModal.friend-share-mode #referralModalHeadline {
    display: block !important;
    max-width: 440px;
    margin: 0 auto !important;
    color: #f0d58b !important;
    font-size: 16px !important;
    line-height: 1.3 !important;
    text-shadow: none !important;
}

#referralModal.friend-share-mode .friend-share-crown {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 48px !important;
    height: 48px !important;
    margin: 2px auto 0 !important;
    border-color: rgba(232, 201, 119, 0.22) !important;
    background: rgba(232, 201, 119, 0.07) !important;
    color: #e8c977 !important;
}

#referralModal.friend-share-mode .friend-share-crown svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#referralModal.friend-share-mode #referralModalLimitNote {
    max-width: 440px;
    margin: 0 auto !important;
    line-height: 1.4 !important;
}

#referralModal .referral-friend-code-panel {
    margin: 4px 0 2px !important;
    padding: 13px 14px !important;
    border: 1px solid rgba(232, 201, 119, 0.17) !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(232, 201, 119, 0.055), rgba(151, 82, 213, 0.055)) !important;
    text-align: left;
}

#referralModal .referral-friend-code-panel button[onclick^="copyMyFriendCode"] {
    border-color: rgba(232, 201, 119, 0.4) !important;
    background: rgba(232, 201, 119, 0.08) !important;
    color: #f0d58b !important;
    box-shadow: none !important;
}

#referralModal .referral-friend-code-panel input {
    border-color: rgba(232, 201, 119, 0.22) !important;
    background: rgba(4, 5, 14, 0.42) !important;
}

#referralModal .friend-code-loading,
#referralModal .friend-code-auth-note {
    color: rgba(229, 231, 240, 0.62);
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

#referralModal.friend-share-mode .referral-desktop-qr-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 4px 0 !important;
}

#referralModal.friend-share-mode .referral-desktop-qr-container[data-platform-items="vk"],
#referralModal.friend-share-mode .referral-desktop-qr-container[data-platform-items="ok"] {
    grid-template-columns: minmax(128px, 180px);
    justify-content: center;
}

#referralModal.friend-share-mode .referral-qr-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
}

#referralModal.friend-share-mode #referralLinkContainer {
    margin: 2px 0 !important;
}

#referralModal .referral-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#referralModal .referral-button-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    #mainMenu .main-referral-copy {
        gap: 6px !important;
    }

    #mainMenu .friend-reward-badge,
    .profile-hub-row .friend-reward-badge {
        min-height: 23px !important;
        padding: 3px 7px !important;
        font-size: 10px !important;
    }

    #referralModal.friend-share-mode .referral-desktop-qr-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    #referralModal.friend-share-mode .referral-qr-card {
        padding: 7px 5px;
    }

    #referralModal.friend-share-mode .referral-qr-code {
        width: min(76px, 100%);
    }

    #referralModal.friend-share-mode .referral-qr-title {
        font-size: 10px;
    }
}

/* World Chat help */
.world-chat-faq-content {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(242, 39, 134, 0.09), transparent 32%),
        #111329 !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46) !important;
}

.world-chat-faq-title,
.world-chat-faq-content > h2 {
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 18px !important;
    line-height: 1.22 !important;
    text-shadow: none !important;
}

.world-chat-faq-text,
.world-chat-faq-text p,
.world-chat-faq-text li {
    color: rgba(226, 228, 238, 0.72) !important;
    text-shadow: none !important;
}

.world-chat-faq-text strong {
    color: #e38ab5 !important;
    text-shadow: none !important;
}

.world-chat-faq-icon,
.world-chat-faq-tab,
.world-chat-faq-prefix,
.world-chat-faq-menu-chip {
    border-color: rgba(242, 80, 161, 0.18) !important;
    background: rgba(242, 39, 134, 0.07) !important;
    color: #dc82ad !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
}

.world-chat-faq-tab.city,
.world-chat-faq-prefix.city {
    border-color: rgba(143, 116, 255, 0.18) !important;
    background: rgba(124, 91, 255, 0.07) !important;
    color: #b3a5f7 !important;
}

.world-chat-faq-tab.private,
.world-chat-faq-prefix.private {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(231, 232, 240, 0.7) !important;
}

.world-chat-faq-font-btn,
.world-chat-faq-size-toggle,
.world-chat-faq-close {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(239, 240, 247, 0.7) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.world-chat-faq-text::-webkit-scrollbar-thumb {
    background: rgba(242, 80, 161, 0.3) !important;
    box-shadow: none !important;
}

.screen:focus,
.screen:focus-visible {
    outline: none !important;
}

#mainMenu .main-logo-wordmark::after {
    content: ".";
    color: var(--product-accent);
}

#mainMenu .main-brand-tagline {
    max-width: 220px;
    margin-top: 2px;
    color: rgba(226, 228, 240, 0.58);
    font-size: 11px;
    font-weight: 520;
    line-height: 1.25;
    text-align: center;
}

#mainMenu .main-age-badge {
    position: absolute !important;
    top: 64px !important;
    right: -25px !important;
    left: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    min-height: 19px;
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(9, 10, 25, 0.88);
    color: rgba(255, 255, 255, 0.58);
    font-size: 9px;
    font-weight: 800;
    text-shadow: none;
    box-shadow: none;
}

#mainMenu .main-language-switcher {
    position: absolute;
    top: 4px;
    right: 0;
    z-index: 235;
    width: auto;
    min-height: 44px;
}

#mainMenu .main-language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 64px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--product-border);
    border-radius: 13px;
    background: rgba(15, 17, 36, 0.78);
    color: rgba(247, 248, 253, 0.8);
    font-size: 12px;
    font-weight: 800;
    box-shadow: none;
    text-shadow: none;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#mainMenu .main-language-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mainMenu .site-stats {
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: -2px 0 0;
    padding: 8px 12px;
    border: 1px solid var(--product-border);
    border-radius: 12px;
    background: rgba(15, 17, 36, 0.84);
    box-shadow: none;
    backdrop-filter: none;
}

#mainMenu .site-stats .stat-item {
    color: rgba(255, 255, 255, 0.64);
    font-size: 11px;
}

#mainMenu #adminStats .stat-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: #bda9f4;
    filter: none;
}

#mainMenu #adminStats .stat-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mainMenu #adminStats .stat-icon-active {
    color: #ef77b2;
}

#mainMenu #adminStats .stat-icon-ads {
    color: #9a8bea;
}

#mainMenu #adminStats .stat-icon-blocked {
    color: #8d86a7;
}

#mainMenu #adminStats .stat-value {
    color: rgba(255, 255, 255, 0.88);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

#mainMenu .site-stats .stat-divider {
    display: block;
    flex: 0 0 1px;
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.08);
}

#mainMenu .main-city-panel {
    overflow: hidden;
    border: 1px solid var(--product-border);
    border-radius: 18px;
    background: var(--product-surface);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

#mainMenu .user-location {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 76px;
    margin: 0 !important;
    padding: 12px 14px !important;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: var(--product-text);
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

#mainMenu .user-location:hover {
    background: rgba(255, 255, 255, 0.025) !important;
    transform: none;
}

#mainMenu .main-line-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(143, 116, 255, 0.22);
    border-radius: 13px;
    background: rgba(124, 91, 255, 0.09);
    color: #b8a7ff;
}

#mainMenu .main-line-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mainMenu #userLocationDisplay {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    margin-left: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    color: var(--product-text);
    font-size: 15px;
    font-weight: 750;
    opacity: 1;
    box-shadow: none !important;
    text-shadow: none;
    animation: none !important;
}

#mainMenu .main-city-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    margin-left: 11px;
}

#mainMenu #userLocationDisplay .app-icon-location {
    display: none !important;
}

#mainMenu .main-location-change {
    flex: 0 0 auto;
    margin-left: 8px;
    padding-left: 0;
    color: var(--product-muted);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

#mainMenu .main-chevron {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: rgba(255, 255, 255, 0.32);
}

#mainMenu .city-stats-block {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--product-muted);
    font-size: 11px;
    line-height: 1.2;
    text-align: left;
    box-shadow: none;
    backdrop-filter: none;
}

#mainMenu .city-stats-block span {
    text-shadow: none;
}

#mainMenu #cityStatsCompactLine {
    display: block;
    overflow: hidden;
    color: rgba(226, 228, 240, 0.58);
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainMenu .city-stats-full-line {
    display: none !important;
}

#mainMenu .city-stats-block b {
    color: var(--product-text);
    font-weight: 800;
}

#mainMenu .main-hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 10px;
}

#mainMenu .main-create-wrap {
    position: relative;
    min-width: 0;
}

#mainMenu .main-menu-action {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 108px;
    margin: 0 !important;
    padding: 16px 14px;
    overflow: hidden;
    border: 1px solid var(--product-border);
    border-radius: 18px;
    background: var(--product-surface-raised) !important;
    background-image: none !important;
    color: var(--product-text);
    text-align: left;
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.22) !important;
    text-shadow: none;
    animation: none !important;
    cursor: pointer;
}

#mainMenu .main-menu-action::before,
#mainMenu .main-menu-action::after,
#mainMenu .location-info::before,
#mainMenu .location-info::after {
    display: none !important;
    content: none !important;
    animation: none !important;
}

#mainMenu .main-menu-action .main-line-icon {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 38px;
    height: 38px;
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 255, 255, 0.78);
}

#mainMenu .main-menu-action .main-action-copy {
    display: block;
    align-self: flex-end;
    max-width: calc(100% - 22px);
}

#mainMenu .main-menu-action .main-action-copy strong {
    display: block;
    color: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.18px;
}

#mainMenu .main-menu-action > .main-chevron {
    position: absolute;
    right: 11px;
    bottom: 15px;
    color: currentColor;
    opacity: 0.58;
}

#mainMenu .main-menu-browse {
    border-color: rgba(255, 107, 174, 0.24);
    background-color: #09091e !important;
    background-image:
        linear-gradient(90deg, rgba(5, 5, 20, 0.88) 0%, rgba(7, 6, 25, 0.66) 46%, rgba(10, 7, 30, 0.18) 100%),
        url('/webapp/images/main-browse-card-v1.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    color: #fff;
    box-shadow:
        0 18px 38px rgba(151, 13, 91, 0.34),
        0 0 24px rgba(242, 39, 134, 0.13) !important;
}

#mainMenu .main-menu-browse .main-line-icon {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

#mainMenu .main-menu-create {
    height: 100%;
    border-color: rgba(154, 100, 255, 0.28);
    background-color: #09091e !important;
    background-image:
        linear-gradient(90deg, rgba(5, 5, 20, 0.90) 0%, rgba(7, 6, 25, 0.68) 47%, rgba(10, 7, 30, 0.17) 100%),
        url('/webapp/images/main-create-card-v1.webp') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    color: #fff;
    box-shadow:
        0 16px 34px rgba(44, 20, 106, 0.30),
        0 0 22px rgba(118, 51, 218, 0.11) !important;
}

#mainMenu .limit-badge {
    top: 8px;
    right: 8px;
    z-index: 4;
}

#mainMenu .main-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#mainMenu .main-quick-action-wrap {
    position: relative;
    min-width: 0;
}

#mainMenu .main-quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--product-border);
    border-radius: 16px;
    background: var(--product-surface);
    color: rgba(250, 250, 254, 0.88);
    font-size: 11px;
    font-weight: 720;
    line-height: 1.18;
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

#mainMenu .main-quick-action .main-line-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

#mainMenu .main-quick-action .main-line-icon svg {
    width: 19px;
    height: 19px;
}

#mainMenu .main-quick-action-wrap .main-menu-guests-badge,
#mainMenu .main-quick-action-wrap .main-menu-chats-badge {
    top: 8px;
    right: 8px;
    z-index: 3;
    pointer-events: none;
}

#mainMenu .main-discovery-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#mainMenu .main-discovery-card,
#mainMenu .main-referral-row,
#mainMenu .main-premium-card {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 74px;
    margin: 0;
    padding: 12px 13px;
    border: 1px solid var(--product-border);
    border-radius: 17px;
    background: var(--product-surface);
    color: var(--product-text);
    text-align: left;
    box-shadow: none;
    cursor: pointer;
}

#mainMenu .main-discovery-card {
    position: relative;
    isolation: isolate;
    min-height: 92px;
    overflow: hidden;
    background-color: #0d0f20;
    background-repeat: no-repeat;
    background-size: cover;
}

#mainMenu .main-discovery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        90deg,
        rgba(12, 14, 31, 0.86) 0%,
        rgba(12, 14, 31, 0.58) 34%,
        rgba(12, 14, 31, 0.26) 54%,
        rgba(12, 14, 31, 0.04) 100%
    );
}

#mainMenu .main-discovery-card > * {
    position: relative;
    z-index: 1;
}

#mainMenu .main-menu-world-chat {
    background-image: url("/webapp/images/world-chat-card-v1.webp");
    background-position: right bottom;
}

#mainMenu .main-menu-loneliness-map {
    background-image: url("/webapp/images/loneliness-map-card-v1.webp");
    background-position: right 36%;
}

#mainMenu .main-discovery-card .main-line-icon,
#mainMenu .main-referral-row .main-line-icon {
    width: 42px;
    height: 42px;
}

#mainMenu .main-discovery-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    margin-left: 12px;
}

#mainMenu .main-discovery-copy strong {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 790;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainMenu .main-discovery-copy > span {
    display: block;
    max-width: 100%;
    margin-top: 3px;
    overflow: hidden;
    color: var(--product-muted);
    font-size: 11px;
    font-weight: 520;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainMenu .world-chat-reply-badge {
    position: static;
    flex: 0 0 auto;
    margin-left: 8px;
}

#mainMenu .main-referral-row {
    min-height: 58px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 650;
}

#mainMenu .main-referral-row .main-line-icon {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #b8a7ff;
}

#mainMenu .main-referral-row > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 8px;
}

#mainMenu .main-referral-copy {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

#mainMenuReferralButtonText,
.profile-hub-row .profile-hub-row-lbl {
    min-width: 0;
    line-height: 1.2;
}

.friend-reward-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    min-height: 25px;
    padding: 3px 8px;
    border: 1px solid rgba(232, 201, 119, 0.3);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(232, 201, 119, 0.13), rgba(154, 112, 35, 0.08));
    color: #e8c977;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 242, 194, 0.08);
}

.friend-reward-badge svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.friend-reward-badge-profile {
    margin-left: auto;
}

#mainMenu .main-premium-card {
    position: relative;
    min-height: 88px;
    overflow: hidden;
    padding-right: 104px;
    border-color: rgba(242, 39, 134, 0.2);
    background:
        radial-gradient(circle at 96% 10%, rgba(154, 79, 255, 0.2), transparent 29%),
        linear-gradient(135deg, rgba(35, 21, 49, 0.99), rgba(16, 17, 37, 0.99));
}

#mainMenu .main-premium-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(242, 39, 134, 0.2), rgba(129, 74, 255, 0.12));
    color: #ff74b4;
}

#mainMenu .main-premium-mark svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mainMenu .main-premium-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    margin-left: 12px;
}

#mainMenu .main-premium-copy strong {
    color: #ff86ba;
    font-size: 14px;
    font-weight: 820;
    letter-spacing: 0;
}

#mainMenu .main-premium-copy span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
}

#mainMenu .main-premium-cta {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 32px;
    padding: 6px 12px;
    border: 1px solid rgba(242, 80, 161, 0.42);
    border-radius: 11px;
    background: rgba(242, 39, 134, 0.07);
    color: #ef72ae;
    font-size: 11px;
    font-weight: 720;
}

#mainMenu .main-premium-gem {
    position: absolute;
    top: 9px;
    right: 15px;
    color: #b879ff;
    filter: drop-shadow(0 0 8px rgba(184, 91, 255, 0.34));
}

#mainMenu .main-premium-gem svg {
    width: 24px;
    height: 22px;
    fill: rgba(184, 91, 255, 0.18);
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#mainMenu button {
    -webkit-tap-highlight-color: transparent;
}

#mainMenu button:active {
    transform: scale(0.985);
}

#mainMenu button:focus-visible,
.primary-bottom-nav button:focus-visible {
    outline: 2px solid rgba(255, 126, 186, 0.86);
    outline-offset: 2px;
}

/* Primary destinations stay visible on top-level product screens only. */
.primary-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 7600;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    max-width: 460px;
    min-height: var(--primary-nav-height);
    margin: 0 auto;
    padding: 8px 8px max(8px, var(--chat-safe-bottom-extra));
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(8, 9, 23, 0.965);
    box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.primary-bottom-nav.is-visible {
    display: grid;
}

.primary-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 58px;
    padding: 5px 2px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: rgba(217, 219, 232, 0.48);
    font-size: 9px;
    font-weight: 680;
    line-height: 1;
    text-align: center;
    cursor: pointer;
}

.primary-nav-item svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.primary-nav-item > span:not(.chat-badge) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.primary-nav-item.is-active {
    background: rgba(242, 39, 134, 0.1);
    color: #ff69aa;
}

.primary-nav-item.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--product-accent);
    box-shadow: 0 0 10px rgba(242, 39, 134, 0.45);
}

.primary-bottom-nav .primary-nav-badge {
    top: 4px;
    right: calc(50% - 21px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border: 2px solid #090a18;
    border-radius: 999px;
    background: var(--product-accent);
    color: #fff;
    font-size: 8px;
    line-height: 12px;
    box-shadow: none;
}

html.primary-nav-visible #browseAds.screen,
html.primary-nav-visible #myChats.screen,
html.primary-nav-visible #myAds.screen {
    padding-bottom: calc(var(--primary-nav-height) + 12px + var(--chat-safe-bottom-extra)) !important;
}

html.primary-nav-visible #swipeScreen.screen {
    padding-bottom: calc(var(--primary-nav-height) + var(--chat-safe-bottom-extra)) !important;
}

html.primary-nav-visible #swipeScreen #swipeControls {
    padding-bottom: 7px !important;
}

html.low-power-ui #mainMenu .main-brand-avatar,
html.low-power-ui #mainMenu .main-menu-browse,
html.low-power-ui .primary-bottom-nav {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (min-width: 540px) {
    .primary-bottom-nav {
        bottom: 10px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 22px;
    }

    #mainMenu.screen {
        padding-bottom: calc(var(--primary-nav-height) + 38px) !important;
    }
}

@media (max-width: 380px) {
    #mainMenu.screen {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    #mainMenu .main-dashboard-shell {
        gap: 9px;
    }

    #mainMenu .main-hero-actions {
        gap: 8px;
    }

    #mainMenu .main-menu-action {
        min-height: 100px;
        padding: 13px 11px;
    }

    #mainMenu .main-menu-action .main-line-icon {
        top: 12px;
        left: 11px;
    }

    #mainMenu .main-menu-action .main-action-copy strong {
        font-size: 13px;
    }

    #mainMenu .main-quick-action {
        min-height: 92px;
        padding: 10px;
        font-size: 10px;
    }

    #mainMenu .main-location-change {
        font-size: 10px;
    }

    .primary-nav-item {
        font-size: 8px;
    }
}

@media (max-height: 720px) {
    #mainMenu .main-product-header {
        min-height: 126px;
    }

    #mainMenu .main-brand-avatar {
        width: 66px;
        height: 66px;
    }

    #mainMenu .main-logo-wordmark {
        font-size: 22px !important;
    }

    #mainMenu .main-brand-tagline {
        font-size: 10px;
    }

    #mainMenu .main-age-badge {
        top: 54px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #mainMenu button,
    .primary-bottom-nav button {
        transition: none !important;
        animation: none !important;
    }
}

/* Compact density pass: keep the complete dashboard visible on a standard
   mobile viewport without shrinking tap targets below a comfortable size. */
:root {
    --primary-nav-height: 68px;
}

#mainMenu.screen {
    padding:
        calc(8px + var(--telegram-main-controls-top))
        14px
        calc(var(--primary-nav-height) + 18px + var(--chat-safe-bottom-extra)) !important;
}

#mainMenu .main-dashboard-shell {
    gap: 8px;
}

#mainMenu .main-product-header {
    min-height: 114px;
    padding-top: 0;
}

#mainMenu .main-product-header > .hamburger-menu {
    top: 0 !important;
    width: 42px;
    height: 42px;
    padding: 10px 9px;
    border-radius: 12px;
}

#mainMenu .main-product-header .hamburger-line {
    width: 20px;
}

#mainMenu .main-product-brand {
    gap: 2px;
}

#mainMenu .main-brand-avatar {
    width: 64px;
    height: 64px;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(242, 39, 134, 0.15);
}

#mainMenu .main-logo-wordmark {
    font-size: 22px !important;
    letter-spacing: -0.65px !important;
}

#mainMenu .main-brand-tagline {
    max-width: 205px;
    margin-top: 1px;
    font-size: 10px;
}

#mainMenu .main-age-badge {
    top: 50px !important;
    right: -22px !important;
    min-width: 24px;
    min-height: 17px;
    padding: 1px 5px;
    font-size: 8px;
}

#mainMenu .main-language-switcher {
    top: 0;
    min-height: 42px;
}

#mainMenu .main-language-toggle {
    width: 60px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
}

#mainMenu .site-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
    margin: 0;
    padding: 7px 10px;
}

#mainMenu .site-stats .stat-item {
    justify-content: center;
    min-width: 0;
    font-size: 10px;
}

#mainMenu .site-stats .stat-divider {
    display: none;
}

#mainMenu .main-city-panel {
    border-radius: 16px;
}

#mainMenu .user-location {
    min-height: 66px;
    padding: 10px 12px !important;
}

#mainMenu .main-line-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

#mainMenu .main-line-icon svg {
    width: 20px;
    height: 20px;
}

#mainMenu #userLocationDisplay {
    font-size: 14px;
}

#mainMenu .main-city-copy {
    margin-left: 9px;
}

#mainMenu .main-location-change {
    margin-left: 7px;
    font-size: 10px;
}

#mainMenu .main-chevron {
    width: 16px;
    height: 16px;
    margin-left: 3px;
}

#mainMenu .city-stats-block {
    margin-top: 3px !important;
    font-size: 10px;
}

#mainMenu #cityStatsCompactLine {
    font-size: 10px;
}

#mainMenu .main-hero-actions {
    gap: 8px;
}

#mainMenu .main-menu-action {
    min-height: 98px;
    padding: 13px 12px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2) !important;
}

#mainMenu .main-menu-action .main-line-icon {
    top: 11px;
    left: 11px;
    width: 34px;
    height: 34px;
}

#mainMenu .main-menu-action .main-action-copy strong {
    font-size: 14px;
}

#mainMenu .main-menu-action > .main-chevron {
    right: 10px;
    bottom: 12px;
}

#mainMenu .main-menu-browse {
    box-shadow:
        0 14px 30px rgba(151, 13, 91, 0.3),
        0 0 20px rgba(242, 39, 134, 0.11) !important;
}

@media (max-height: 720px) {
    #mainMenu .main-menu-action {
        min-height: 94px;
    }
}

#mainMenu .limit-badge {
    top: 6px;
    right: 6px;
}

#mainMenu .main-quick-grid {
    gap: 7px;
}

#mainMenu .main-quick-action {
    gap: 8px;
    min-height: 78px;
    padding: 9px 10px;
    border-radius: 14px;
    font-size: 10.5px;
}

#mainMenu .main-quick-action .main-line-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

#mainMenu .main-quick-action .main-line-icon svg {
    width: 17px;
    height: 17px;
}

#mainMenu .main-quick-action-wrap .main-menu-guests-badge,
#mainMenu .main-quick-action-wrap .main-menu-chats-badge {
    top: 6px;
    right: 6px;
}

#mainMenu .main-discovery-list {
    gap: 7px;
}

#mainMenu .main-discovery-card,
#mainMenu .main-referral-row,
#mainMenu .main-premium-card {
    min-height: 64px;
    padding: 10px 12px;
    border-radius: 15px;
}

#mainMenu .main-discovery-card {
    min-height: 74px;
}

#mainMenu .main-discovery-card .main-line-icon,
#mainMenu .main-referral-row .main-line-icon {
    width: 36px;
    height: 36px;
}

#mainMenu .main-discovery-copy {
    margin-left: 10px;
}

#mainMenu .main-discovery-copy strong {
    font-size: 13px;
}

#mainMenu .main-discovery-copy > span {
    margin-top: 2px;
    font-size: 10px;
}

#mainMenu .main-referral-row {
    min-height: 50px;
    font-size: 11px;
}

#mainMenu .main-referral-row .main-line-icon {
    width: 30px;
    height: 30px;
}

#mainMenu .main-premium-card {
    min-height: 76px;
    padding-right: 94px;
}

#mainMenu .main-premium-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

#mainMenu .main-premium-mark svg {
    width: 21px;
    height: 21px;
}

#mainMenu .main-premium-copy {
    margin-left: 10px;
}

#mainMenu .main-premium-copy strong {
    font-size: 13px;
}

#mainMenu .main-premium-copy span {
    margin-top: 2px;
    font-size: 10px;
}

#mainMenu .main-premium-cta {
    right: 10px;
    bottom: 10px;
    min-width: 78px;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 10px;
}

#mainMenu .main-premium-gem {
    top: 7px;
    right: 13px;
}

#mainMenu .main-premium-gem svg {
    width: 21px;
    height: 19px;
}

.primary-bottom-nav {
    padding: 6px 7px max(6px, var(--chat-safe-bottom-extra));
}

.primary-nav-item {
    gap: 4px;
    min-height: 50px;
    padding: 4px 2px;
    border-radius: 12px;
    font-size: 8.5px;
}

.primary-nav-item svg {
    width: 21px;
    height: 21px;
}

@media (min-width: 540px) {
    .primary-bottom-nav {
        border-radius: 20px;
    }

    #mainMenu.screen {
        padding-bottom: calc(var(--primary-nav-height) + 30px) !important;
    }
}

@media (max-width: 380px) {
    #mainMenu .main-dashboard-shell {
        gap: 7px;
    }

    #mainMenu .main-menu-action {
        min-height: 94px;
        padding: 11px 10px;
    }

    #mainMenu .main-menu-action .main-line-icon {
        top: 10px;
        left: 10px;
    }

    #mainMenu .main-quick-action {
        min-height: 72px;
        padding: 8px;
    }
}

@media (max-height: 720px) {
    #mainMenu .main-product-header {
        min-height: 98px;
    }

    #mainMenu .main-brand-avatar {
        width: 54px;
        height: 54px;
    }

    #mainMenu .main-logo-wordmark {
        font-size: 20px !important;
    }

    #mainMenu .main-brand-tagline {
        font-size: 9px;
    }

    #mainMenu .main-age-badge {
        top: 42px !important;
    }
}

#browseAds #adsList > .profiles-empty-state,
#browseAds .ads-list > .profiles-empty-state,
#browseAds .profiles-list > .profiles-empty-state {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    justify-self: stretch !important;
}

#browseAds #adsList > .ad-card,
#browseAds #adsList > .profile-card,
#browseAds .ads-list > .ad-card,
#browseAds .ads-list > .profile-card,
#browseAds .profiles-list > .ad-card,
#browseAds .profiles-list > .profile-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    box-sizing: border-box !important;
}

/* Прозрачный фон для внутренних элементов */
.ad-header,
.profile-header,
.ad-info,
.profile-info,
.ad-author-row,
.profile-author-row,
.ad-details-header,
.ad-date,
.profile-date,
.ad-actions,
.profile-actions,
.ad-actions-row,
.profile-actions-row {
    background-color: transparent !important;
    background-image: none !important;
}

/* ad-field: обычные — прозрачные, full-width — с полупрозрачным фоном */
.ad-field,
.profile-field {
    background-color: transparent !important;
    background-image: none !important;
}
/* Compact-режим: пилюли сохраняют свой полупрозрачный фон */
.ad-card.compact .ad-field,
.profile-card.compact .profile-field {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05) !important;
    background-image: none !important;
    color: var(--text-light) !important;
}
.ad-field.full-width,
.profile-field.full-width {
    background: rgba(0, 0, 0, 0.2) !important;
    background-image: none !important;
}

/* Защита иконок в полях от AdBlock */
.ad-field .icon,
.profile-field .icon,
.ad-card .icon,
.profile-card .icon,
.ad-details-card .icon {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 15px;
}

/* ad-text: тёмный полупрозрачный фон для текста анкеты (только non-compact) */
.ad-text,
.profile-text {
    background: rgba(0, 0, 0, 0.3) !important;
    background-image: none !important;
    color: var(--text-gray) !important;
}
.ad-card.compact .ad-text,
.profile-card.compact .profile-text {
    background: none !important;
    border: none !important;
    color: var(--text-gray) !important;
}

/* Защита цвета текста от адблокера */
.ad-field .value,
.profile-field .value {
    color: var(--text-light) !important;
}
.ad-card.compact .ad-field .value,
.profile-card.compact .profile-field .value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-light) !important;
}
.ad-field .label,
.profile-field .label {
    color: var(--text-gray) !important;
}
.ad-header h3,
.profile-header h3 {
    color: var(--neon-pink) !important;
}

.ad-details-card .location-text,
.ad-details-card .author-name,
.ad-details-card .author-params,
.ad-details-card .search-title,
.ad-details-card .param-item,
.ad-details-card .description-title,
.ad-details-card .description-text {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ================================================================
   DESKTOP ПРИВАТНЫЙ ЧАТ: 760px колонка + frosted glass по бокам
   ================================================================ */
@media (min-width: 768px) {
    /* Шапка, сообщения, поле ввода и выпадающее меню — всё 760px по центру */
    #chatView.screen.active .chat-header,
    #chatView.screen.active .chat-messages-container,
    #chatView.screen.active .chat-input-container,
    #chatView.screen.active .chat-typing-host,
    #chatView.screen.active .reply-preview,
    #chatView.screen.active .chat-menu-dropdown {
        max-width: 760px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    #chatView.screen.active .reply-preview {
        width: min(calc(100vw - (var(--chat-input-side-gap) * 2)), 760px) !important;
    }

    /* Фон #chatView закрывает тело по бокам от 760px колонки —
       fallback на случай если body::before/after не работают */
    #chatView.screen {
        background: rgba(8, 6, 20, 0.75) !important;
    }

    /* Frosted glass боковые панели на body (современные браузеры) */
    body:has(#chatView.screen.active)::before,
    body:has(#chatView.screen.active)::after {
        content: '';
        position: fixed;
        top: 0;
        bottom: 0;
        width: calc((100vw - 760px) / 2);
        backdrop-filter: blur(22px) saturate(140%) brightness(0.6);
        -webkit-backdrop-filter: blur(22px) saturate(140%) brightness(0.6);
        background: rgba(6, 4, 16, 0.52);
        z-index: 50;
        pointer-events: none;
    }

    body:has(#chatView.screen.active)::before { left: 0; }
    body:has(#chatView.screen.active)::after  { right: 0; }
}

/* ── Модалка просмотра анкеты: компактная липкая шапка ── */
#adModal .modal-content {
    padding: 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

#adModal .modal-header {
    flex-shrink: 0;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(131, 56, 236, 0.3);
    background: #2a2a40;
    border-radius: 18px 18px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

#adModal .modal-header h2 {
    font-size: 1rem;
    margin: 0;
    color: var(--neon-pink);
}

#adModal .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: calc(85vh - 50px);
    padding: 16px 20px 24px;
}

/* ── "Кто лайкнул" кнопка на карточке «Мои анкеты» ── */
.ad-actions .likes-btn,
.profile-actions .likes-btn {
    background: linear-gradient(135deg, #ff006e, #ff4488);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.ad-actions .likes-btn .likes-heart,
.profile-actions .likes-btn .likes-heart {
    filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(255,255,255,0.6));
}
.ad-actions .likes-btn:active,
.profile-actions .likes-btn:active {
    transform: scale(0.95);
}

/* ── Likers / Sender Ads Modal ── */
.likers-modal-content {
    max-width: 380px !important;
    width: 92% !important;
}
.likers-modal-content .modal-header {
    padding: 10px 14px !important;
}
.likers-modal-content .modal-header h2 {
    font-size: 1rem !important;
}
.likers-modal-body {
    padding: 8px 12px 14px !important;
    max-height: 65vh;
    overflow-y: auto;
}

.liker-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(131, 56, 236, 0.25);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.liker-card:hover {
    border-color: var(--neon-pink);
}
.liker-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.liker-gender-icon {
    font-size: 1.2rem;
}
.liker-name {
    font-weight: 700;
    color: var(--neon-cyan);
    font-size: 0.95rem;
}
.liker-age {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: auto;
}
.liker-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.liker-tag {
    background: rgba(0, 217, 255, 0.08);
    border: 1px solid rgba(0, 217, 255, 0.15);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: normal;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.liker-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
    margin-bottom: 10px;
    font-style: italic;
}
.liker-actions {
    display: flex;
    gap: 8px;
}
.liker-actions .neon-button {
    flex: 1;
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 10px !important;
    text-align: center;
}
.liker-view-btn {
    background: linear-gradient(135deg, #4a00e0, #8e2de2) !important;
}
.liker-write-btn {
    background: linear-gradient(135deg, #00d9ff, #0099cc) !important;
}
.liker-card--no-ad {
    opacity: 0.75;
}
.liker-no-ad-hint {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    margin-top: 4px;
}
/* Общий адаптивный хедер экранов: левая кнопка, заголовок и правая кнопка
   больше не перекрывают друг друга на узких Telegram/WebView экранах. */
.header:has(> h2),
.header:has(> h3) {
    display: grid;
    grid-template-columns: minmax(70px, max-content) minmax(0, 1fr) minmax(70px, max-content);
    grid-auto-rows: minmax(34px, auto);
    align-items: center;
    column-gap: 6px;
}

.header:has(> h2) > .back-btn,
.header:has(> h3) > .back-btn {
    position: static;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    min-width: 0;
    transform: none;
}

.header:has(> h2) > h2,
.header:has(> h3) > h3 {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 2px;
    line-height: 1.12;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.header:has(> h2) > h2 {
    font-size: clamp(1.02rem, 4.7vw, 1.28rem);
}

.header:has(> h2) > .faq-btn,
.header:has(> h2) > .world-chat-faq-btn,
.header:has(> h2) > .loneliness-map-help-btn,
.header:has(> h3) > .faq-btn,
.header:has(> h3) > .world-chat-faq-btn,
.header:has(> h3) > .loneliness-map-help-btn {
    position: static;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    transform: none;
}

.header:has(> h2) > .faq-btn:hover,
.header:has(> h3) > .faq-btn:hover {
    transform: scale(1.05);
}

.header:has(> h2) > .faq-btn:active,
.header:has(> h3) > .faq-btn:active {
    transform: scale(0.96);
}

.header:has(> h2) > .world-chat-faq-btn:hover,
.header:has(> h2) > .loneliness-map-help-btn:hover,
.header:has(> h3) > .world-chat-faq-btn:hover,
.header:has(> h3) > .loneliness-map-help-btn:hover {
    transform: scale(1.05);
}

.header:has(> h2) > :not(.back-btn):not(.faq-btn):not(.world-chat-faq-btn):not(.loneliness-map-help-btn):not(h2):not(h3),
.header:has(> h3) > :not(.back-btn):not(.faq-btn):not(.world-chat-faq-btn):not(.loneliness-map-help-btn):not(h2):not(h3) {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

/* Create profile has an old inline absolute top for the Back button.
   In native Android it pushes Back into the form content, so force the
   header to use the shared one-row layout. */
#createAd > .header {
    display: grid !important;
    grid-template-columns: minmax(72px, max-content) minmax(0, 1fr) minmax(82px, max-content) !important;
    grid-auto-rows: minmax(34px, auto) !important;
    align-items: center !important;
    column-gap: 6px !important;
    min-height: calc(52px + var(--safe-area-top)) !important;
    padding-top: calc(8px + var(--safe-area-top)) !important;
    padding-bottom: 6px !important;
    margin-bottom: 4px !important;
}

#createAd > .header > #createAdMenuBtn {
    display: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    width: 42px !important;
    height: 42px !important;
    padding: 8px !important;
    gap: 5px !important;
    margin: 0 !important;
    z-index: auto !important;
}

#createAd.create-ad-menu-mode > .header > #createAdMenuBtn {
    display: flex !important;
}

#createAd.create-ad-menu-mode #createAdBackBtn {
    display: none !important;
}

#createAd #createAdBackBtn {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    margin: 0 !important;
}

#browseAds > .header {
    display: grid !important;
    grid-template-columns: minmax(86px, max-content) minmax(0, 1fr) minmax(104px, max-content) !important;
    grid-auto-rows: 38px !important;
    align-items: center !important;
    column-gap: 8px !important;
    position: sticky !important;
    top: 0;
    z-index: 1200;
    width: 100%;
    min-height: calc(50px + var(--safe-area-top)) !important;
    height: calc(50px + var(--safe-area-top)) !important;
    padding: calc(6px + var(--safe-area-top)) 10px 6px !important;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 26px;
    background: transparent;
    box-shadow: none;
    isolation: isolate;
    transition:
        transform 0.22s ease,
        margin-bottom 0.22s ease;
}

#browseAds > .header::before {
    content: "";
    position: absolute;
    inset: calc(5px + var(--safe-area-top)) 4px 5px;
    z-index: 0;
    border: 1px solid rgba(0, 217, 255, 0.16);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(15, 18, 36, 0.72), rgba(44, 18, 54, 0.62));
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        opacity 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

#browseAds > .header > .back-btn,
#browseAds > .header > h2,
#browseAds > .header > .faq-btn {
    position: relative;
    z-index: 1;
}

#browseAds > .header > .back-btn {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: center !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    min-width: 0;
    height: 34px;
    padding: 5px 11px;
    font-size: 13px;
    line-height: 1;
}

#browseAds > .header > h2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 2px !important;
    min-width: 0;
    max-width: 100%;
    font-size: clamp(1.14rem, 5vw, 1.45rem) !important;
    line-height: 1 !important;
    text-align: center;
    white-space: nowrap;
}

#browseAds > .header > .faq-btn {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    max-width: 132px;
    min-height: 32px;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

#browseAds > .header > .back-btn:hover,
#browseAds > .header > .faq-btn:hover {
    transform: scale(1.04) !important;
}

#browseAds > .header > .back-btn:active,
#browseAds > .header > .faq-btn:active {
    transform: scale(0.96) !important;
}

#browseAds.browse-header-scrolled > .header {
    margin-bottom: 8px;
}

#browseAds.browse-header-scrolled > .header::before {
    opacity: 1;
}

@media (max-width: 380px) {
    .header:has(> h2),
    .header:has(> h3) {
        grid-template-columns: minmax(58px, max-content) minmax(0, 1fr) minmax(58px, max-content);
        column-gap: 4px;
    }

    .header:has(> h2) > .back-btn,
    .header:has(> h3) > .back-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .header:has(> h2) > .faq-btn,
    .header:has(> h3) > .faq-btn {
        max-width: 82px;
        padding: 5px 8px;
        font-size: 10px;
        line-height: 1.05;
        white-space: normal;
        text-align: center;
    }

    .header:has(> h2) > h2 {
        font-size: clamp(0.98rem, 4.5vw, 1.12rem);
    }

    #browseAds > .header {
        grid-template-columns: minmax(72px, max-content) minmax(0, 1fr) minmax(86px, max-content) !important;
        column-gap: 5px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    #browseAds > .header > .back-btn {
        height: 32px;
        padding: 4px 8px;
        font-size: 12px;
    }

    #browseAds > .header > h2 {
        font-size: clamp(1.04rem, 5vw, 1.18rem) !important;
    }

    #browseAds > .header > .faq-btn {
        max-width: 92px;
        height: 31px;
        padding: 4px 7px;
        font-size: 10px;
        white-space: nowrap;
    }
}

/* ===== Push / VK notification prompts ===== */
@keyframes pushPromptSlideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.push-prompt-banner,
#vkNotificationsPrompt,
#webPushPrompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--bg-card), #16213e);
    border-radius: 16px;
    padding: 16px 20px;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: calc(100% - 40px);
    animation: pushPromptSlideUp 0.3s ease;
}

.push-prompt-banner--vk,
#vkNotificationsPrompt {
    border: 1px solid rgba(0, 119, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 119, 255, 0.12);
}

.push-prompt-banner--web,
#webPushPrompt {
    border: 1px solid rgba(139, 92, 246, 0.35);
}

.push-prompt-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.push-prompt-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.push-prompt-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.push-prompt-text {
    flex: 1;
    min-width: 0;
}

.push-prompt-text strong {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.push-prompt-text span {
    display: block;
    color: var(--text-gray);
    font-size: 12px;
    line-height: 1.4;
}

.push-prompt-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.push-prompt-btn {
    flex: 1;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: inherit;
}

.push-prompt-btn-yes {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #fff;
    box-shadow: var(--shadow-cyan);
}

.push-prompt-btn-yes:hover,
.push-prompt-btn-yes:active {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.45);
}

.push-prompt-btn-no {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.push-prompt-btn-no:hover,
.push-prompt-btn-no:active {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-light);
}

html.ok-mini-app #telegramQrLink,
html.ok-mini-app #menuInstagramItem,
html.ok-mini-app #menuMediaKitItem,
html.ok-mini-app #supportTelegramItem,
html.ok-mini-app #vkNotificationsToggleContainer,
html.ok-mini-app #webQrCodesContainer a[href*="instagram.com"],
html.ok-mini-app #webQrCodesContainer a[href*="t.me"],
html.ok-mini-app #webQrCodesContainer a[href*="telegram.me"],
html.ok-mini-app #webQrCodesContainer a[href*="telegram.org"],
html.ok-mini-app #webQrCodesContainer .local-qr-code[data-qr-url*="instagram.com"],
html.ok-mini-app #webQrCodesContainer .local-qr-code[data-qr-url*="t.me"],
html.ok-mini-app #webQrCodesContainer .local-qr-code[data-qr-url*="telegram.me"],
html.ok-mini-app #webQrCodesContainer .local-qr-code[data-qr-url*="telegram.org"] {
    display: none !important;
}

/* ========================================================================
   PRODUCT-WIDE SURFACE SYSTEM 2026
   Extends the calm, matte dashboard language to every top-level WebApp
   screen while preserving feature-specific layouts and interaction logic.
   ======================================================================== */

.screen:not(#mainMenu) {
    background:
        radial-gradient(circle at 88% 5%, rgba(104, 63, 207, 0.11), transparent 31%),
        radial-gradient(circle at 7% 42%, rgba(242, 39, 134, 0.065), transparent 28%),
        linear-gradient(180deg, rgba(5, 6, 16, 0.97), rgba(6, 7, 18, 0.995)) !important;
    color: var(--product-text);
}

.screen:not(#mainMenu) > .header:has(> h2),
#chatView > .chat-header,
#swipeScreen > .screen-header {
    flex: 0 0 auto;
    width: 100%;
    min-height: calc(52px + var(--safe-area-top)) !important;
    height: auto !important;
    margin: 0 !important;
    padding: calc(8px + var(--safe-area-top)) 12px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--product-border) !important;
    border-radius: 0 !important;
    background: rgba(8, 9, 23, 0.93) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#browseAds > .header::before {
    display: none !important;
}

.screen:not(#mainMenu) > .header h2,
.screen:not(#mainMenu) > .header h3,
#swipeScreen > .screen-header h3 {
    color: var(--product-text) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.2px !important;
    text-transform: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: currentColor !important;
}

.screen:not(#mainMenu) .back-btn,
#swipeScreen > .screen-header > button:first-child {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(235, 236, 245, 0.72) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.screen:not(#mainMenu) .back-btn:hover,
#swipeScreen > .screen-header > button:first-child:hover {
    border-color: rgba(242, 80, 161, 0.32) !important;
    background: var(--product-accent-soft) !important;
    color: #ff79b6 !important;
    transform: none !important;
}

.screen:not(#mainMenu) .faq-btn,
.screen:not(#mainMenu) .world-chat-faq-btn,
.screen:not(#mainMenu) .loneliness-map-help-btn,
#swipeScreen > .screen-header > button:last-child {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    min-height: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border: 1px solid rgba(242, 80, 161, 0.26) !important;
    border-radius: 10px !important;
    background: var(--product-accent-soft) !important;
    color: #ff79b6 !important;
    font-size: 10px !important;
    font-weight: 760 !important;
    line-height: 1 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.info-screen .info-content,
#locationChoice .location-choice-container,
#autoLocationDetection .auto-location-container,
#locationSetup .location-setup-container,
#createAd .form-container,
#pollsScreen .polls-container {
    width: 100%;
    max-width: 430px;
    margin-right: auto !important;
    margin-left: auto !important;
    padding: 12px 14px calc(var(--primary-nav-height) + 18px) !important;
    box-sizing: border-box;
}

#browseAds > .current-location-compact,
#browseAds > #browseScopeHint,
#browseAds > #onlineCounter,
#browseAds > .filters-container,
#browseAds > #adsList,
#myAds > #myAdsList,
#myGuests > #guestsList,
#myChats > .tabs-container,
#myChats > .chats-container,
#myPhotosScreen > .my-photos-info-card,
#myPhotosScreen > .my-photos-reorder-hint,
#myPhotosScreen > .my-photos-add-btn,
#myPhotosScreen > .my-photos-gallery {
    width: calc(100% - 28px) !important;
    max-width: 430px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box !important;
}

#browseAds > .current-location-compact {
    margin-top: 10px !important;
}

#browseAds > .filters-container,
#myAds > #myAdsList,
#myGuests > #guestsList,
#myChats > .chats-container {
    margin-top: 10px !important;
}

.form-step,
.nickname-current,
.nickname-edit-form,
.polls-intro,
.poll-card,
.contact-item,
.filters-container,
.filters-panel,
.current-location,
.current-location-compact,
.ad-geo-visible-toggle,
.location-choice-btn,
.my-photos-info-card,
.my-photos-gallery,
.chat-card,
.modal-content,
.chat-help-content,
.chat-menu-dropdown {
    border: 1px solid var(--product-border) !important;
    border-radius: 16px !important;
    background: var(--product-surface) !important;
    color: var(--product-text) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18) !important;
    text-shadow: none !important;
}

.ad-card:not(.premium-ad):not(.top-1):not(.top-2):not(.top-3),
.profile-card:not(.premium-profile):not(.top-1):not(.top-2):not(.top-3) {
    border: 1px solid var(--product-border) !important;
    border-radius: 16px !important;
    background: linear-gradient(145deg, rgba(20, 22, 45, 0.98), rgba(13, 15, 31, 0.98)) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
}

.ad-card,
.profile-card,
.chat-card {
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        opacity 0.18s ease !important;
}

.ad-card:hover,
.profile-card:hover,
.chat-card:hover {
    border-color: rgba(242, 80, 161, 0.28) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
    transform: none !important;
}

/*
 * Premium profile frame contract.
 *
 * The anti-AdBlock compatibility layer renames ad-card/premium-ad to
 * profile-card/premium-profile after the card is rendered. Keep the promised
 * gold frame on both class variants and place this rule after the redesign's
 * generic hover rule so it cannot be replaced by the regular pink border.
 */
.ad-card.premium-ad,
.profile-card.premium-profile {
    border: 2px solid #d7aa3d !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 248, 205, 0.18),
        inset 0 -1px 0 rgba(112, 65, 5, 0.28),
        0 12px 28px rgba(0, 0, 0, 0.26) !important;
}

.ad-card.premium-ad:hover,
.profile-card.premium-profile:hover {
    border-color: #f3cf63 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 251, 222, 0.24),
        inset 0 -1px 0 rgba(112, 65, 5, 0.30),
        0 14px 30px rgba(0, 0, 0, 0.28) !important;
}

.ad-card::before,
.profile-card::before,
.chat-card::before {
    display: none !important;
}

.ads-list,
.profiles-list,
.chats-list {
    gap: 9px !important;
}

.form-step {
    padding: 14px !important;
}

.form-step h3,
.nickname-current h3,
.nickname-edit-form h3,
.filter-group > label,
.poll-card h3,
.contact-item h3 {
    color: rgba(248, 248, 252, 0.9) !important;
    text-align: left !important;
    text-shadow: none !important;
}

.filters-container {
    padding: 8px !important;
}

.filters-panel {
    margin-top: 8px !important;
    padding: 12px !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    box-shadow: none !important;
}

.current-location-compact {
    min-height: 46px;
    padding: 7px 9px !important;
}

.neon-button,
.nav-btn,
.filter-toggle-btn,
.browse-lucky-btn,
.change-location-btn,
.gender-btn,
.target-btn,
.goal-btn,
.body-btn,
.filter-btn,
.poll-option-full,
.setup-country-dropdown-toggle,
.reset-setup-location,
.time-preset-btn {
    min-height: 40px;
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: rgba(248, 248, 252, 0.86) !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 720 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    animation: none !important;
    transform: none !important;
}

.neon-button::before {
    display: none !important;
}

.neon-button.primary,
.nav-btn.primary,
.nav-btn.success,
.browse-lucky-btn {
    border-color: rgba(255, 107, 174, 0.28) !important;
    background: linear-gradient(145deg, #ef2381 0%, #c51676 62%, #94145f 100%) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(151, 13, 91, 0.24) !important;
}

.neon-button.secondary {
    border-color: rgba(143, 116, 255, 0.25) !important;
    background: rgba(124, 91, 255, 0.08) !important;
    color: #c2b6ff !important;
}

.neon-button:hover,
.nav-btn:hover,
.filter-toggle-btn:hover,
.change-location-btn:hover,
.gender-btn:hover,
.target-btn:hover,
.goal-btn:hover,
.body-btn:hover,
.filter-btn:hover,
.poll-option-full:hover,
.setup-country-dropdown-toggle:hover,
.time-preset-btn:hover {
    border-color: rgba(242, 80, 161, 0.32) !important;
    background-color: var(--product-accent-soft) !important;
    transform: none !important;
}

.gender-btn.selected,
.target-btn.selected,
.goal-btn.selected,
.body-btn.selected,
.filter-btn.active,
.poll-option-full.selected,
.time-preset-btn.active {
    border-color: rgba(242, 80, 161, 0.48) !important;
    background: var(--product-accent-soft) !important;
    color: #ff83bc !important;
    box-shadow: inset 0 0 0 1px rgba(242, 80, 161, 0.08) !important;
}

.neon-input,
.setup-city-input,
.age-filter input,
.radius-filter-select,
.chat-input,
.world-chat-input,
.custom-time-input input,
textarea,
select {
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 12px !important;
    background: rgba(8, 9, 23, 0.88) !important;
    color: var(--product-text) !important;
    -webkit-text-fill-color: var(--product-text) !important;
    caret-color: var(--product-accent) !important;
    font-family: inherit !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.neon-input:focus,
.setup-city-input:focus,
.age-filter input:focus,
.radius-filter-select:focus,
.chat-input:focus,
.world-chat-input:focus,
.custom-time-input input:focus,
textarea:focus,
select:focus {
    border-color: rgba(242, 80, 161, 0.55) !important;
    outline: 2px solid rgba(242, 39, 134, 0.1) !important;
    outline-offset: 1px;
    box-shadow: none !important;
}

.tabs-container {
    gap: 4px !important;
    margin-top: 10px !important;
    padding: 4px !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 14px !important;
    background: rgba(15, 17, 36, 0.88) !important;
    box-shadow: none !important;
}

.tab-btn,
.world-chat-tab {
    min-height: 38px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: rgba(217, 219, 232, 0.54) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.tab-btn.active,
.world-chat-tab.active {
    background: var(--product-accent-soft) !important;
    color: #ff79b6 !important;
}

#chatView > .chat-header {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) 34px 34px !important;
    align-items: center !important;
    gap: 5px !important;
}

#chatView > .chat-header > .back-btn {
    position: static !important;
    grid-column: 1;
    justify-self: start;
    max-width: 72px;
}

#chatView > .chat-header > .chat-info {
    grid-column: 2;
    min-width: 0;
    margin: 0 !important;
    text-align: center !important;
}

#chatView > .chat-header > .chat-font-size-btn {
    grid-column: 3;
}

#chatView > .chat-header > .chat-menu-btn {
    grid-column: 4;
}

#chatView .chat-info h2 {
    margin: 0 !important;
    color: var(--product-text) !important;
    font-size: 14px !important;
    overflow: hidden;
    line-height: 1.15 !important;
    text-align: center !important;
    text-overflow: ellipsis;
    text-shadow: none !important;
}

#chatView .chat-subtitle {
    overflow: hidden;
    margin: 3px 0 0 !important;
    color: rgba(226, 217, 236, 0.72) !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#chatView .chat-font-size-btn,
#chatView .chat-menu-btn,
.world-chat-font-size-btn,
.world-chat-send-btn,
.attach-photo-button,
.send-button {
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: rgba(248, 248, 252, 0.78) !important;
    box-shadow: none !important;
}

.chat-input-container,
.world-chat-footer {
    border-top: 1px solid var(--product-border) !important;
    background: rgba(8, 9, 23, 0.96) !important;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.22) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.world-chat-input-wrapper {
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    box-shadow: none !important;
}

.message,
.world-chat-message {
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.world-chat-message {
    background: rgba(15, 17, 36, 0.9) !important;
}

#swipeScreen > .screen-header {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) 40px !important;
    gap: 8px !important;
}

#swipeContainer {
    padding: 12px !important;
}

#swipeControls {
    gap: 12px !important;
    padding: 8px 14px 10px !important;
    border-top: 1px solid var(--product-border);
    background: rgba(8, 9, 23, 0.94);
}

#swipeControls > button {
    width: 52px !important;
    height: 52px !important;
    border-width: 1px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

#lonelinessMapScreen > .loneliness-map-header {
    position: relative;
    z-index: 1200;
}

#lonelinessMapScreen .map-action-bar {
    border-top: 1px solid var(--product-border) !important;
    background: rgba(8, 9, 23, 0.96) !important;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.22) !important;
}

#lonelinessMapScreen .action-slot,
#lonelinessMapScreen .action-bar-info,
#lonelinessMapScreen .session-timer {
    border: 1px solid var(--product-border) !important;
    border-radius: 13px !important;
    background: rgba(20, 22, 45, 0.92) !important;
    box-shadow: none !important;
}

#locationChoice > .header,
#autoLocationDetection > .header,
#locationSetup > .header {
    padding: calc(18px + var(--safe-area-top)) 14px 10px !important;
}

#locationChoice .logo,
#autoLocationDetection .logo,
#locationSetup .logo {
    max-width: 330px;
    margin: 0 auto;
}

#locationChoice .logo h1,
#autoLocationDetection .logo h1,
#locationSetup .logo h1 {
    color: var(--product-text) !important;
    font-size: 20px !important;
    font-weight: 850 !important;
    text-shadow: none !important;
    -webkit-text-fill-color: currentColor !important;
}

#locationChoice .logo p,
#autoLocationDetection .logo p,
#locationSetup .logo p {
    color: var(--product-muted) !important;
    font-size: 11px !important;
    text-shadow: none !important;
}

.location-choice-btn {
    min-height: 112px !important;
    padding: 16px !important;
}

.location-choice-btn h3 {
    color: var(--product-text) !important;
    text-shadow: none !important;
}

.location-choice-btn p {
    color: var(--product-muted) !important;
    text-shadow: none !important;
}

.modal-content {
    max-width: 430px !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 92% 6%, rgba(139, 92, 246, 0.13), transparent 30%),
        rgba(15, 17, 36, 0.985) !important;
}

.modal-header {
    border-bottom: 1px solid var(--product-border) !important;
    background: transparent !important;
}

.modal-header h2 {
    color: var(--product-text) !important;
    text-shadow: none !important;
}

.modal-close {
    border: 1px solid var(--product-border) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    box-shadow: none !important;
}

.my-photos-info-card {
    margin-top: 12px !important;
    padding: 11px 12px !important;
    border-left: 1px solid var(--product-border) !important;
}

.my-photos-reorder-hint {
    padding: 7px 10px !important;
    color: var(--product-muted) !important;
    text-shadow: none !important;
}

.my-photos-add-btn {
    margin-top: 8px !important;
    margin-bottom: 10px !important;
}

.my-photos-gallery {
    min-height: 240px !important;
    margin-bottom: calc(var(--primary-nav-height) + 16px) !important;
}

.my-photo-preview {
    cursor: zoom-in;
    outline: none;
}

.my-photo-preview:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(0, 217, 255, 0.9);
}

.my-photo-preview-icon {
    position: absolute;
    right: 6px;
    bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #fff;
    background: rgba(5, 7, 20, 0.72);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.34);
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

html.low-power-ui .screen:not(#mainMenu) > .header,
html.low-power-ui .chat-input-container,
html.low-power-ui .world-chat-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (max-width: 380px) {
    .info-screen .info-content,
    #locationChoice .location-choice-container,
    #autoLocationDetection .auto-location-container,
    #locationSetup .location-setup-container,
    #createAd .form-container,
    #pollsScreen .polls-container {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    #browseAds > .current-location-compact,
    #browseAds > #browseScopeHint,
    #browseAds > #onlineCounter,
    #browseAds > .filters-container,
    #browseAds > #adsList,
    #myAds > #myAdsList,
    #myGuests > #guestsList,
    #myChats > .tabs-container,
    #myChats > .chats-container,
    #myPhotosScreen > .my-photos-info-card,
    #myPhotosScreen > .my-photos-reorder-hint,
    #myPhotosScreen > .my-photos-add-btn,
    #myPhotosScreen > .my-photos-gallery {
        width: calc(100% - 20px) !important;
    }
}

/* City summary: one dense two-line row with profile composition only. */
#mainMenu .main-city-panel {
    border-radius: 14px;
}

#mainMenu .user-location {
    min-height: 54px;
    padding: 6px 10px !important;
}

#mainMenu .user-location > .main-line-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

#mainMenu .user-location > .main-line-icon svg {
    width: 18px;
    height: 18px;
}

#mainMenu .main-city-copy {
    margin-left: 8px;
}

#mainMenu #userLocationDisplay {
    margin: 0 !important;
    font-size: 13px;
    line-height: 1.05;
}

#mainMenu .city-stats-block {
    margin-top: 2px !important;
    font-size: 9px;
    line-height: 1.1;
}

#mainMenu #cityStatsCompactLine {
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: -0.18px;
}

#mainMenu .main-location-change {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

#mainMenu .user-location > .main-chevron {
    width: 14px;
    height: 14px;
    margin-left: 5px;
}

/* ============================================================
   PRODUCT UI REFINEMENT — MATTE, COMPACT, CONSISTENT
   Final overrides for the user-facing WebApp surfaces.
   ============================================================ */

/* The small publication limit belongs to the create card, not above it. */
#mainMenu #adLimitBadge.limit-badge {
    top: 8px !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: 32px !important;
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 7px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    background: rgba(7, 8, 20, 0.78) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 18px !important;
    text-align: center !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    z-index: 4 !important;
}

/* The redesigned dashboard no longer relies on decorative performance-heavy sweeps. */
#mainMenu .location-info,
#mainMenu .main-menu-action,
#mainMenu .location-info::before,
#mainMenu .location-info::after,
#mainMenu .main-menu-action::before,
#mainMenu .main-menu-action::after,
#mainMenu .neon-button.browse-ads-cta.main-menu-action::after {
    animation: none !important;
}

#mainMenu .location-info::before,
#mainMenu .location-info::after,
#mainMenu .main-menu-action::before,
#mainMenu .main-menu-action::after {
    display: none !important;
}

/* Drawer */
.hamburger-overlay {
    background: rgba(2, 3, 12, 0.74) !important;
    backdrop-filter: blur(12px) saturate(0.9) !important;
    -webkit-backdrop-filter: blur(12px) saturate(0.9) !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

.hamburger-menu-content {
    width: min(84vw, 316px) !important;
    height: 100dvh !important;
    border-right: 1px solid rgba(255, 255, 255, 0.09) !important;
    background:
        radial-gradient(circle at 18% 0%, rgba(197, 22, 118, 0.12), transparent 34%),
        linear-gradient(180deg, #111329 0%, #090a18 100%) !important;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.38) !important;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.hamburger-header {
    min-height: 64px !important;
    padding: calc(10px + var(--safe-area-top)) 12px 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.018) !important;
}

.hamburger-header h2 {
    margin: 0 !important;
    color: rgba(249, 249, 253, 0.94) !important;
    font-size: 18px !important;
    font-weight: 820 !important;
    letter-spacing: -0.02em !important;
    text-shadow: none !important;
}

.hamburger-close {
    width: 34px !important;
    height: 34px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: 20px !important;
    box-shadow: none !important;
}

.hamburger-close:hover,
.hamburger-close:focus-visible {
    border-color: rgba(242, 80, 161, 0.32) !important;
    background: rgba(242, 39, 134, 0.1) !important;
    color: #ff83bc !important;
    transform: none !important;
}

.hamburger-nav {
    max-height: calc(100dvh - 64px - var(--safe-area-top)) !important;
    padding: 8px 7px calc(14px + var(--safe-area-bottom)) !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.hamburger-item,
.hamburger-item[style] {
    min-height: 44px !important;
    margin: 0 0 2px !important;
    padding: 7px 9px !important;
    gap: 9px !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: rgba(232, 233, 242, 0.72) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.hamburger-item::before {
    display: none !important;
}

.hamburger-item:hover,
.hamburger-item:focus-visible {
    border-color: rgba(255, 255, 255, 0.07) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: none !important;
}

.hamburger-item:focus-visible,
.hamburger-subitem:focus-visible {
    outline: 2px solid rgba(242, 80, 161, 0.34) !important;
    outline-offset: 1px !important;
}

.hamburger-item.active {
    border-color: rgba(242, 80, 161, 0.16) !important;
    background: linear-gradient(90deg, rgba(242, 39, 134, 0.13), rgba(124, 91, 255, 0.055)) !important;
    color: #ff82ba !important;
    text-shadow: none !important;
}

.hamburger-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: currentColor !important;
    font-size: 15px !important;
}

.hamburger-icon svg {
    width: 17px !important;
    height: 17px !important;
}

.hamburger-arrow {
    margin-left: auto !important;
    color: rgba(255, 255, 255, 0.34) !important;
}

.hamburger-submenu {
    margin: 3px 0 7px 20px !important;
    padding: 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.065) !important;
    border-left: 1px solid rgba(242, 80, 161, 0.18) !important;
    border-radius: 12px !important;
    background: rgba(5, 6, 16, 0.42) !important;
}

.hamburger-subitem,
.hamburger-subitem[style] {
    min-height: 40px !important;
    padding: 6px 8px !important;
    gap: 8px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: rgba(220, 222, 234, 0.62) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    box-shadow: none !important;
}

.hamburger-subitem:hover,
.hamburger-subitem:focus-visible {
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.86) !important;
}

.hamburger-subitem .hamburger-icon {
    flex-basis: 26px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

.hamburger-subitem.danger {
    color: #ff818f !important;
}

.hamburger-subitem-note,
.hamburger-subitem-status {
    color: rgba(205, 208, 224, 0.48) !important;
    font-size: 9px !important;
}

.hamburger-subitem-action {
    min-height: 34px !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.72) !important;
    box-shadow: none !important;
}

.hamburger-switch {
    margin-left: auto !important;
    transform: scale(0.84);
    transform-origin: right center;
}

.hamburger-switch input:checked + .hamburger-slider {
    border-color: rgba(242, 80, 161, 0.36) !important;
    background: linear-gradient(135deg, #e32683, #aa1a6c) !important;
}

/* One reusable loading / empty / error language for every product surface. */
.product-state {
    width: min(100%, 330px);
    min-height: 190px;
    margin: 14px auto;
    padding: 26px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--product-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(242, 39, 134, 0.08), transparent 44%),
        rgba(17, 19, 40, 0.88);
    color: var(--product-text);
    text-align: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.product-state-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 126, 152, 0.22);
    border-radius: 12px;
    background: rgba(255, 83, 112, 0.08);
    color: #ff8898;
    font-size: 18px;
    font-weight: 850;
}

.product-state h3 {
    margin: 0 0 6px !important;
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-shadow: none !important;
}

.product-state p {
    max-width: 270px;
    margin: 0 !important;
    color: var(--product-muted) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    text-shadow: none !important;
}

.product-state-action {
    min-height: 38px;
    margin-top: 16px;
    padding: 0 16px;
    border: 1px solid rgba(255, 107, 174, 0.28);
    border-radius: 11px;
    background: linear-gradient(145deg, #ef2381, #b81672);
    color: #fff;
    font: 750 11px/1 inherit;
    box-shadow: 0 9px 22px rgba(151, 13, 91, 0.2);
}

.loading-placeholder {
    min-height: 210px !important;
    color: var(--product-muted) !important;
}

.loading-placeholder .neon-icon,
.empty-state .neon-icon,
.guests-empty-icon {
    text-shadow: none !important;
    filter: saturate(0.8);
}

#myAds .empty-state,
#myChats .empty-state,
#blockedUsers .empty-state,
#browseAds .profiles-empty-state,
#myGuests .guests-empty-state {
    width: min(100%, 360px) !important;
    min-height: 190px !important;
    margin: 14px auto !important;
    padding: 24px 18px !important;
    box-sizing: border-box !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 18px !important;
    background: rgba(17, 19, 40, 0.86) !important;
    color: var(--product-text) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18) !important;
    text-shadow: none !important;
}

#myAds .empty-state h3,
#myChats .empty-state h3,
#blockedUsers .empty-state h3,
#browseAds .profiles-empty-state h3,
#myGuests .guests-empty-state h3 {
    color: rgba(250, 250, 253, 0.92) !important;
    font-size: 15px !important;
    text-shadow: none !important;
}

#myAds .empty-state p,
#myChats .empty-state p,
#blockedUsers .empty-state p,
#browseAds .profiles-empty-state p,
#myGuests .guests-empty-state p {
    color: var(--product-muted) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    text-shadow: none !important;
}

/* Guests */
.guests-filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 9px;
    padding: 7px;
    border: 1px solid var(--product-border);
    border-radius: 13px;
    background: rgba(15, 17, 36, 0.86);
}

.guests-filter-chip {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(230, 232, 242, 0.62);
    font: 700 10px/1 inherit;
}

.guests-filter-chip.is-active {
    border-color: rgba(242, 80, 161, 0.3);
    background: var(--product-accent-soft);
    color: #ff83bc;
}

.guests-filter-break {
    flex-basis: 100%;
    height: 0;
}

.guests-product-state {
    margin-top: 8px;
}

/* Browse cards: ranked placement remains visible without arcade neon. */
#browseAds .ad-card,
#browseAds .profile-card,
#myAds .ad-card,
#myAds .profile-card {
    border-width: 1px !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    border-radius: 17px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(124, 91, 255, 0.08), transparent 34%),
        linear-gradient(145deg, #15172f, #0f1124) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2) !important;
    animation: none !important;
    transform: none !important;
}

#browseAds .profile-card.top-1,
#browseAds .profile-card.top-2,
#browseAds .profile-card.top-3,
#browseAds .ad-card.top-1,
#browseAds .ad-card.top-2,
#browseAds .ad-card.top-3 {
    margin-top: 14px !important;
    border-color: rgba(242, 80, 161, 0.2) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22) !important;
}

#browseAds .profile-card.top-1::after,
#browseAds .profile-card.top-2::after,
#browseAds .profile-card.top-3::after,
#browseAds .ad-card.top-1::after,
#browseAds .ad-card.top-2::after,
#browseAds .ad-card.top-3::after {
    display: none !important;
    animation: none !important;
}

/* The scoped redesign card rules above must never erase the Premium benefit. */
#browseAds .ad-card.premium-ad,
#browseAds .profile-card.premium-profile,
#myAds .ad-card.premium-ad,
#myAds .profile-card.premium-profile {
    border: 2px solid transparent !important;
    background:
        linear-gradient(145deg, #17192f 0%, #111326 56%, #0d0f20 100%) padding-box,
        linear-gradient(118deg, #8c5b12 0%, #f0c95c 12%, #fff1a6 24%, #bd7c16 43%, #f8d96d 62%, #9b620d 78%, #e6bd4e 91%, #76500f 100%) border-box !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 249, 211, 0.17),
        inset 0 -1px 0 rgba(104, 60, 4, 0.30),
        inset 1px 0 0 rgba(238, 190, 70, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.27) !important;
}

#browseAds .ad-card.premium-ad:hover,
#browseAds .profile-card.premium-profile:hover,
#myAds .ad-card.premium-ad:hover,
#myAds .profile-card.premium-profile:hover {
    border-color: transparent !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 252, 225, 0.24),
        inset 0 -1px 0 rgba(104, 60, 4, 0.32),
        inset 1px 0 0 rgba(246, 205, 91, 0.09),
        0 14px 30px rgba(0, 0, 0, 0.30) !important;
}

#browseAds .top-badge,
#myAds .top-badge {
    top: -9px !important;
    left: 12px !important;
    right: auto !important;
    padding: 3px 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-radius: 999px !important;
    background: #272945 !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 8px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22) !important;
    text-shadow: none !important;
    animation: none !important;
}

#browseAds .top-badge,
#myAds .top-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

#browseAds .top-rank-number,
#myAds .top-rank-number {
    display: inline-grid;
    width: 14px;
    height: 14px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(5, 6, 18, 0.3);
    color: #fff;
    font-size: 8px;
    line-height: 1;
}

#browseAds .top-1 .top-badge {
    background: linear-gradient(135deg, #c71d71, #8f175c) !important;
}

#browseAds .top-2 .top-badge {
    background: linear-gradient(135deg, #7e5b28, #503a21) !important;
}

#browseAds .top-3 .top-badge {
    background: linear-gradient(135deg, #315c4d, #24443a) !important;
}

.product-modal-title,
.product-modal-upsell-title,
.product-modal-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-modal-title .product-icon-svg,
.product-modal-upsell-title .product-icon-svg,
.product-modal-loading .product-icon-svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.product-modal-upsell-title {
    justify-content: center;
    margin: 0 0 10px;
    color: var(--text-color);
    font-size: 1.05rem;
}

.product-modal-loading {
    justify-content: center;
    padding: 20px;
    color: var(--text-secondary);
}

.product-modal-empty {
    padding: 20px 16px;
    text-align: center;
}

.product-modal-empty-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    place-items: center;
    border: 1px solid rgba(169, 123, 255, 0.18);
    border-radius: 14px;
    background: rgba(117, 75, 190, 0.08);
    color: #d49bff;
}

.product-modal-empty-icon .product-icon-svg {
    width: 22px;
    height: 22px;
}

.liker-card .product-icon-svg,
.liker-tag .product-icon-svg,
.liker-age .product-icon-svg {
    width: 15px;
    height: 15px;
    vertical-align: -2px;
}

#browseAds .profile-header,
#myAds .profile-header {
    border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

#browseAds .profile-header h3,
#myAds .profile-header h3 {
    color: rgba(250, 250, 253, 0.92) !important;
    text-shadow: none !important;
}

#browseAds .profile-field,
#browseAds .profile-text,
#myAds .profile-field,
#myAds .profile-text {
    border-color: rgba(255, 255, 255, 0.07) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: rgba(230, 232, 242, 0.72) !important;
    text-shadow: none !important;
}

#browseAds .profile-distance-badge,
#myAds .profile-distance-badge {
    border-color: rgba(242, 80, 161, 0.18) !important;
    background: rgba(242, 39, 134, 0.07) !important;
    color: #e891bd !important;
    text-shadow: none !important;
}

#browseAds .contact-btn,
#browseAds .like-btn,
#browseAds .profile-share-btn,
#myAds .contact-btn,
#myAds .like-btn,
#myAds .profile-share-btn,
#myAds .delete-btn {
    min-height: 34px !important;
    border: 1px solid rgba(255, 255, 255, 0.085) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(245, 245, 250, 0.76) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
}

#browseAds .contact-btn,
#myAds .contact-btn {
    border-color: rgba(242, 80, 161, 0.22) !important;
    background: rgba(242, 39, 134, 0.09) !important;
    color: #ff87be !important;
}

/* Profile details */
#adDetails > .header,
#adDetails > #adContent,
#adDetails > .ad-details-footer {
    width: calc(100% - 28px) !important;
    max-width: 430px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    box-sizing: border-box !important;
}

#adDetails > .header {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

#adDetails > #adContent {
    margin-top: 8px !important;
}

#adDetails .ad-details-card {
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 90% 0%, rgba(124, 91, 255, 0.08), transparent 35%),
        rgba(17, 19, 40, 0.9) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2) !important;
}

#adDetails .ad-details-header {
    min-height: 48px !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: rgba(255, 255, 255, 0.018) !important;
}

#adDetails .ad-location,
#adDetails .location-text {
    color: rgba(249, 249, 253, 0.9) !important;
    font-size: 13px !important;
    font-weight: 770 !important;
    text-shadow: none !important;
}

#adDetails .ad-date-badge {
    padding: 5px 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: rgba(221, 223, 234, 0.54) !important;
    font-size: 9px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#adDetails .ad-author-info {
    margin: 12px !important;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.032) !important;
    box-shadow: none !important;
}

#adDetails .author-avatar {
    width: 48px !important;
    height: 48px !important;
    border: 1px solid rgba(242, 80, 161, 0.2) !important;
    border-radius: 14px !important;
    background: rgba(242, 39, 134, 0.07) !important;
    color: #de78aa !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#adDetails .author-name {
    color: rgba(250, 250, 253, 0.92) !important;
    font-size: 14px !important;
    font-weight: 820 !important;
    text-shadow: none !important;
}

#adDetails .author-params {
    color: rgba(225, 227, 237, 0.68) !important;
    font-size: 11px !important;
    text-shadow: none !important;
}

#adDetails .author-last-seen {
    color: rgba(178, 184, 204, 0.48) !important;
    font-size: 9px !important;
    text-shadow: none !important;
}

#adDetails .ad-search-info,
#adDetails .ad-description-box {
    margin: 0 12px 10px !important;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.028) !important;
    color: rgba(222, 224, 235, 0.7) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#adDetails .search-title,
#adDetails .description-title {
    margin-bottom: 8px !important;
    color: #e282b0 !important;
    font-size: 11px !important;
    font-weight: 760 !important;
    text-shadow: none !important;
}

#adDetails .search-params {
    gap: 5px !important;
}

#adDetails .param-item {
    min-height: 30px !important;
    padding: 5px 7px !important;
    border: 1px solid rgba(255, 255, 255, 0.055) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.022) !important;
    color: rgba(223, 225, 235, 0.68) !important;
    font-size: 10px !important;
    text-shadow: none !important;
}

#adDetails .description-text {
    color: rgba(234, 235, 242, 0.76) !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
}

#adDetails > .ad-details-footer {
    position: relative !important;
    bottom: auto !important;
    z-index: auto !important;
    margin-top: 10px !important;
    margin-bottom: calc(var(--primary-nav-height) + 16px) !important;
    padding: 10px !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 16px !important;
    background: rgba(17, 19, 40, 0.9) !important;
    box-shadow: none !important;
}

#adDetails .ad-details-footer .neon-button {
    min-height: 42px !important;
    margin-top: 6px !important;
}

/* Product dialogs and keyboard focus */
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(255, 110, 177, 0.8) !important;
    outline-offset: 2px !important;
}

#customAlertModal > div,
#customConfirmModal > div,
#customPromptModal > div {
    width: min(340px, calc(100% - 28px)) !important;
    max-width: 340px !important;
    padding: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.11) !important;
    border-radius: 18px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(242, 39, 134, 0.1), transparent 35%),
        rgba(17, 19, 40, 0.97) !important;
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.46) !important;
}

#customAlertMessage,
#customConfirmMessage,
#customPromptMessage {
    margin-bottom: 16px !important;
    color: rgba(247, 247, 251, 0.9) !important;
    font-size: 14px !important;
    line-height: 1.48 !important;
    text-shadow: none !important;
}

#customAlertBtn,
#customConfirmYes,
#customConfirmNo,
#customPromptOk,
#customPromptCancel {
    min-height: 42px !important;
    padding: 10px 14px !important;
    border: 1px solid rgba(255, 107, 174, 0.28) !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, #ef2381 0%, #c51676 62%, #94145f 100%) !important;
    color: #fff !important;
    font: 750 13px/1.2 inherit !important;
    box-shadow: 0 10px 24px rgba(151, 13, 91, 0.2) !important;
}

#customConfirmNo {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(236, 237, 245, 0.78) !important;
    box-shadow: none !important;
}

#customPromptInput {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 104px !important;
    margin-bottom: 12px !important;
    padding: 11px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    background: rgba(5, 6, 17, 0.7) !important;
    color: rgba(248, 248, 252, 0.92) !important;
    font: 500 13px/1.45 inherit !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
    text-shadow: none !important;
}

#customPromptInput:focus {
    border-color: rgba(242, 80, 161, 0.42) !important;
    box-shadow: 0 0 0 3px rgba(242, 39, 134, 0.08) !important;
}

#customPromptOk,
#customPromptCancel {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    font-size: 13px !important;
}

#customPromptCancel {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(236, 237, 245, 0.78) !important;
    box-shadow: none !important;
}

#customPromptModal [data-ai-row="true"] {
    gap: 8px !important;
    margin-bottom: 10px !important;
}

#customPromptModal #aiFirstMessageBtn {
    min-height: 34px !important;
    padding: 7px 10px !important;
    border: 1px solid rgba(135, 113, 232, 0.26) !important;
    border-radius: 10px !important;
    background: rgba(113, 83, 220, 0.11) !important;
    color: #c4b7f2 !important;
    font: 720 11px/1.2 inherit !important;
    box-shadow: none !important;
}

#customPromptModal .ai-mode-control {
    gap: 2px !important;
    padding: 2px !important;
    border: 1px solid rgba(135, 113, 232, 0.22) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.028) !important;
    box-shadow: none !important;
}

#customPromptModal .ai-mode-option {
    min-height: 30px !important;
    padding: 5px 7px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: rgba(221, 223, 235, 0.64) !important;
    font: 680 10px/1.15 inherit !important;
    box-shadow: none !important;
}

#customPromptModal .ai-mode-option.is-selected {
    background: rgba(119, 84, 219, 0.16) !important;
    color: #d0c1f3 !important;
}

#customPromptModal .ai-action-icon,
#customPromptModal .ai-mode-option-icon {
    width: 14px !important;
    height: 14px !important;
}

.faq-modal .modal-footer .neon-button,
.faq-modal .modal-footer .btn {
    width: 100% !important;
    margin: 0 !important;
}

/* Create-profile controls */
#createAd .age-btn {
    width: 42px !important;
    height: 42px !important;
    border: 1px solid rgba(242, 80, 161, 0.24) !important;
    border-radius: 13px !important;
    background: rgba(242, 39, 134, 0.07) !important;
    color: #df7bad !important;
    font-size: 21px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#createAd .age-btn.plus {
    border-color: rgba(143, 116, 255, 0.24) !important;
    background: rgba(124, 91, 255, 0.07) !important;
    color: #b9aaff !important;
}

#createAd .ai-generate-btn,
#createAd .ai-style-toggle,
#createAd .ai-style-options {
    border-color: var(--product-border-strong) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    box-shadow: none !important;
}

#createAd .ai-style-btn,
#createAd .ai-tone-btn {
    border: 0 !important;
    background: transparent !important;
    color: rgba(224, 226, 236, 0.62) !important;
    box-shadow: none !important;
}

#createAd .ai-style-btn.active,
#createAd .ai-tone-btn.active,
#createAd [aria-pressed="true"] {
    border-radius: 10px !important;
    background: rgba(242, 39, 134, 0.12) !important;
    color: #f08ab9 !important;
    box-shadow: none !important;
}

/* Chats */
#myChats .tab-badge {
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.055) !important;
    color: rgba(242, 242, 248, 0.72) !important;
    font-size: 9px !important;
    line-height: 16px !important;
    box-shadow: none !important;
}

#myChats .tab-btn.active .tab-badge {
    border-color: rgba(242, 80, 161, 0.2) !important;
    background: rgba(242, 39, 134, 0.12) !important;
    color: #ef88b7 !important;
}

/* Swipe discovery */
#swipeScreen > .screen-header {
    min-height: 58px !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055) !important;
    background: rgba(8, 9, 23, 0.82) !important;
}

#swipeScreen > .screen-header > button {
    min-width: 64px !important;
    height: 36px !important;
    padding: 7px 10px !important;
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(233, 234, 242, 0.75) !important;
    font: 720 11px/1.1 inherit !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#swipeScreen > .screen-header > h3 {
    color: rgba(249, 249, 252, 0.91) !important;
    font-size: 16px !important;
    font-weight: 840 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
}

#swipeEmptyState {
    padding: 76px 20px calc(var(--primary-nav-height) + 24px) !important;
}

#swipeEmptyState .swipe-product-state {
    width: min(330px, 100%) !important;
    margin: 0 auto !important;
}

#swipeEmptyState .product-state__actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 16px !important;
}

#swipeEmptyState .product-state__actions .neon-button {
    min-height: 40px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    font-size: 11px !important;
}

/* Swipe discovery: centered product column and a single strict SVG language. */
#swipeScreen {
    position: absolute !important;
    align-items: center !important;
}

#swipeScreen > .swipe-screen-header {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) 72px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 430px !important;
    min-height: 58px !important;
    padding: 10px 12px !important;
}

#swipeScreen > .swipe-screen-header h3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    margin: 0 !important;
    color: rgba(249, 249, 252, 0.94) !important;
    font-size: 15px !important;
    font-weight: 820 !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

#swipeScreen .swipe-ui-icon {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    object-fit: contain !important;
}

#swipeScreen .swipe-header-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 9px !important;
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.042) !important;
    color: rgba(233, 234, 242, 0.74) !important;
    font: 720 11px/1 inherit !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#swipeScreen .swipe-back-button {
    justify-self: start !important;
}

#swipeScreen .swipe-mutual-header-button {
    justify-self: end !important;
    width: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    border-color: rgba(242, 80, 161, 0.23) !important;
    background: rgba(242, 39, 134, 0.075) !important;
}

#swipeContainer {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 430px !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
}

#swipeControls {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 430px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 11px !important;
    padding: 9px 14px 10px !important;
    border-top: 1px solid var(--product-border) !important;
    background: rgba(8, 9, 23, 0.92) !important;
    pointer-events: none !important;
    z-index: 100 !important;
}

#swipeControls .swipe-control-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.047) !important;
    color: rgba(230, 222, 246, 0.78) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    pointer-events: auto !important;
    transform: none !important;
}

#swipeControls .swipe-control-button--undo {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 14px !important;
    color: rgba(190, 172, 232, 0.7) !important;
}

#swipeControls .swipe-control-button--like {
    border-color: rgba(242, 80, 161, 0.28) !important;
    background: rgba(242, 39, 134, 0.09) !important;
}

#swipeControls .swipe-control-button:hover,
#swipeControls .swipe-control-button:focus-visible {
    border-color: rgba(242, 80, 161, 0.4) !important;
    background: rgba(242, 39, 134, 0.12) !important;
}

#swipeControls .swipe-control-button img,
#swipeControls .swipe-control-button svg {
    width: 24px !important;
    height: 24px !important;
}

#swipeControls .swipe-control-button svg {
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

#swipeEmptyState {
    display: none;
    position: absolute !important;
    top: 58px !important;
    right: auto !important;
    bottom: calc(var(--primary-nav-height) + var(--chat-safe-bottom-extra)) !important;
    left: 50% !important;
    width: min(100%, 430px) !important;
    max-width: 430px !important;
    height: auto !important;
    padding: 20px 18px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    text-align: center !important;
    transform: translateX(-50%) !important;
    box-sizing: border-box !important;
}

#swipeEmptyState .swipe-product-state {
    width: min(326px, 100%) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 22px 18px 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.085) !important;
    border-radius: 20px !important;
    background: linear-gradient(145deg, rgba(18, 20, 42, 0.91), rgba(10, 11, 27, 0.94)) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24) !important;
}

#swipeEmptyState .swipe-empty-illustration {
    display: block !important;
    width: 88px !important;
    height: 88px !important;
    margin: 0 auto 12px !important;
    object-fit: contain !important;
}

#swipeEmptyState h2 {
    margin: 0 0 7px !important;
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 19px !important;
    font-weight: 840 !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
}

#swipeEmptyState p {
    max-width: 270px !important;
    margin: 0 auto !important;
    color: rgba(220, 221, 232, 0.61) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

#swipeEmptyState .product-state__actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(90px, 0.75fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 16px !important;
}

#swipeEmptyState .product-state__actions .neon-button,
#matchOverlay button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-width: 0 !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(241, 241, 247, 0.82) !important;
    font: 740 11px/1.2 inherit !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#swipeEmptyState .product-state__actions .neon-button:first-child {
    border-color: rgba(242, 80, 161, 0.24) !important;
    background: rgba(242, 39, 134, 0.09) !important;
    color: #ef91bd !important;
}

.swipe-button-icon {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    object-fit: contain !important;
}

.swipe-inline-icon {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
    vertical-align: -2px !important;
    object-fit: contain !important;
}

.swipe-no-photo-illustration {
    position: relative !important;
    display: block !important;
    width: 84px !important;
    height: 84px !important;
    margin: 0 auto 13px !important;
    object-fit: contain !important;
}

.product-fullscreen-dialog-header h3 {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
}

.product-fullscreen-dialog-header h3 .swipe-inline-icon {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.product-state-svg {
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    margin: 0 auto 10px !important;
    object-fit: contain !important;
}

.product-state-svg--large {
    width: 76px !important;
    height: 76px !important;
}

#matchOverlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100dvh !important;
    padding: 18px !important;
    align-items: center !important;
    justify-content: center !important;
    background:
        radial-gradient(circle at 50% 28%, rgba(242, 39, 134, 0.16), transparent 40%),
        rgba(4, 5, 14, 0.94) !important;
    backdrop-filter: blur(16px) !important;
    box-sizing: border-box !important;
}

#matchOverlay .match-dialog-card {
    width: min(346px, 100%) !important;
    padding: 24px 20px 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 22px !important;
    background: linear-gradient(145deg, rgba(21, 23, 47, 0.97), rgba(9, 10, 25, 0.98)) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42) !important;
    text-align: center !important;
}

#matchOverlay .match-dialog-mark {
    width: 54px !important;
    height: 54px !important;
    margin: 0 auto 8px !important;
    object-fit: contain !important;
}

#matchOverlay h1 {
    margin: 0 0 6px !important;
    color: rgba(251, 251, 253, 0.96) !important;
    font-size: 25px !important;
    font-weight: 880 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.35px !important;
    text-shadow: none !important;
}

#matchOverlay .match-dialog-card > p {
    margin: 0 0 22px !important;
    color: rgba(220, 221, 232, 0.64) !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

#matchOverlay .match-dialog-avatars {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    margin: 0 auto 17px !important;
}

#matchOverlay .match-dialog-avatar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 82px !important;
    height: 82px !important;
    flex: 0 0 82px !important;
    border: 2px solid rgba(242, 80, 161, 0.27) !important;
    border-radius: 50% !important;
    background: rgba(242, 39, 134, 0.075) center/cover no-repeat;
    box-shadow: none !important;
    overflow: hidden !important;
}

#matchOverlay .match-dialog-avatar img {
    width: 34px !important;
    height: 34px !important;
}

#matchOverlay .match-dialog-link {
    width: 24px !important;
    height: 1px !important;
    flex: 0 0 24px !important;
    background: linear-gradient(90deg, rgba(242, 80, 161, 0.18), rgba(159, 107, 247, 0.52), rgba(242, 80, 161, 0.18)) !important;
}

#matchInfo {
    margin: 0 0 20px !important;
    color: rgba(248, 248, 252, 0.92) !important;
    text-align: center !important;
}

#matchNickname {
    font-size: 16px !important;
    font-weight: 810 !important;
}

#matchCity {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 17px !important;
    margin-top: 4px !important;
    color: rgba(220, 221, 232, 0.56) !important;
    font-size: 11px !important;
}

#matchOverlay .match-dialog-actions {
    display: grid !important;
    gap: 8px !important;
    width: 100% !important;
}

#matchOverlay .match-dialog-primary {
    border-color: rgba(242, 80, 161, 0.3) !important;
    background: linear-gradient(135deg, rgba(242, 39, 134, 0.26), rgba(133, 80, 224, 0.21)) !important;
    color: #f5b3d1 !important;
}

#matchOverlay .match-dialog-secondary {
    color: rgba(231, 231, 239, 0.68) !important;
}

@media (max-width: 350px) {
    #swipeScreen > .swipe-screen-header {
        grid-template-columns: 62px minmax(0, 1fr) 62px !important;
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    #swipeScreen .swipe-mutual-header-button {
        width: 36px !important;
        min-width: 36px !important;
    }

    #swipeScreen > .swipe-screen-header h3 {
        gap: 5px !important;
        font-size: 14px !important;
    }

    #swipeControls {
        gap: 7px !important;
    }

    #swipeEmptyState .product-state__actions {
        grid-template-columns: 1fr !important;
    }
}

.product-fullscreen-dialog {
    background: rgba(5, 6, 17, 0.975) !important;
    backdrop-filter: blur(14px) !important;
}

.product-fullscreen-dialog-header {
    display: grid !important;
    grid-template-columns: 74px minmax(0, 1fr) 74px !important;
    min-height: 62px !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065) !important;
    background: rgba(11, 12, 27, 0.94) !important;
}

.product-fullscreen-dialog-header h3 {
    align-self: center !important;
    margin: 0 !important;
    color: rgba(249, 249, 252, 0.92) !important;
    font-size: 15px !important;
    font-weight: 820 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.product-dialog-back {
    align-self: center !important;
    min-height: 36px !important;
    padding: 7px 10px !important;
    border: 1px solid var(--product-border-strong) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(233, 234, 242, 0.76) !important;
    font: 720 11px/1.1 inherit !important;
    box-shadow: none !important;
}

.product-dialog-header-spacer {
    width: 74px !important;
}

.product-fullscreen-dialog-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 18px 14px calc(var(--primary-nav-height) + 20px) !important;
}

/* Daily bonus */
#dailyBonusModal .modal-content {
    box-sizing: border-box !important;
    width: min(340px, calc(100vw - 28px)) !important;
    max-width: 340px !important;
    padding: 20px 18px !important;
    border-radius: 18px !important;
}

#dailyBonusIcon {
    width: 42px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 12px !important;
    border: 1px solid rgba(242, 80, 161, 0.2) !important;
    border-radius: 13px !important;
    background: rgba(242, 39, 134, 0.08) !important;
    color: #ea7eb2 !important;
    font-size: 19px !important;
    font-weight: 840 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#dailyBonusTitle {
    margin: 0 0 7px !important;
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 18px !important;
    font-weight: 840 !important;
    text-shadow: none !important;
}

#dailyBonusMessage {
    margin: 0 0 14px !important;
    color: rgba(224, 226, 236, 0.66) !important;
    font-size: 12px !important;
    line-height: 1.48 !important;
    text-shadow: none !important;
}

#dailyBonusCountdownBlock {
    border-color: rgba(242, 80, 161, 0.16) !important;
    background: rgba(242, 39, 134, 0.055) !important;
}

#dailyBonusCountdown {
    color: #e780b0 !important;
    text-shadow: none !important;
}

#dailyBonusClaimBtn,
#dailyBonusCloseBtn {
    min-height: 42px !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    font: 760 13px/1.2 inherit !important;
    box-shadow: none !important;
}

#dailyBonusClaimBtn {
    border: 1px solid rgba(255, 107, 174, 0.26) !important;
    background: linear-gradient(145deg, #ef2381 0%, #c51676 62%, #94145f 100%) !important;
    color: #fff !important;
}

#dailyBonusCloseBtn {
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(236, 237, 245, 0.75) !important;
}

/* Profile settings */
#nicknameEditScreen .current-nickname-display {
    min-height: 96px !important;
    padding: 14px !important;
    border: 1px solid rgba(242, 80, 161, 0.16) !important;
    border-radius: 14px !important;
    background: rgba(242, 39, 134, 0.045) !important;
    box-shadow: none !important;
}

#nicknameEditScreen .nickname-icon-large {
    font-size: 30px !important;
    filter: saturate(0.78) !important;
    text-shadow: none !important;
}

#nicknameEditScreen .nickname-text {
    color: rgba(250, 250, 253, 0.92) !important;
    font-size: 19px !important;
    text-shadow: none !important;
}

#nicknameEditScreen #anonymousUserHint {
    border: 1px solid rgba(242, 80, 161, 0.17) !important;
    background: rgba(242, 39, 134, 0.055) !important;
    color: rgba(238, 239, 246, 0.78) !important;
}

#nicknameEditScreen .nickname-status {
    min-height: 30px !important;
    padding: 7px 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    color: rgba(222, 224, 235, 0.6) !important;
    font-size: 10px !important;
    box-sizing: border-box !important;
    text-shadow: none !important;
}

#nicknameEditScreen .nickname-status[data-nickname-state="available"] {
    border-color: rgba(83, 204, 145, 0.18) !important;
    background: rgba(60, 178, 120, 0.055) !important;
    color: #81c8a6 !important;
}

#nicknameEditScreen .nickname-status[data-nickname-state="taken"],
#nicknameEditScreen .nickname-status[data-nickname-state="invalid"] {
    border-color: rgba(255, 105, 132, 0.18) !important;
    background: rgba(255, 83, 112, 0.055) !important;
    color: #d78b98 !important;
}

#nicknameEditScreen #saveNicknamePageBtn:disabled {
    opacity: 0.42 !important;
    filter: saturate(0.45) !important;
    box-shadow: none !important;
}

/* Photo library and compact informational empty states */
#myPhotosScreen #photosGallery {
    min-height: 180px !important;
}

#myPhotosScreen #photosGallery > div {
    padding: 30px 16px !important;
}

#myPhotosScreen #photosGallery > div > div:first-child {
    margin-bottom: 10px !important;
    font-size: 42px !important;
    filter: saturate(0.7) !important;
}

#blockedUsers .empty-state {
    min-height: 170px !important;
    padding: 24px 18px !important;
}

#blockedUsers .empty-state .neon-icon {
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    border: 1px solid rgba(242, 80, 161, 0.16) !important;
    border-radius: 12px !important;
    background: rgba(242, 39, 134, 0.06) !important;
    font-size: 18px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Informational screens */
#rules .rules-section,
#privacy .privacy-section,
#about .about-section,
#affiliateInfo .affiliate-section,
#contacts .contact-item,
#contacts #supportSafetyItem[style] {
    margin: 0 0 9px !important;
    padding: 13px !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 15px !important;
    background: rgba(17, 19, 40, 0.86) !important;
    color: rgba(229, 231, 242, 0.76) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#rules .rules-section h3,
#privacy .privacy-section h3,
#about .about-section h3,
#affiliateInfo .affiliate-section h3,
#contacts .contact-item h3 {
    margin: 0 0 7px !important;
    color: rgba(250, 250, 253, 0.9) !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    text-shadow: none !important;
}

#rules .rules-section h4,
#privacy .privacy-section h4,
#about .about-section h4 {
    color: rgba(242, 150, 194, 0.86) !important;
    text-shadow: none !important;
}

#rules .rules-section p,
#rules .rules-section li,
#privacy .privacy-section p,
#privacy .privacy-section li,
#about .about-section p,
#about .about-section li,
#contacts .contact-item p {
    color: rgba(215, 218, 232, 0.62) !important;
    font-size: 11px !important;
    line-height: 1.52 !important;
    text-shadow: none !important;
}

#rules .rules-section li::before,
#privacy .privacy-section li::before,
#about .about-section li::before {
    color: #e36aa3 !important;
    text-shadow: none !important;
}

#rules .legal-link[style],
#privacy .legal-link[style],
#about .legal-link[style],
#contacts .legal-link {
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    padding: 8px 11px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: rgba(237, 213, 227, 0.78) !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

#contacts .contact-icon {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    font-size: 16px !important;
    text-shadow: none !important;
}

#contacts .contact-action {
    color: #dc7fab !important;
    font-size: 9px !important;
    font-style: normal !important;
    text-shadow: none !important;
}

/* Common modal shell */
.modal {
    padding: max(10px, var(--safe-area-top)) 10px max(10px, var(--safe-area-bottom)) !important;
    box-sizing: border-box !important;
}

.modal-overlay:not(#emailAuthModal):not(#comAuthChoiceModal) {
    background-color: rgba(2, 3, 12, 0.72) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.modal-content,
.chat-help-content {
    box-sizing: border-box !important;
    width: min(100%, 430px) !important;
    max-height: min(88dvh, 720px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 90% 0%, rgba(124, 91, 255, 0.1), transparent 34%),
        #111329 !important;
    color: var(--product-text) !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46) !important;
    text-shadow: none !important;
}

.modal-header {
    min-height: 58px !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.modal-header h2,
.modal-content > h3 {
    margin: 0 !important;
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 16px !important;
    font-weight: 820 !important;
    line-height: 1.22 !important;
    letter-spacing: -0.015em !important;
    text-shadow: none !important;
}

.modal-body {
    padding: 14px !important;
    color: rgba(222, 224, 236, 0.7) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.modal-footer {
    gap: 8px !important;
    padding: 10px 14px 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: transparent !important;
}

.modal-close,
.modal-close-btn {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
}

.faq-item,
.help-section {
    margin: 0 0 8px !important;
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 13px !important;
    background: rgba(255, 255, 255, 0.032) !important;
    box-shadow: none !important;
}

.faq-item h3,
.faq-item h4,
.help-section h3 {
    margin: 0 0 6px !important;
    color: rgba(248, 248, 252, 0.88) !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    text-shadow: none !important;
}

.faq-item p,
.help-section p {
    margin: 0 !important;
    color: rgba(215, 218, 232, 0.6) !important;
    font-size: 10px !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
}

.report-reasons {
    display: grid !important;
    gap: 6px !important;
}

.report-reason-btn {
    min-height: 54px !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: rgba(240, 241, 247, 0.78) !important;
    box-shadow: none !important;
    transform: none !important;
}

.report-reason-btn:hover,
.report-reason-btn:focus-visible,
.report-reason-btn.selected,
.report-reason-btn.active {
    border-color: rgba(242, 80, 161, 0.28) !important;
    background: var(--product-accent-soft) !important;
    box-shadow: none !important;
}

.report-reason-btn .reason-icon {
    width: 30px !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    font-size: 15px !important;
}

.report-reason-btn .reason-text h4 {
    margin: 0 !important;
    color: rgba(248, 248, 252, 0.88) !important;
    font-size: 11px !important;
    text-shadow: none !important;
}

.report-reason-btn .reason-text p {
    margin: 2px 0 0 !important;
    color: rgba(205, 208, 223, 0.52) !important;
    font-size: 9px !important;
    text-shadow: none !important;
}

/* Language chooser */
.language-modal {
    background: rgba(2, 3, 12, 0.74) !important;
    backdrop-filter: blur(12px) !important;
}

.language-modal-content {
    width: min(calc(100% - 20px), 410px) !important;
    max-height: min(82dvh, 690px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 80% 0%, rgba(124, 91, 255, 0.1), transparent 30%),
        #111329 !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46) !important;
}

.language-modal-header {
    padding: 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.language-modal-header h2 {
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 16px !important;
    text-shadow: none !important;
}

.language-modal-header p {
    color: var(--product-muted) !important;
    font-size: 10px !important;
}

.language-modal-close {
    width: 34px !important;
    height: 34px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: none !important;
}

.language-modal-list {
    gap: 5px !important;
    padding: 9px !important;
}

.language-modal-option {
    min-height: 46px !important;
    padding: 7px 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.065) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    color: rgba(231, 233, 242, 0.72) !important;
    box-shadow: none !important;
}

.language-modal-option:hover,
.language-modal-option:focus-visible {
    border-color: rgba(242, 80, 161, 0.18) !important;
    background: rgba(242, 39, 134, 0.055) !important;
    transform: none !important;
}

.language-modal-option.is-active {
    border-color: rgba(242, 80, 161, 0.3) !important;
    background: var(--product-accent-soft) !important;
    color: #ff83bc !important;
    box-shadow: none !important;
}

.language-modal-code {
    color: rgba(255, 255, 255, 0.36) !important;
}

/* Authentication modals still contain legacy inline styles; normalize them here. */
#emailAuthModal,
#comAuthChoiceModal {
    padding: 10px !important;
    box-sizing: border-box !important;
    background: rgba(2, 3, 12, 0.78) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

#emailAuthModal > div,
#comAuthChoiceModal > div {
    width: min(100%, 420px) !important;
    max-height: min(90dvh, 700px) !important;
    overflow-y: auto !important;
    padding: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 86% 0%, rgba(124, 91, 255, 0.11), transparent 32%),
        #111329 !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46) !important;
}

#emailAuthModal h2,
#comAuthChoiceModal h2 {
    margin: 0 0 8px !important;
    color: rgba(250, 250, 253, 0.94) !important;
    font-size: 21px !important;
    line-height: 1.2 !important;
    text-shadow: none !important;
}

#emailAuthModal p,
#comAuthChoiceModal p {
    color: rgba(215, 218, 232, 0.62) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
}

#emailAuthInput,
#emailAuthCode {
    min-height: 48px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    background: rgba(7, 8, 20, 0.84) !important;
    color: #fff !important;
    box-shadow: none !important;
}

#emailAuthInput:focus,
#emailAuthCode:focus {
    border-color: rgba(242, 80, 161, 0.5) !important;
    outline: 2px solid rgba(242, 39, 134, 0.1) !important;
}

#emailAuthButton {
    min-height: 46px !important;
    padding: 0 15px !important;
    border: 1px solid rgba(255, 107, 174, 0.28) !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, #ef2381, #b81672) !important;
    color: #fff !important;
    font-size: 13px !important;
    box-shadow: 0 10px 24px rgba(151, 13, 91, 0.22) !important;
}

#emailAuthSwitchTelegram,
#emailAuthSwitchGoogle,
#emailAuthSwitchApple,
#emailAuthSwitchVk,
#emailAuthGoHome {
    min-height: 36px !important;
    padding: 7px 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: rgba(229, 231, 242, 0.72) !important;
    font-size: 10px !important;
    text-decoration: none !important;
}

/* Unified compact authentication surfaces. */
#telegramAuthModal,
#emailAuthModal {
    padding: max(10px, var(--safe-area-top)) 10px max(10px, var(--safe-area-bottom)) !important;
    background:
        radial-gradient(circle at 50% 18%, rgba(111, 50, 139, 0.1), transparent 34%),
        rgba(2, 3, 12, 0.84) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

#telegramAuthModal .telegram-auth-modal-content,
#emailAuthModal .email-auth-modal-content {
    position: relative !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 92% 0%, rgba(128, 75, 168, 0.1), transparent 34%),
        linear-gradient(180deg, rgba(17, 19, 40, 0.985), rgba(10, 11, 26, 0.99)) !important;
    box-shadow: 0 28px 74px rgba(0, 0, 0, 0.5) !important;
    color: rgba(245, 245, 250, 0.9) !important;
    text-shadow: none !important;
}

#telegramAuthModal .telegram-auth-modal-content {
    width: min(100%, 640px) !important;
    max-width: 640px !important;
    max-height: min(90dvh, 680px) !important;
    padding: 18px !important;
}

#emailAuthModal .email-auth-modal-content {
    width: min(100%, 420px) !important;
    max-width: 420px !important;
    max-height: min(90dvh, 680px) !important;
    padding: 18px !important;
}

#telegramAuthModal .modal-close,
#emailAuthModal .email-auth-close {
    position: absolute !important;
    z-index: 2;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    color: rgba(228, 230, 240, 0.56) !important;
    cursor: pointer;
    box-shadow: none !important;
}

#telegramAuthModal .modal-close svg,
#emailAuthModal .email-auth-close svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
}

#telegramAuthModal .auth-modal-heading,
#emailAuthModal .auth-modal-heading {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 42px 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

#telegramAuthModal .auth-modal-heading-icon,
#emailAuthModal .auth-modal-heading-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 117, 174, 0.18);
    border-radius: 10px;
    background: rgba(146, 41, 101, 0.11);
    color: #dc7fab;
}

#telegramAuthModal .auth-modal-heading-icon svg,
#emailAuthModal .auth-modal-heading-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#telegramAuthModal .auth-modal-title,
#emailAuthModal .auth-modal-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: rgba(248, 248, 252, 0.92) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    text-shadow: none !important;
}

#telegramAuthModal .auth-modal-subtitle,
#emailAuthModal .auth-modal-heading p {
    margin: 2px 0 0 !important;
    color: rgba(209, 212, 226, 0.52) !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

#telegramAuthModal .auth-modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.86fr);
    align-items: start;
    gap: 12px !important;
    padding-top: 12px;
}

#telegramAuthModal .auth-left-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

#telegramAuthModal .auth-notice {
    min-height: 54px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

#telegramAuthModal .auth-notice-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(213, 139, 188, 0.15);
    border-radius: 9px;
    background: rgba(146, 41, 101, 0.08);
    color: #d38ab5;
}

#telegramAuthModal .auth-notice-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#telegramAuthModal .auth-notice-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#telegramAuthModal .auth-notice-text strong {
    color: rgba(246, 246, 251, 0.85);
    font-size: 10px;
    font-weight: 750;
    line-height: 1.3;
}

#telegramAuthModal .auth-notice-text span {
    color: rgba(209, 212, 226, 0.52);
    font-size: 9px;
    line-height: 1.35;
}

#telegramAuthModal .auth-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#telegramAuthModal .auth-features li {
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: rgba(218, 220, 231, 0.64);
    font-size: 8px;
    line-height: 1.25;
}

#telegramAuthModal .auth-features li > span {
    width: 12px;
    height: 7px;
    box-sizing: border-box;
    border-left: 1.5px solid #c878a8;
    border-bottom: 1.5px solid #c878a8;
    transform: translate(1px, -1px) rotate(-45deg);
}

#telegramAuthModal .auth-alternatives,
#emailAuthModal .email-auth-alternatives {
    margin: 0 !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

#telegramAuthModal .auth-alt-label,
#emailAuthModal .auth-alt-label {
    display: block;
    margin: 0 0 6px;
    color: rgba(206, 209, 223, 0.44);
    font-size: 8px;
    line-height: 1.25;
    text-align: left;
}

#telegramAuthModal .auth-alt-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

#telegramAuthModal .auth-btn,
#emailAuthModal .email-auth-provider {
    min-width: 0;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    box-sizing: border-box;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.027) !important;
    color: rgba(232, 233, 242, 0.72) !important;
    font-size: 9px !important;
    font-weight: 650;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
}

#telegramAuthModal .auth-provider-icon,
#emailAuthModal .auth-provider-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(225, 226, 236, 0.7);
}

#telegramAuthModal .auth-provider-icon svg,
#emailAuthModal .auth-provider-icon svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    stroke: none;
}

#telegramAuthModal .auth-btn-email .auth-provider-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#telegramAuthModal .auth-provider-icon-vk,
#emailAuthModal .auth-provider-icon-vk {
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 5px;
    font-size: 6px;
    font-weight: 850;
    letter-spacing: -0.03em;
}

#telegramAuthModal .auth-right-col {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.065) !important;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.02);
}

#telegramAuthModal .auth-terms-locked-state {
    display: none;
}

#telegramAuthModal .auth-right-col.auth-terms-protected-locked {
    border-color: rgba(217, 117, 174, 0.13) !important;
    background:
        radial-gradient(circle at 50% 35%, rgba(146, 41, 101, 0.1), transparent 48%),
        rgba(255, 255, 255, 0.018);
}

#telegramAuthModal .auth-right-col.auth-terms-protected-locked > :not(.auth-terms-locked-state) {
    visibility: hidden !important;
    pointer-events: none !important;
}

#telegramAuthModal .auth-right-col.auth-terms-protected-locked .auth-terms-locked-state {
    position: absolute;
    z-index: 1;
    inset: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 10px;
    background: rgba(8, 9, 23, 0.34);
    text-align: center;
}

#telegramAuthModal .auth-terms-locked-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(217, 117, 174, 0.2);
    border-radius: 12px;
    background: rgba(146, 41, 101, 0.11);
    color: #d986b4;
}

#telegramAuthModal .auth-terms-locked-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#telegramAuthModal .auth-terms-locked-title {
    color: rgba(244, 244, 250, 0.86);
    font-size: 10px;
    font-weight: 760;
    line-height: 1.3;
}

#telegramAuthModal .auth-terms-locked-description {
    max-width: 170px;
    color: rgba(209, 212, 226, 0.52);
    font-size: 8px;
    line-height: 1.45;
}

#telegramAuthModal .qr-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 8px;
    color: rgba(239, 239, 246, 0.78);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

#telegramAuthModal .qr-title > span {
    width: 16px;
    height: 16px;
    display: inline-flex;
    color: #d17eae;
}

#telegramAuthModal .qr-title svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
}

#telegramAuthModal .qr-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 156px;
    min-height: 156px;
    box-sizing: border-box;
    margin: 0 0 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: #f6f3fa;
    box-shadow: none;
}

#telegramAuthModal #qrcode canvas {
    width: 144px !important;
    height: 144px !important;
    display: block !important;
    border-radius: 6px;
}

#telegramAuthModal .qr-loading {
    border-radius: 10px;
    background: rgba(246, 243, 250, 0.96);
    color: #4d3b58;
}

#telegramAuthModal .qr-loading p {
    margin: 7px 0 0;
    font-size: 8px;
}

#telegramAuthModal .qr-steps {
    width: 100%;
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: auth-step;
}

#telegramAuthModal .qr-steps li {
    min-height: 21px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    color: rgba(207, 210, 223, 0.54);
    font-size: 8px;
    line-height: 1.25;
}

#telegramAuthModal .qr-steps li::before {
    counter-increment: auth-step;
    content: counter(auth-step);
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 123, 176, 0.14);
    border-radius: 6px;
    background: rgba(146, 41, 101, 0.08);
    color: #d282b1;
    font-size: 7px;
}

#telegramAuthModal .or-divider {
    margin: 7px 0 !important;
    color: rgba(206, 209, 223, 0.36);
    font-size: 8px;
}

#telegramAuthModal .telegram-deep-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid rgba(70, 166, 217, 0.18);
    border-radius: 10px;
    background: rgba(47, 139, 191, 0.11);
    color: #82bddc;
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: none;
    transform: none;
}

#telegramAuthModal .telegram-deep-link svg {
    width: 14px;
    height: 14px;
}

#telegramAuthModal .auth-terms-agreement[data-auth-terms-context="telegram-auth"] {
    grid-column: 1 / -1;
}

#emailAuthModal .email-auth-heading {
    margin-bottom: 12px;
}

#emailAuthModal .email-auth-field {
    display: grid;
    gap: 5px;
    margin: 0 0 9px;
}

#emailAuthModal .email-auth-field label {
    color: rgba(215, 217, 230, 0.55);
    font-size: 9px;
    font-weight: 650;
    line-height: 1.25;
}

#emailAuthModal #emailAuthInput,
#emailAuthModal #emailAuthCode {
    width: 100%;
    min-height: 44px !important;
    box-sizing: border-box;
    padding: 0 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 11px !important;
    background: rgba(6, 7, 18, 0.74) !important;
    color: rgba(248, 248, 252, 0.92) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: left !important;
    outline: none;
    box-shadow: none !important;
}

#emailAuthModal #emailAuthCode {
    font-size: 16px !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.22em;
    text-align: center !important;
}

#emailAuthModal #emailAuthInput::placeholder,
#emailAuthModal #emailAuthCode::placeholder {
    color: rgba(202, 205, 219, 0.32);
}

#emailAuthModal #emailAuthInput:focus,
#emailAuthModal #emailAuthCode:focus {
    border-color: rgba(228, 108, 171, 0.36) !important;
    outline: 2px solid rgba(204, 52, 129, 0.07) !important;
}

#emailAuthModal .auth-terms-agreement {
    margin: 0 0 9px;
}

#emailAuthModal .email-auth-message {
    min-height: 18px;
    display: flex;
    align-items: center;
    margin: 0 0 7px;
    color: rgba(207, 210, 223, 0.54);
    font-size: 9px;
    line-height: 1.35;
}

#emailAuthModal .email-auth-message:empty {
    min-height: 0;
    margin-bottom: 0;
}

#emailAuthModal .email-auth-message[data-tone="progress"] {
    color: #ba9fd2;
}

#emailAuthModal .email-auth-message[data-tone="success"] {
    color: #8fc7ab;
}

#emailAuthModal .email-auth-message[data-tone="error"] {
    color: #e4879c;
}

#emailAuthModal #emailAuthButton {
    width: 100%;
    min-height: 44px !important;
    margin: 0 0 10px;
    padding: 0 14px !important;
    border: 1px solid rgba(238, 122, 179, 0.25) !important;
    border-radius: 11px !important;
    background: linear-gradient(145deg, rgba(190, 34, 111, 0.94), rgba(135, 25, 88, 0.96)) !important;
    color: rgba(255, 249, 252, 0.94) !important;
    font-size: 11px !important;
    font-weight: 750 !important;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(82, 9, 50, 0.18) !important;
    transform: none !important;
}

#emailAuthModal #emailAuthButton:disabled {
    cursor: wait;
    opacity: 0.56;
}

#emailAuthModal .email-auth-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

@media (hover: hover) {
    #telegramAuthModal .modal-close:hover,
    #emailAuthModal .email-auth-close:hover,
    #telegramAuthModal .auth-btn:hover,
    #emailAuthModal .email-auth-provider:hover {
        border-color: rgba(230, 121, 178, 0.18) !important;
        background: rgba(205, 53, 132, 0.055) !important;
        color: rgba(246, 239, 244, 0.86) !important;
    }

    #telegramAuthModal .telegram-deep-link:hover {
        border-color: rgba(70, 166, 217, 0.3);
        background: rgba(47, 139, 191, 0.16);
        box-shadow: none;
        transform: none;
    }

    #emailAuthModal #emailAuthButton:hover {
        border-color: rgba(245, 151, 196, 0.35) !important;
        background: linear-gradient(145deg, rgba(201, 44, 121, 0.97), rgba(144, 29, 95, 0.98)) !important;
    }
}

#telegramAuthModal .modal-close:active,
#emailAuthModal .email-auth-close:active,
#telegramAuthModal .auth-btn:active,
#emailAuthModal .email-auth-provider:active,
#emailAuthModal #emailAuthButton:active {
    transform: scale(0.985) !important;
}

@media (max-width: 620px) {
    #telegramAuthModal .telegram-auth-modal-content,
    #emailAuthModal .email-auth-modal-content {
        padding: 15px !important;
        border-radius: 18px !important;
    }

    #telegramAuthModal .auth-modal-body {
        grid-template-columns: 1fr;
    }

    #telegramAuthModal .auth-right-col {
        display: grid;
        grid-template-columns: 132px minmax(0, 1fr);
        align-items: center;
        gap: 7px 10px;
        padding: 9px !important;
    }

    #telegramAuthModal .qr-title {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    #telegramAuthModal .qr-wrapper {
        grid-column: 1;
        grid-row: 2;
        min-width: 144px;
        min-height: 144px;
        margin-bottom: 0;
    }

    #telegramAuthModal #qrcode canvas {
        width: 132px !important;
        height: 132px !important;
    }

    #telegramAuthModal .qr-steps {
        grid-column: 2;
        grid-row: 2;
    }

    #telegramAuthModal .or-divider,
    #telegramAuthModal #loginWidgetContainer {
        grid-column: 1 / -1;
        width: 100%;
    }

    #telegramAuthModal #loginWidgetContainer {
        text-align: center;
    }

    #telegramAuthModal .auth-terms-agreement[data-auth-terms-context="telegram-auth"] {
        grid-column: 1;
    }
}

@media (max-width: 350px) {
    #telegramAuthModal .auth-right-col {
        grid-template-columns: 118px minmax(0, 1fr);
    }

    #telegramAuthModal .qr-wrapper {
        min-width: 118px;
        min-height: 118px;
    }

    #telegramAuthModal #qrcode canvas {
        width: 106px !important;
        height: 106px !important;
    }
}

/* Premium: precious, not arcade. */
.premium-modal {
    border-color: rgba(147, 112, 219, 0.22) !important;
    /* Тот же фон-город, что и на ×2-карточке, под тёмной вуалью для читаемости прайса. */
    background:
        linear-gradient(180deg, rgba(17, 19, 41, 0.93) 0%, rgba(15, 12, 32, 0.9) 55%, rgba(20, 15, 38, 0.94) 100%),
        url('/webapp/images/x2-offer-card-bg-v1.webp') center / cover no-repeat,
        #111329 !important;
}

.premium-modal .modal-body {
    padding: 10px 12px 14px !important;
}

.pricing-table {
    gap: 8px !important;
    padding: 3px !important;
}

.pricing-card {
    padding: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.085) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.028) !important;
    box-shadow: none !important;
    transform: none !important;
}

.pricing-card.featured {
    order: -1;
    border-color: rgba(255, 193, 106, 0.2) !important;
    background:
        linear-gradient(145deg, rgba(217, 30, 128, 0.09), rgba(255, 183, 74, 0.045)),
        rgba(255, 255, 255, 0.025) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 194, 108, 0.025) !important;
}

.premium-badge {
    top: -7px !important;
    right: 10px !important;
    padding: 3px 8px !important;
    border: 1px solid rgba(255, 220, 164, 0.18) !important;
    background: linear-gradient(135deg, #8f5360, #73455c) !important;
    color: #ffe3c0 !important;
    font-size: 8px !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22) !important;
    animation: none !important;
}

.pricing-header h3 {
    margin: 0 0 4px !important;
    color: rgba(248, 248, 252, 0.9) !important;
    font-size: 15px !important;
    text-shadow: none !important;
}

.pricing-card.featured .pricing-header h3 {
    color: #ffd29a !important;
}

.price-amount {
    background: none !important;
    color: #ef8ebb !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 22px !important;
    text-shadow: none !important;
}

.pricing-card.featured .price-amount {
    color: #ffd29a !important;
}

.pricing-features {
    display: grid;
    gap: 4px;
    margin: 8px 0 !important;
}

.pricing-card .feature-item {
    min-height: 30px;
    padding: 5px 7px !important;
    border: 1px solid rgba(255, 255, 255, 0.055) !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.025) !important;
}

.pricing-card .feature-text {
    color: rgba(224, 226, 236, 0.68) !important;
    font-size: 10px !important;
    line-height: 1.3 !important;
}

.feature-info-btn {
    border-color: rgba(242, 80, 161, 0.22) !important;
    background: rgba(242, 39, 134, 0.07) !important;
    color: #e989b6 !important;
    box-shadow: none !important;
}

.feature-info-panel {
    border-color: rgba(242, 80, 161, 0.14) !important;
    background: rgba(7, 8, 20, 0.84) !important;
    color: rgba(220, 222, 234, 0.66) !important;
    box-shadow: none !important;
}

.pricing-btn {
    min-height: 40px !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(245, 245, 250, 0.78) !important;
    box-shadow: none !important;
    transform: none !important;
}

.pricing-card.featured .pricing-btn {
    border-color: rgba(255, 194, 108, 0.2) !important;
    background: linear-gradient(145deg, #d71f79, #9c185f) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(151, 13, 91, 0.22) !important;
}

/* Nickname and profile utility cards */
#nicknameEditScreen .nickname-current,
#nicknameEditScreen .nickname-edit-form {
    padding: 14px !important;
    border: 1px solid var(--product-border) !important;
    border-radius: 16px !important;
    background: rgba(17, 19, 40, 0.88) !important;
    box-shadow: none !important;
}

#nicknameEditScreen .nickname-current h3,
#nicknameEditScreen .nickname-edit-form h3 {
    color: rgba(250, 250, 253, 0.9) !important;
    font-size: 13px !important;
    text-shadow: none !important;
}

/* Sound modal is injected with its own stylesheet; important overrides keep it on-system. */
#soundSettingsModal .sound-settings-modal {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 88% 0%, rgba(124, 91, 255, 0.1), transparent 34%),
        #111329 !important;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46) !important;
}

#soundSettingsModal .sound-option,
#soundSettingsModal .sound-setting-row {
    border-color: rgba(255, 255, 255, 0.075) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: none !important;
}

#soundSettingsModal .sound-option.is-selected,
#soundSettingsModal .sound-option.selected {
    border-color: rgba(242, 80, 161, 0.28) !important;
    background: var(--product-accent-soft) !important;
    box-shadow: none !important;
}

#soundSettingsModal .sound-option-item {
    border: 1px solid rgba(255, 255, 255, 0.075) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: none !important;
}

#soundSettingsModal .sound-option-item.selected {
    border-color: rgba(242, 80, 161, 0.3) !important;
    background: rgba(242, 39, 134, 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(242, 80, 161, 0.04) !important;
}

#soundSettingsModal .sound-option-item.selected .sound-name,
#soundSettingsModal .sound-option-item.selected .sound-check {
    color: #eb84b5 !important;
}

#soundSettingsModal .sound-play-btn {
    background: rgba(255, 255, 255, 0.055) !important;
    color: rgba(230, 231, 240, 0.62) !important;
    box-shadow: none !important;
}

#soundSettingsModal .sound-btn-save {
    border: 1px solid rgba(255, 107, 174, 0.26) !important;
    background: linear-gradient(145deg, #ef2381 0%, #c51676 62%, #94145f 100%) !important;
    color: #fff !important;
    box-shadow: none !important;
}

#soundSettingsModal .sound-btn-cancel {
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.045) !important;
    color: rgba(236, 237, 245, 0.75) !important;
    box-shadow: none !important;
}

@media (max-width: 380px) {
    .hamburger-menu-content {
        width: min(88vw, 300px) !important;
    }

    .modal,
    .language-modal,
    #emailAuthModal,
    #comAuthChoiceModal {
        padding: 7px !important;
    }

    .modal-content,
    .language-modal-content,
    #emailAuthModal > div,
    #comAuthChoiceModal > div {
        border-radius: 17px !important;
    }

    .premium-modal .modal-header {
        padding: 11px 12px !important;
    }

    .pricing-card {
        padding: 10px !important;
    }

    .pricing-card .feature-item {
        min-height: 28px;
        padding: 4px 6px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hamburger-menu-content,
    .modal-content,
    .language-modal-content,
    .pricing-card,
    .product-state,
    #browseAds .profile-card,
    #browseAds .ad-card {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}

/* Commercial Premium entry: richer than utility rows, still below the two
   primary actions in hierarchy. */
#mainMenu .main-premium-card {
    position: relative;
    isolation: isolate;
    min-height: 70px;
    overflow: hidden;
    padding: 9px 11px;
    border-color: rgba(236, 183, 103, 0.36);
    border-radius: 16px;
    background-color: #0b0c1b;
    background-image:
        radial-gradient(circle at 10% 50%, rgba(246, 188, 91, 0.11), transparent 28%),
        linear-gradient(
            90deg,
            rgba(9, 10, 25, 0.88) 0%,
            rgba(12, 10, 29, 0.64) 48%,
            rgba(20, 12, 37, 0.31) 70%,
            rgba(20, 12, 37, 0.08) 100%
        ),
        url("/webapp/images/premium-access-card-v1.webp");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    box-shadow:
        inset 0 1px 0 rgba(255, 244, 209, 0.07),
        0 0 0 1px rgba(139, 76, 188, 0.12),
        0 13px 30px rgba(0, 0, 0, 0.24),
        0 0 22px rgba(151, 67, 196, 0.14);
}

#mainMenu .main-premium-card > * {
    position: relative;
    z-index: 1;
}

#mainMenu .main-premium-mark {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(246, 200, 105, 0.36);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(93, 44, 109, 0.94), rgba(30, 23, 52, 0.92));
    color: #ffd979;
    box-shadow:
        inset 0 1px 0 rgba(255, 245, 204, 0.13),
        0 0 16px rgba(227, 158, 80, 0.20);
    backdrop-filter: blur(5px);
}

#mainMenu .main-premium-mark svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.55;
}

#mainMenu .main-premium-copy {
    margin-left: 10px;
}

#mainMenu .main-premium-copy strong {
    color: rgba(255, 237, 200, 0.98);
    font-size: 14px;
    font-weight: 820;
}

#mainMenu .main-premium-copy span {
    max-width: 250px;
    margin-top: 2px;
    overflow: hidden;
    color: rgba(225, 219, 232, 0.55);
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mainMenu .main-premium-cta {
    position: static;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 33px;
    margin-left: 10px;
    padding: 6px 12px;
    gap: 7px;
    border-color: rgba(255, 223, 242, 0.34);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(213, 69, 145, 0.96), rgba(138, 84, 226, 0.96));
    color: #fff8fc;
    font-size: 10.5px;
    font-weight: 820;
    letter-spacing: 0.1px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        0 8px 18px rgba(165, 54, 133, 0.28);
    backdrop-filter: blur(6px);
}

#mainMenu .main-premium-cta::after {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    border-top: 1.4px solid currentColor;
    border-right: 1.4px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.75;
}

#mainMenu .main-premium-gem {
    display: none;
}

@media (max-width: 380px) {
    #mainMenu .main-premium-card {
        min-height: 62px;
        padding: 8px 9px;
    }

    #mainMenu .main-premium-mark {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    #mainMenu .main-premium-copy {
        margin-left: 8px;
    }

    #mainMenu .main-premium-copy strong {
        font-size: 12px;
    }

    #mainMenu .main-premium-copy span {
        max-width: 142px;
        font-size: 9px;
    }

    #mainMenu .main-premium-cta {
        min-height: 30px;
        margin-left: 7px;
        padding: 4px 8px;
        font-size: 9px;
    }
}

/* Final Premium badge override: keep the shared Premium crown on every surface. */
.pro-badge,
.ad-card .pro-badge,
.profile-card .pro-badge,
.ad-author-row .pro-badge,
.profile-author-row .pro-badge,
.chat-request-card .pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid rgba(221, 144, 203, 0.24);
    border-radius: 8px;
    background: rgba(47, 28, 66, 0.82);
    color: #dda4cf;
    line-height: 1;
    text-shadow: none;
    filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: none;
}

.pro-badge .product-pro-crown {
    width: 15px;
    height: 15px;
    stroke-width: 1.45;
}

.world-chat-pro-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 2px;
    border: 1px solid rgba(221, 144, 203, 0.2);
    border-radius: 7px;
    background: rgba(47, 28, 66, 0.72);
    color: #dda4cf;
    font-size: 0;
}

.world-chat-pro-badge .product-pro-crown {
    width: 13px;
    height: 13px;
}

/* Final dashboard artwork override: outrank legacy action-card resets. */
#mainMenu .main-city-panel .user-location {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.6) 54%,
            rgba(8, 9, 25, 0.24) 77%,
            rgba(8, 9, 25, 0.02) 100%
        ),
        url("/webapp/images/city-community-card-v2.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center, right 52% !important;
    background-size: 100% 100%, auto 210% !important;
}

#mainMenu .main-menu-action.main-menu-browse {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.58) 48%,
            rgba(8, 9, 25, 0.24) 72%,
            rgba(8, 9, 25, 0.04) 100%
        ),
        url("/webapp/images/main-browse-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center, right center !important;
    background-size: 100% 100%, cover !important;
}

#mainMenu .main-menu-action.main-menu-create {
    background-color: #0a0b1d !important;
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.85) 0%,
            rgba(8, 9, 25, 0.6) 44%,
            rgba(8, 9, 25, 0.24) 72%,
            rgba(8, 9, 25, 0.04) 100%
        ),
        url("/webapp/images/main-create-card-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center, right center !important;
    background-size: 100% 100%, cover !important;
}

/* Bottom navigation atmosphere: neutral artwork that works for every active tab. */
.primary-bottom-nav {
    isolation: isolate;
    overflow: hidden;
    border-top-color: rgba(191, 137, 213, 0.15) !important;
    background-color: #070819 !important;
    background-image:
        linear-gradient(
            180deg,
            rgba(7, 8, 24, 0.38) 0%,
            rgba(7, 8, 22, 0.64) 52%,
            rgba(5, 6, 18, 0.84) 100%
        ),
        url("/webapp/images/bottom-nav-ambient-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center, center !important;
    background-size: 100% 100%, cover !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 -14px 36px rgba(0, 0, 0, 0.34) !important;
}

.primary-bottom-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(6, 7, 20, 0.03) 0%,
        rgba(6, 7, 20, 0.2) 34%,
        rgba(6, 7, 20, 0.2) 66%,
        rgba(6, 7, 20, 0.03) 100%
    );
}

.primary-bottom-nav .primary-nav-item {
    z-index: 1;
}

.primary-bottom-nav .primary-nav-item.is-active {
    min-height: 44px;
    margin: 3px 4px;
    padding: 3px 2px;
    border: 1px solid rgba(242, 80, 161, 0.09);
    border-radius: 11px;
    background: rgba(51, 16, 49, 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.018),
        0 6px 15px rgba(0, 0, 0, 0.09);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

@media (prefers-reduced-data: reduce) {
    .primary-bottom-nav {
        background-image: none !important;
    }

    #mainMenu .main-menu-browse {
        background-image: linear-gradient(145deg, #c91c70 0%, #8d145f 100%) !important;
    }

    #mainMenu .main-menu-create {
        background-image: linear-gradient(145deg, #21163f 0%, #111329 100%) !important;
    }
}

/* UI symbol normalization: deterministic line icons instead of platform emoji. */
.ui-symbol-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.05em;
    height: 1.05em;
    color: currentColor;
    line-height: 1;
    vertical-align: -0.14em;
}

.ui-symbol-icon .ui-symbol-icon-svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke-width: 1.65;
}

button .ui-symbol-icon,
a .ui-symbol-icon,
label .ui-symbol-icon {
    margin-right: 0.35em;
}

.faq-modal .modal-header h2,
.faq-content .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-modal .modal-header h2 > .ui-symbol-icon:first-child,
.faq-content .modal-header h2 > .ui-symbol-icon:first-child {
    width: 30px;
    height: 30px;
    padding: 6px;
    margin: 0;
    border: 1px solid rgba(202, 130, 183, 0.2);
    border-radius: 10px;
    background: rgba(55, 31, 75, 0.58);
    color: #d68bbb;
}

.faq-section h3 > .ui-symbol-icon:first-child {
    width: 27px;
    height: 27px;
    padding: 5px;
    margin: 0 2px 0 0;
    border: 1px solid rgba(140, 112, 196, 0.2);
    border-radius: 9px;
    background: rgba(37, 28, 65, 0.56);
    color: #be9bdd;
}

.faq-section li > .ui-symbol-icon:first-child,
.faq-section .faq-tip > .ui-symbol-icon:first-child {
    width: 16px;
    height: 16px;
    margin: 0 5px 0 0;
    color: #b997d8;
}

.faq-modal .modal-footer .ui-symbol-icon {
    width: 17px;
    height: 17px;
    margin: 0 0 0 7px;
    order: 2;
}

#browseAds .current-location-compact > .location-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 8px;
    border: 1px solid rgba(150, 112, 207, 0.2);
    border-radius: 11px;
    background: rgba(43, 31, 73, 0.56);
    color: #c1a0e3;
    filter: none;
}

#browseAds .current-location-compact > .location-icon .ui-symbol-icon {
    width: 100%;
    height: 100%;
    margin: 0;
}

#browseAds #filterLabel,
#browseLuckyBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#browseAds #filterLabel .ui-symbol-icon,
#browseLuckyBtn .ui-symbol-icon {
    width: 17px;
    height: 17px;
    margin-right: 7px;
}

.hamburger-icon > .ui-symbol-icon,
.choice-icon > .ui-symbol-icon,
.neon-icon > .ui-symbol-icon,
.input-icon > .ui-symbol-icon,
.menu-icon > .ui-symbol-icon {
    width: 100%;
    height: 100%;
    margin: 0;
}

.faq-btn > .ui-symbol-icon,
.world-chat-faq-btn > .ui-symbol-icon,
.loneliness-map-help-btn > .ui-symbol-icon {
    width: 15px;
    height: 15px;
    margin-right: 5px;
}

@media (max-width: 430px) {
    #browseAds > .header {
        grid-template-columns: minmax(72px, max-content) minmax(0, 1fr) 36px !important;
        column-gap: 6px !important;
    }

    .screen:not(#mainMenu) .faq-btn,
    .screen:not(#mainMenu) .world-chat-faq-btn,
    .screen:not(#mainMenu) .loneliness-map-help-btn {
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        padding: 0 !important;
        overflow: hidden;
        color: transparent !important;
        font-size: 0 !important;
        white-space: nowrap !important;
    }

    .screen:not(#mainMenu) .faq-btn > .ui-symbol-icon,
    .screen:not(#mainMenu) .world-chat-faq-btn > .ui-symbol-icon,
    .screen:not(#mainMenu) .loneliness-map-help-btn > .ui-symbol-icon {
        width: 17px;
        height: 17px;
        margin: 0;
        color: #ff79b6;
    }
}

/* Replace the legacy cartoon loading.gif with a restrained product loader. */
@keyframes product-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner:empty,
.loading-spinner > .spinner {
    display: block !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border: 2px solid rgba(171, 136, 207, 0.2) !important;
    border-top-color: #d86fa8 !important;
    border-right-color: rgba(128, 191, 218, 0.62) !important;
    border-radius: 50% !important;
    background: none !important;
    box-shadow: 0 0 18px rgba(185, 91, 151, 0.12) !important;
    animation: product-loader-spin 0.8s linear infinite !important;
}

.loading-spinner:empty {
    margin: 24px auto 14px !important;
}

/* Generated artwork for the random-discovery action. */
#browseLuckyBtn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(176, 117, 210, 0.28) !important;
    background-color: #090a1d !important;
    background-image:
        linear-gradient(
            90deg,
            rgba(8, 9, 25, 0.94) 0%,
            rgba(8, 9, 25, 0.83) 43%,
            rgba(12, 10, 33, 0.56) 70%,
            rgba(15, 10, 39, 0.34) 100%
        ),
        url("/webapp/images/lucky-discovery-button-v1.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center, right center !important;
    background-size: 100% 100%, cover !important;
    color: rgba(250, 248, 255, 0.96) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 8px 22px rgba(0, 0, 0, 0.22) !important;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease !important;
}

#browseLuckyBtn:hover {
    border-color: rgba(207, 126, 218, 0.42) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 26px rgba(10, 3, 24, 0.32),
        0 0 18px rgba(159, 82, 190, 0.1) !important;
    transform: translateY(-1px);
}

#browseLuckyBtn:active {
    transform: translateY(0);
}

/* Dedicated location-switch control: deterministic SVG instead of an empty dynamic placeholder. */
#browseAds .current-location-compact .browse-location-change-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0 !important;
    border: 1px solid rgba(169, 128, 218, 0.27) !important;
    border-radius: 13px !important;
    background:
        radial-gradient(circle at 70% 25%, rgba(220, 105, 179, 0.1), transparent 48%),
        rgba(37, 29, 63, 0.62) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 7px 18px rgba(0, 0, 0, 0.18) !important;
}

#browseAds .current-location-compact .browse-location-change-icon {
    display: block;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

#browseAds .current-location-compact .browse-location-change-btn:hover {
    border-color: rgba(221, 117, 183, 0.42) !important;
    background:
        radial-gradient(circle at 70% 25%, rgba(220, 105, 179, 0.14), transparent 50%),
        rgba(45, 32, 72, 0.72) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 8px 20px rgba(0, 0, 0, 0.22),
        0 0 16px rgba(179, 94, 191, 0.08) !important;
}

/* Compact chat overview and a dedicated illustrated empty state. */
#myChats > .tabs-container {
    gap: 4px !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding: 4px !important;
}

#myChats .tab-btn {
    min-height: 66px !important;
    padding: 7px 4px !important;
    gap: 3px !important;
}

#myChats .tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    color: rgba(206, 208, 224, 0.58);
    font-size: 0;
    line-height: 1;
    filter: none;
}

#myChats .tab-icon > .ui-symbol-icon {
    width: 22px;
    height: 22px;
    margin: 0;
}

#myChats .tab-btn.active .tab-icon {
    color: #ef78b0;
}

#myChats .tab-label {
    font-size: 10.5px !important;
    line-height: 1.15 !important;
    text-shadow: none !important;
}

#myChats > .chats-container {
    margin-top: 0 !important;
    padding: 0 !important;
}

#myChats .empty-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 342px);
    min-height: 0;
    margin: 16px auto;
    padding: 23px 20px 21px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(18, 20, 42, 0.91), rgba(10, 11, 27, 0.94));
    color: var(--product-text);
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

#myChats .empty-chats-illustration {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 12px;
    object-fit: contain;
}

#myChats .empty-chats h3 {
    margin: 0 0 7px;
    color: rgba(250, 250, 253, 0.94);
    font-size: 17px;
    font-weight: 830;
    line-height: 1.2;
    text-shadow: none;
}

#myChats .empty-chats p {
    max-width: 280px;
    margin: 0;
    color: rgba(220, 221, 232, 0.61);
    font-size: 12px;
    line-height: 1.5;
    text-shadow: none;
}

#myChats .empty-chats--error .empty-chats-illustration {
    filter: saturate(0.62);
    opacity: 0.76;
}

@media (max-width: 380px) {
    #myChats .tab-btn {
        min-height: 62px !important;
        padding: 6px 3px !important;
    }

    #myChats .tab-label {
        font-size: 9.5px !important;
    }

    #myChats .empty-chats {
        width: calc(100% - 8px);
        padding: 20px 16px 19px;
    }
}

/* Centered profile status labels: ranking and pinning share one restrained system. */
#browseAds .top-badge,
#myAds .top-badge {
    top: -10px !important;
    right: auto !important;
    left: 50% !important;
    min-width: 66px;
    min-height: 22px;
    padding: 3px 11px !important;
    justify-content: center !important;
    border-radius: 999px !important;
    transform: translateX(-50%) !important;
    font-size: 9px !important;
    font-weight: 820 !important;
    line-height: 1 !important;
    letter-spacing: 0.045em !important;
    box-sizing: border-box;
}

#browseAds .top-1 .top-badge,
#myAds .top-1 .top-badge {
    border-color: rgba(255, 134, 188, 0.24) !important;
    background: linear-gradient(135deg, #bd236e, #7d184f) !important;
    color: #ffe2ef !important;
    box-shadow: 0 7px 17px rgba(116, 14, 67, 0.25) !important;
}

#browseAds .top-2 .top-badge,
#myAds .top-2 .top-badge {
    border-color: rgba(235, 190, 111, 0.24) !important;
    background: linear-gradient(135deg, #735529, #49351f) !important;
    color: #f5ddb0 !important;
    box-shadow: 0 7px 17px rgba(74, 48, 15, 0.24) !important;
}

#browseAds .top-3 .top-badge,
#myAds .top-3 .top-badge {
    border-color: rgba(124, 188, 158, 0.22) !important;
    background: linear-gradient(135deg, #315b4c, #213e35) !important;
    color: #c9eadb !important;
    box-shadow: 0 7px 17px rgba(21, 65, 48, 0.22) !important;
}

#browseAds .top-1,
#myAds .top-1 {
    border-color: rgba(204, 58, 126, 0.28) !important;
}

#browseAds .top-2,
#myAds .top-2 {
    border-color: rgba(177, 132, 65, 0.24) !important;
}

#browseAds .top-3,
#myAds .top-3 {
    border-color: rgba(75, 133, 108, 0.23) !important;
}

#browseAds .pinned-badge,
#myAds .pinned-badge {
    top: -10px !important;
    right: 12px !important;
    left: auto !important;
    min-height: 22px;
    max-width: min(132px, calc(100% - 24px));
    padding: 3px 9px !important;
    gap: 5px !important;
    border: 1px solid rgba(194, 147, 220, 0.22) !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, rgba(63, 44, 85, 0.98), rgba(38, 29, 59, 0.98)) !important;
    color: #d9bce9 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0.025em !important;
    transform: none !important;
    box-shadow: 0 7px 17px rgba(0, 0, 0, 0.24) !important;
}

#browseAds .pinned-badge .product-icon-svg,
#myAds .pinned-badge .product-icon-svg {
    width: 12px;
    height: 12px;
    stroke-width: 1.75;
}

#browseAds .is-pinned:not(.top-1):not(.top-2):not(.top-3) > .pinned-badge,
#myAds .is-pinned:not(.top-1):not(.top-2):not(.top-3) > .pinned-badge {
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

@media (max-width: 380px) {
    #browseAds .top-badge,
    #myAds .top-badge {
        min-width: 62px;
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    #browseAds .pinned-badge,
    #myAds .pinned-badge {
        right: 9px !important;
        max-width: 116px;
        padding-right: 7px !important;
        padding-left: 7px !important;
    }
}

/* Create profile goals: one compact height for one- and two-line choices. */
#createAd #step3 .goal-select {
    gap: 8px;
    align-items: stretch;
}

#createAd #step3 .goal-select .goal-btn {
    box-sizing: border-box;
    width: min(240px, 100%);
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 4px 10px !important;
    line-height: 1.15 !important;
    white-space: normal;
    text-align: center;
    overflow-wrap: break-word;
}

#createAd #step3 .goal-select .goal-btn .product-icon-svg,
#createAd #step3 .goal-select .goal-btn > svg {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
}

/* Shared product dialog system for dynamic WebApp modals. */
.product-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 18px;
    overflow: hidden auto;
    background:
        radial-gradient(circle at 50% 38%, rgba(93, 42, 112, 0.13), transparent 42%),
        rgba(2, 3, 12, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.product-dialog-card {
    width: min(100%, 390px);
    max-height: calc(100dvh - 36px);
    box-sizing: border-box;
    padding: 22px;
    overflow: hidden auto;
    border: 1px solid rgba(190, 126, 176, 0.18);
    border-radius: 22px;
    background:
        linear-gradient(155deg, rgba(24, 25, 50, 0.98), rgba(11, 12, 30, 0.99)),
        #111326;
    color: rgba(248, 248, 252, 0.92);
    text-align: center;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
}

.product-dialog-card--compact {
    width: min(100%, 360px);
}

.product-dialog-hero {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    place-items: center;
    border: 1px solid rgba(176, 125, 221, 0.22);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(107, 67, 155, 0.22), rgba(57, 39, 91, 0.19));
    color: #c8a3e6;
}

.product-dialog-hero--warning {
    border-color: rgba(236, 112, 153, 0.22);
    background: linear-gradient(145deg, rgba(137, 47, 87, 0.22), rgba(78, 31, 61, 0.2));
    color: #e99ab9;
}

.product-dialog-hero .product-icon-svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.65;
}

.product-dialog-heading {
    margin: 0;
    color: rgba(252, 248, 252, 0.95);
    font-size: 18px;
    font-weight: 830;
    line-height: 1.22;
    text-shadow: none;
}

.product-dialog-copy {
    margin: 12px 0 15px;
    color: rgba(224, 223, 234, 0.67);
    font-size: 13px;
    line-height: 1.55;
}

.product-dialog-copy b {
    color: rgba(244, 239, 247, 0.86);
    font-weight: 760;
}

.product-dialog-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 15px;
    padding: 11px 12px;
    border: 1px solid rgba(194, 132, 221, 0.17);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(78, 47, 111, 0.2), rgba(46, 31, 74, 0.15));
    color: #cbb6e8;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
}

.product-dialog-notice-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: rgba(144, 77, 140, 0.18);
    color: #dd98c4;
}

.product-dialog-notice-icon .product-icon-svg {
    width: 18px;
    height: 18px;
}

.product-dialog-actions {
    display: grid;
    gap: 8px;
    margin-top: 15px;
}

.product-dialog-button {
    display: inline-flex;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    font: inherit;
    font-size: 13px;
    font-weight: 790;
    line-height: 1.2;
    cursor: pointer;
    transition:
        translate 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease,
        filter 150ms ease;
}

.product-dialog-button .product-icon-svg {
    width: 17px;
    height: 17px;
}

.product-dialog-button--primary {
    border-color: rgba(236, 91, 159, 0.34);
    background: linear-gradient(135deg, #c31a72, #8e1c67);
    color: #fff;
    box-shadow: 0 10px 24px rgba(128, 17, 83, 0.22);
}

.product-dialog-button--secondary {
    border-color: rgba(148, 119, 219, 0.24);
    background: rgba(107, 79, 169, 0.15);
    color: #d8ccf2;
}

.product-dialog-button--tertiary {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(228, 225, 235, 0.58);
}

@media (hover: hover) and (pointer: fine) {
    .product-dialog-button:hover {
        translate: 0 -1px;
        filter: brightness(1.06);
    }
}

.product-dialog-button:active {
    translate: 0 1px;
    filter: brightness(0.96);
}

.product-dialog-intro {
    margin: 8px 0 13px;
    color: rgba(224, 223, 234, 0.65);
    font-size: 12.5px;
    line-height: 1.45;
}

.world-chat-rule-list {
    display: grid;
    gap: 8px;
    text-align: left;
}

.world-chat-rule-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.world-chat-rule-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(112, 75, 157, 0.15);
    color: #c2a1dd;
}

.world-chat-rule-icon .product-icon-svg {
    width: 17px;
    height: 17px;
}

.world-chat-rule-item strong,
.world-chat-rule-item small {
    display: block;
}

.world-chat-rule-item strong {
    color: rgba(247, 242, 248, 0.86);
    font-size: 12.5px;
    font-weight: 770;
    line-height: 1.35;
}

.world-chat-rule-item small {
    margin-top: 3px;
    color: rgba(208, 207, 221, 0.48);
    font-size: 10.5px;
    line-height: 1.35;
}

.world-chat-rule-outcome {
    margin-top: 10px;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(242, 80, 161, 0.075);
    color: rgba(225, 218, 233, 0.7);
    font-size: 12px;
    line-height: 1.45;
}

.world-chat-rule-outcome b {
    color: #e6a7c7;
}

.world-chat-rule-safety {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 10px;
    color: rgba(218, 218, 231, 0.57);
    font-size: 11.5px;
    line-height: 1.4;
}

.world-chat-rule-safety .product-icon-svg {
    width: 15px;
    height: 15px;
    color: #b698ce;
}

@media (max-width: 380px) {
    .product-dialog-overlay {
        padding: 12px;
    }

    .product-dialog-card {
        max-height: calc(100dvh - 24px);
        padding: 18px;
        border-radius: 19px;
    }

    .product-dialog-hero {
        width: 44px;
        height: 44px;
        margin-bottom: 11px;
    }

    .product-dialog-heading {
        font-size: 17px;
    }

    .product-dialog-copy {
        margin-top: 10px;
        font-size: 12px;
    }

    .product-dialog-button {
        min-height: 44px;
    }
}

/* World Chat composer: one grid and one control rhythm. */
#worldChatScreen {
    --world-chat-control-height: 42px;
    --world-chat-side-control-width: 42px;
}

#worldChatScreen .world-chat-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) var(--world-chat-side-control-width);
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px 6px;
}

#worldChatScreen .world-chat-tab,
#worldChatScreen .world-chat-font-size-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0 !important;
    height: var(--world-chat-control-height);
    min-height: var(--world-chat-control-height) !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border-radius: 11px !important;
    line-height: 1;
}

#worldChatScreen .world-chat-font-size-btn {
    width: var(--world-chat-side-control-width);
    padding: 0 !important;
}

#worldChatScreen .world-chat-input-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--world-chat-side-control-width);
    align-items: stretch;
    gap: 8px;
    padding: 6px 10px 10px;
}

#worldChatScreen .world-chat-input-wrapper {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: var(--world-chat-control-height);
    min-height: var(--world-chat-control-height);
    padding: 0 11px;
    box-sizing: border-box;
    border-radius: 11px !important;
}

#worldChatScreen .world-chat-input-wrapper:focus-within {
    border-color: rgba(242, 80, 161, 0.46) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

#worldChatScreen .world-chat-input-wrapper .world-chat-input,
#worldChatScreen .world-chat-input-wrapper .world-chat-input:focus {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#worldChatScreen .world-chat-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    line-height: 1;
}

#worldChatScreen .world-chat-char-counter {
    min-width: 38px;
    line-height: 1;
}

#worldChatScreen .world-chat-send-btn {
    width: var(--world-chat-side-control-width);
    min-width: var(--world-chat-side-control-width);
    height: var(--world-chat-control-height);
    min-height: var(--world-chat-control-height);
    margin: 0;
    padding: 0 !important;
    align-self: stretch;
    border-radius: 11px !important;
}

#worldChatScreen .world-chat-send-btn .product-icon-svg {
    width: 19px;
    height: 19px;
}

@media (max-width: 380px) {
    #worldChatScreen {
        --world-chat-control-height: 40px;
        --world-chat-side-control-width: 40px;
    }

    #worldChatScreen .world-chat-tabs {
        gap: 6px;
        padding: 6px 8px 5px;
    }

    #worldChatScreen .world-chat-input-container {
        gap: 6px;
        padding: 5px 8px 8px;
    }

    #worldChatScreen .world-chat-input-wrapper {
        gap: 6px;
        padding: 0 9px;
    }
}

/* Compact World Chat loading state. */
#worldChatScreen .world-chat-messages > .world-chat-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0 !important;
    margin: auto 0;
    padding: 18px 16px !important;
    box-sizing: border-box;
    color: var(--product-muted) !important;
}

#worldChatScreen .world-chat-loading-state .neon-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 0 11px !important;
    color: #b98cce;
    opacity: 0.78;
    filter: none !important;
}

#worldChatScreen .world-chat-loading-state .neon-icon > .ui-symbol-icon {
    width: 48px;
    height: 48px;
}

#worldChatScreen .world-chat-loading-state p {
    margin: 0 !important;
    color: rgba(214, 211, 224, 0.6) !important;
    font-size: 13px !important;
    line-height: 1.4;
}

/* World Chat help is an icon-only action; keep the generated SVG centered. */
#worldChatScreen .world-chat-faq-btn > .ui-symbol-icon {
    width: 17px;
    height: 17px;
    margin: 0;
}

/* Location setup artwork: a compact region-switch illustration instead of a stretched globe. */
#locationSetup .location-setup-art {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    margin: 0 auto 12px;
    color: #d982d7;
}

#locationSetup .location-setup-art svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

#locationSetup .location-setup-art-frame {
    fill: rgba(38, 25, 66, 0.34);
    stroke: rgba(174, 121, 211, 0.42);
    stroke-width: 1.8;
}

#locationSetup .location-setup-art-route,
#locationSetup .location-setup-art-arrow,
#locationSetup .location-setup-art-pin,
#locationSetup .location-setup-art-pin-core,
#locationSetup .location-setup-art-spark,
#locationSetup .location-setup-art-dash {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#locationSetup .location-setup-art-route {
    stroke: rgba(191, 133, 219, 0.62);
    stroke-width: 2;
}

#locationSetup .location-setup-art-arrow {
    stroke: #c789dc;
    stroke-width: 2.2;
}

#locationSetup .location-setup-art-pin {
    fill: rgba(232, 91, 169, 0.09);
    stroke: #e37bbb;
    stroke-width: 2.4;
}

#locationSetup .location-setup-art-pin-core {
    fill: rgba(10, 10, 27, 0.82);
    stroke: #d89ae5;
    stroke-width: 2.2;
}

#locationSetup .location-setup-art-spark {
    stroke: #ec82c4;
    stroke-width: 2;
}

#locationSetup .location-setup-art-dash {
    stroke: rgba(117, 104, 191, 0.72);
    stroke-width: 2;
}

@media (max-width: 380px) {
    #locationSetup .location-setup-art {
        width: 96px;
        height: 96px;
        margin-bottom: 9px;
    }
}

/* Shared connection-break illustration for product loading errors. */
.product-state--error .product-state-connection-art {
    display: block;
    width: 84px;
    height: 58px;
    margin: 0 0 12px;
    overflow: visible;
}

.product-state--error .product-connection-art-frame {
    fill: rgba(43, 27, 69, 0.34);
    stroke: rgba(177, 121, 205, 0.32);
    stroke-width: 1.5;
}

.product-state--error .product-connection-art-cable,
.product-state--error .product-connection-art-plug,
.product-state--error .product-connection-art-prongs,
.product-state--error .product-connection-art-break,
.product-state--error .product-connection-art-spark {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-state--error .product-connection-art-cable {
    stroke: rgba(185, 137, 211, 0.54);
    stroke-width: 2.2;
}

.product-state--error .product-connection-art-plug {
    fill: rgba(228, 96, 163, 0.07);
    stroke: #d77db9;
    stroke-width: 2;
}

.product-state--error .product-connection-art-prongs {
    stroke: #d99bcf;
    stroke-width: 2.2;
}

.product-state--error .product-connection-art-break {
    stroke: #ff829f;
    stroke-width: 2;
}

.product-state--error .product-connection-art-signal {
    fill: #f07cab;
    opacity: 0.82;
}

.product-state--error .product-connection-art-spark {
    stroke: rgba(224, 119, 188, 0.78);
    stroke-width: 1.8;
}

/* The logo artwork already carries its own light; avoid an extra red ring around it. */
#mainMenu .main-brand-avatar {
    border: 0 !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}

/* Narrow-screen polish: keep utility headers and inline SVG icons stable at 320px. */
#nicknameEditScreen .nickname-input-wrapper-page .input-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    right: 13px;
    color: rgba(214, 139, 187, 0.72);
    font-size: 0;
}

#nicknameEditScreen .nickname-input-wrapper-page .input-icon > .ui-symbol-icon {
    width: 22px;
    height: 22px;
}

.faq-section h3 {
    justify-content: flex-start;
    text-align: left !important;
}

@media (max-width: 350px) {
    .screen:not(#mainMenu) > .header:has(> h2),
    .screen:not(#mainMenu) > .header:has(> h3) {
        grid-template-columns: 66px minmax(0, 1fr) 34px;
        column-gap: 4px;
        padding-right: 9px !important;
        padding-left: 9px !important;
    }

    .screen:not(#mainMenu) > .header h2,
    .screen:not(#mainMenu) > .header h3 {
        min-width: 0;
        font-size: 14px !important;
        white-space: nowrap;
        overflow: hidden;
        overflow-wrap: normal;
        hyphens: none;
        text-overflow: ellipsis;
    }

    .screen:not(#mainMenu) > .header h2 > .ui-symbol-icon:first-child,
    .screen:not(#mainMenu) > .header h3 > .ui-symbol-icon:first-child {
        display: none;
    }

    .screen:not(#mainMenu) .back-btn {
        padding-inline: 8px !important;
        font-size: 10px !important;
    }

    #browseAds .profile-actions-row {
        gap: 5px !important;
        padding-right: 0 !important;
    }

    #browseAds .contact-write-cta {
        flex: 1 1 68px !important;
        max-width: none !important;
        gap: 3px !important;
        padding-right: 5px !important;
        padding-left: 5px !important;
    }

    #browseAds .contact-write-cta .contact-icon {
        width: 14px !important;
        height: 14px !important;
        flex: 0 0 14px !important;
    }

    #browseAds .contact-write-cta .contact-text {
        overflow: visible !important;
        font-size: 10px !important;
        text-overflow: clip !important;
    }
}

/* Все кнопки-карточки главного меню несут общий класс .main-card.
   Все ОБЩИЕ эффекты (яркость картинки, свечение и подъём на hover) вешаются
   только на него — тогда ни одна кнопка не останется в стороне.
   Индивидуальные фон-картинки/градиенты у каждой карточки остаются своими. */

/* Яркость/насыщенность арта. Отключается в энергосберегающем режиме
   (html.low-power-ui): постоянный filter на 10 карточках лишний для
   слабых Chrome-74 Android. */
html:not(.low-power-ui) #mainMenu .main-card {
    filter: brightness(1.14) saturate(1.1);
}

@media (hover: hover) {
    #mainMenu .main-card {
        transition: box-shadow 0.25s ease, transform 0.2s ease;
    }

    #mainMenu .main-card:hover {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.22),
            0 0 24px rgba(255, 255, 255, 0.16),
            0 14px 34px rgba(0, 0, 0, 0.3) !important;
        transform: translateY(-1px);
    }

    html:not(.low-power-ui) #mainMenu .main-card:hover {
        filter: brightness(1.22) saturate(1.15);
    }
}

/* Уважаем prefers-reduced-motion: без анимации перехода/подъёма. */
@media (prefers-reduced-motion: reduce) {
    #mainMenu .main-card {
        transition: none;
    }

    #mainMenu .main-card:hover {
        transform: none;
    }
}

/* Press-state карточек главного меню: явный «нажатый» отклик на касание.
   hover-эффекты выше живут в @media (hover: hover) и на телефоне не работают —
   :active остаётся единственным подтверждением тапа по карточке. */
#mainMenu .main-card {
    transition: box-shadow 0.25s ease, transform 0.12s ease, filter 0.15s ease;
}
#mainMenu .main-card:active {
    transform: scale(0.965);
}
html:not(.low-power-ui) #mainMenu .main-card:active {
    filter: brightness(1.32) saturate(1.18);
}
@media (prefers-reduced-motion: reduce) {
    #mainMenu .main-card {
        transition: none;
    }
    #mainMenu .main-card:active {
        transform: none;
    }
}

/* ===== Экран «Профиль» — единый личный кабинет (хаб) ===== */
/* Кнопка «Назад» чуть ниже — не липнет к верхней кромке/вырезу. */
.profile-hub-header {
    padding-top: 10px;
}
.profile-hub-header .back-btn {
    top: auto;
    margin-top: 6px;
}
.profile-hub {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

/* The profile tab gets its own portrait artwork. The dark layers keep every
   localized label readable while preserving the violet figures behind the
   upper account cards; the image is intentionally screen-scoped. */
#myProfileScreen.screen {
    background:
        linear-gradient(180deg, rgba(3, 3, 14, 0.18) 0%, rgba(4, 4, 17, 0.42) 34%, rgba(5, 6, 18, 0.82) 69%, #060712 100%),
        radial-gradient(circle at 72% 27%, rgba(139, 72, 255, 0.12), transparent 42%),
        url('/webapp/images/profile-hub-background-v1.webp') center top / cover no-repeat !important;
}

#myProfileScreen.screen > .profile-hub-header {
    background: linear-gradient(180deg, rgba(6, 6, 20, 0.90), rgba(7, 7, 22, 0.73)) !important;
}

#myProfileScreen .profile-hub {
    position: relative;
    z-index: 1;
}

#myProfileScreen .profile-hub-head,
#myProfileScreen .profile-hub-progress,
#myProfileScreen .profile-hub-status,
#myProfileScreen .profile-hub-tile,
#myProfileScreen .profile-hub-perks,
#myProfileScreen .profile-hub-row {
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    backdrop-filter: blur(14px) saturate(1.12);
}

#myProfileScreen .profile-hub-head {
    padding: 10px 12px;
    border: 1px solid rgba(192, 151, 255, 0.14);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(27, 20, 58, 0.68), rgba(9, 10, 28, 0.62));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 12px 28px rgba(0, 0, 0, 0.20);
}

#myProfileScreen .profile-hub-progress,
#myProfileScreen .profile-hub-tile,
#myProfileScreen .profile-hub-row {
    background: linear-gradient(145deg, rgba(20, 17, 45, 0.72), rgba(9, 10, 27, 0.68));
    border-color: rgba(196, 160, 255, 0.12);
}
.profile-hub-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 2px 2px;
}
.profile-hub-avatar {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #6a4bb0, #c0399a);
    box-shadow: 0 0 18px rgba(151, 82, 213, 0.4);
    overflow: hidden;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.profile-hub-avatar:active { transform: scale(0.96); filter: brightness(1.1); }
.profile-hub-avatar:focus-visible {
    outline: 2px solid rgba(216, 186, 255, 0.95);
    outline-offset: 3px;
}
.profile-hub-id { flex: 1; min-width: 0; }
.profile-hub-nick {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-hub-sub {
    font-size: 12px;
    color: #9a97b5;
    margin-top: 2px;
    min-height: 14px;
}
.profile-hub-nick-btn {
    flex: 0 0 auto;
    font-size: 12px;
    color: #c6a2ff;
    background: rgba(151, 82, 213, 0.14);
    border: 1px solid rgba(198, 162, 255, 0.4);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: filter 0.1s ease, opacity 0.1s ease;
}
.profile-hub-nick-btn:active { filter: brightness(1.15); opacity: 0.9; }

.profile-hub-status {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: linear-gradient(145deg, rgba(62, 52, 112, 0.5), rgba(34, 30, 68, 0.5));
    border: 1px solid rgba(198, 162, 255, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: filter 0.1s ease;
}
.profile-hub-status:active { filter: brightness(1.12); }
.profile-hub-status.is-premium {
    background: linear-gradient(145deg, rgba(90, 70, 30, 0.4), rgba(40, 32, 20, 0.5));
    border-color: rgba(255, 211, 107, 0.45);
}
.profile-hub-status-txt { flex: 1; min-width: 0; display: block; }
.profile-hub-status-title { display: block; font-size: 14px; font-weight: 600; color: #c6a2ff; }
.profile-hub-status.is-premium .profile-hub-status-title { color: #ffd36b; }
.profile-hub-status-sub { display: block; font-size: 11px; color: #9a97b5; margin-top: 2px; }
.profile-hub-status-cta {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #8a3fd0, #c0399a);
    border-radius: 10px;
    padding: 8px 14px;
}
.profile-hub-status-x2 {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #0b0d1e;
    background: linear-gradient(145deg, #ffd36b, #f2a02b);
    border-radius: 9px;
    padding: 5px 9px;
    box-shadow: 0 0 10px rgba(242, 160, 43, 0.35);
}

.profile-hub-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.profile-hub-tile {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.1s ease, background 0.1s ease;
}
.profile-hub-tile:active { filter: brightness(1.2); background: rgba(255, 255, 255, 0.07); }
.profile-hub-tile-num {
    font-size: 19px;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
}
.profile-hub-tile-lbl {
    font-size: 10px;
    color: #9a97b5;
    margin-top: 3px;
}

.profile-hub-progress {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
}
.profile-hub-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: #fff;
    margin-bottom: 8px;
}
.profile-hub-progress-pct { color: #c6a2ff; font-weight: 600; }
.profile-hub-progress.is-complete .profile-hub-progress-pct { color: #7be0a3; }
.profile-hub-progress-track {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.profile-hub-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #8a3fd0, #c0399a);
    transition: width 0.4s ease;
}
.profile-hub-progress.is-complete .profile-hub-progress-fill {
    background: linear-gradient(90deg, #3ea06a, #7be0a3);
}
.profile-hub-progress-hint {
    font-size: 11px;
    color: #9a97b5;
    margin-top: 8px;
}

.profile-hub-perks {
    background: linear-gradient(145deg, rgba(62, 52, 112, 0.4), rgba(34, 30, 68, 0.5));
    border: 1px solid rgba(198, 162, 255, 0.3);
    border-radius: 14px;
    padding: 14px;
}
.profile-hub-perks-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.profile-hub-perks-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.profile-hub-perk {
    font-size: 12px;
    color: #c6a2ff;
    background: rgba(151, 82, 213, 0.16);
    border: 1px solid rgba(198, 162, 255, 0.3);
    border-radius: 8px;
    padding: 5px 10px;
}
.profile-hub-perks-cta {
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #8a3fd0, #c0399a);
    border: none;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: filter 0.1s ease;
}
.profile-hub-perks-cta:active { filter: brightness(1.15); }

.profile-hub-rows { display: flex; flex-direction: column; gap: 8px; }
.profile-hub-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 13px;
    padding: 13px 14px;
    color: #fff;
    cursor: pointer;
    transition: filter 0.1s ease, background 0.1s ease;
}
.profile-hub-row:active { filter: brightness(1.2); background: rgba(255, 255, 255, 0.07); }
.profile-hub-row-ic {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(151, 82, 213, 0.18);
    color: #c6a2ff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-hub-row-lbl { flex: 1; font-size: 14px; }
.profile-hub-row-chev { flex: 0 0 auto; color: #6a6788; font-size: 20px; line-height: 1; }

/* Фото на аватар-кружке профиля (первое фото анкеты). */
.profile-hub-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Глобальный бургер: виден на вкладках нижней навигации (кроме главной), общий неон-стиль. */
/* Глобальный бургер (слева) и скрытие редундантной «Назад» — ТОЛЬКО на мобильной
   ширине: там контент полноширинный и бургер слева уместен, как на главном меню.
   На десктопе контент центрирован узкой колонкой, а fixed-бургер у левого края
   вьюпорта повисает в пустоте → там его не показываем и оставляем кнопку «Назад». */
@media (max-width: 767px) {
    html.show-global-hamburger .global-hamburger-menu {
        display: flex;
        box-shadow:
            0 6px 18px rgba(0, 0, 0, 0.35),
            0 0 14px rgba(151, 82, 213, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }
    html.show-global-hamburger .global-hamburger-menu:active { filter: brightness(1.15); }
    /* Убираем редундантную «Назад» с вкладок нижней навигации (её место занимает бургер
       слева; домой ведут нижний бар и физическая «Назад»). По id экрана + !important —
       надёжно, не завязано на класс .active (эти экраны показываются без него). */
    html.show-global-hamburger #browseAds .back-btn,
    html.show-global-hamburger #myChats .back-btn,
    html.show-global-hamburger #myProfileScreen .back-btn {
        display: none !important;
    }
}
.global-hamburger-menu .hamburger-line { box-shadow: 0 0 5px rgba(197, 168, 255, 0.5); }
