/* Светлая тема с фиолетовыми акцентами */
:root {
    --primary: #764AF1;
    --primary-light: #aa7ffd;
    --primary-rgb: 118, 74, 241;

    --bg: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-hover: #F1F3F5;

    --text: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #718096;

    --border: #E2E8F0;
    --border-light: #F1F5F9;

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

    --radius: 16px;
    --radius-sm: 12px;

    --message-outgoing-bg: #E8E8ED;
    --message-outgoing-bg-hover: #DCDCE1;
    --message-outgoing-check-read: #5A9BD4;
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
    cursor: default;
}

/* Для мобильной версии используем clip вместо hidden, чтобы не создавать scroll-container */
@media (max-width: 991px) {
    html, body {
        overflow-x: clip;
    }
}

/* Навигация */
.navbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--primary) !important;
}

.brand-icon {
    font-size: 1.5rem;
    display: inline-block;
}

.brand-logo {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: contain;
    border-radius: 8px;
}

.mobile-brand .brand-logo {
    width: 30px;
    height: 30px;
}

.brand-text {
    color: var(--primary);
}

.navbar-toggler {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2826, 26, 46, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.08);
}

.nav-link.active {
    color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-text {
    font-size: 0.95rem;
}

.nav-link-badge {
    position: relative;
}

.nav-link-badge .unread-messages-badge,
.nav-link-badge .unread-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    z-index: 10;
}

.badge {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Действия навигации (справа) */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.nav-link-icon {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: color 0.2s ease, transform 0.3s ease;
    color: var(--text-secondary) !important;
    transform-origin: center center;
}

.nav-link-icon:hover {
    color: var(--primary) !important;
    transform: rotate(90deg);
}

.nav-link-icon i {
    font-size: 1.25rem;
    display: block;
    transform-origin: center center;
}

/* Аватар пользователя в навигации */
.nav-link-profile {
    padding: 0 !important;
    margin-left: 0.5rem;
    margin-right: 0;
}

.navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border);
    object-fit: cover;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.navbar-avatar-placeholder {
    background: var(--bg-light);
    border: 2px dashed var(--border) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.navbar-avatar-placeholder i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.navbar-avatar:hover {
    border-color: var(--primary);
}

/* Выпадающее меню */
.dropdown-toggle::after {
    display: none;
}

/* Dropdown в навигации (компьютерная версия) - Новый дизайн */
.navbar .dropdown-menu,
.navbar-actions .dropdown-menu {
    background: var(--bg) !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    padding: 0.5rem !important;
    margin-top: 0.5rem !important;
    min-width: 200px !important;
    animation: dropdown-slide 0.2s ease-out !important;
    overflow: visible !important;
}

@keyframes dropdown-slide {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Общие стили для dropdown */
.dropdown-menu {
    background: var(--bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 200px;
    animation: dropdown-slide 0.2s ease-out;
    overflow: visible;
}

.navbar .dropdown-item,
.navbar-actions .dropdown-item {
    padding: 0.625rem 0.875rem !important;
    border-radius: 8px !important;
    color: var(--text) !important;
    font-weight: 400 !important;
    font-size: 0.875rem !important;
    transition: background-color 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    margin: 0.125rem 0 !important;
    position: relative;
    background: transparent !important;
}

.navbar .dropdown-item:first-child,
.navbar-actions .dropdown-item:first-child {
    margin-top: 0 !important;
}

.navbar .dropdown-item:last-child,
.navbar-actions .dropdown-item:last-child {
    margin-bottom: 0 !important;
}

.navbar .dropdown-item i,
.navbar-actions .dropdown-item i {
    color: var(--text-secondary) !important;
    font-size: 1rem !important;
    width: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.15s ease !important;
}

.navbar .dropdown-item:hover,
.navbar-actions .dropdown-item:hover {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
    transform: none !important;
}

.navbar .dropdown-item:hover i,
.navbar-actions .dropdown-item:hover i {
    color: var(--primary) !important;
    transform: none !important;
}

.navbar .dropdown-item:active,
.navbar-actions .dropdown-item:active {
    background: var(--bg-hover) !important;
    color: var(--text) !important;
    transform: none !important;
}

.navbar .dropdown-divider,
.navbar-actions .dropdown-divider {
    margin: 0.5rem 0 !important;
    border-color: var(--border) !important;
    opacity: 1 !important;
    height: 1px !important;
}

/* Общие стили для dropdown-item (для других dropdown) */
.dropdown-item {
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    color: var(--text);
    font-weight: 400;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.125rem 0;
    position: relative;
    background: transparent;
}

.dropdown-item:first-child {
    margin-top: 0;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item i {
    color: var(--text-secondary);
    font-size: 1rem;
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text);
    transform: none;
}

.dropdown-item:hover i {
    color: var(--primary);
    transform: none;
}

.dropdown-item:active {
    background: var(--bg-hover);
    color: var(--text);
    transform: none;
}

.dropdown-item.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.dropdown-item.active:hover {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border);
    opacity: 1;
    height: 1px;
}

/* Мобильная версия dropdown */
@media (max-width: 991px) {
    .navbar .dropdown-menu,
    .navbar-actions .dropdown-menu {
        background: var(--bg) !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
        padding: 0.5rem !important;
        margin-top: 0.5rem !important;
        min-width: 200px !important;
        animation: dropdown-slide 0.2s ease-out !important;
        overflow: visible !important;
    }

    .navbar .dropdown-item,
    .navbar-actions .dropdown-item {
        padding: 0.625rem 0.875rem !important;
        border-radius: 8px !important;
        color: var(--text) !important;
        font-weight: 400 !important;
        font-size: 0.875rem !important;
        transition: background-color 0.15s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.625rem !important;
        margin: 0.125rem 0 !important;
        position: relative;
        background: transparent !important;
    }

    .navbar .dropdown-item i,
    .navbar-actions .dropdown-item i {
        color: var(--text-secondary) !important;
        font-size: 1rem !important;
        width: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: color 0.15s ease !important;
    }

    .navbar .dropdown-item:hover,
    .navbar-actions .dropdown-item:hover {
        background: var(--bg-hover) !important;
        color: var(--text) !important;
        transform: none !important;
    }

    .navbar .dropdown-item:hover i,
    .navbar-actions .dropdown-item:hover i {
        color: var(--primary) !important;
        transform: none !important;
    }

    .navbar .dropdown-divider,
    .navbar-actions .dropdown-divider {
        margin: 0.5rem 0 !important;
        border-color: var(--border) !important;
        opacity: 1 !important;
        height: 1px !important;
    }
}

/* Мобильная верхняя панель */
.mobile-top-bar {
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1001;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip; /* clip вместо hidden - не создает scroll-container */
}

.mobile-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow-x: clip; /* clip вместо hidden - не создает scroll-container */
}

.mobile-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.mobile-auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-auth-buttons .btn {
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

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

.mobile-menu-btn i {
    font-size: 1.125rem;
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Мобильное меню - Новая структура */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    pointer-events: none;
}

.mobile-menu.active {
    pointer-events: auto;
}

.mobile-menu__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-menu.active .mobile-menu__backdrop {
    opacity: 1;
}

.mobile-menu__sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active .mobile-menu__sidebar {
    transform: translateX(0);
}

.mobile-menu__header {
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--border);
}

.mobile-menu__close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1.25rem;
    transition: opacity 0.2s ease;
}

.mobile-menu__close:hover {
    opacity: 0.6;
}

.mobile-menu__profile {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.mobile-menu__profile-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-menu__avatar-placeholder {
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.mobile-menu__avatar-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Notification Avatar Placeholder */
.notification-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.notification-avatar-placeholder i {
    font-size: 1.75rem;
    opacity: 0.5;
}

/* Match Avatar Placeholder */
.match-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.match-avatar-placeholder i {
    font-size: 2rem;
    opacity: 0.5;
}

/* Chat Avatar Placeholder */
.chat-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-avatar-placeholder i {
    font-size: 1.75rem;
    opacity: 0.5;
}

/* Message Avatar Placeholder */
.message-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.message-avatar-placeholder i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Chat Item Avatar Placeholder */
.chat-item-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.chat-item-avatar-placeholder i {
    font-size: 1.75rem;
    opacity: 0.5;
}

.mobile-menu__edit {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.mobile-menu__edit:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-hover);
}

.mobile-menu__profile-info {
    flex: 1;
    min-width: 0;
}

.mobile-menu__name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.25rem;
}

.mobile-menu__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.mobile-menu__status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.mobile-menu__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.mobile-menu__nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 400;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-menu__link:hover {
    background: var(--bg-hover);
}

.mobile-menu__link i {
    width: 20px;
    font-size: 1.125rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.mobile-menu__link:hover i {
    color: var(--primary);
}

.mobile-menu__link span {
    flex: 1;
}

.mobile-menu__link--danger {
    color: var(--text);
}

.mobile-menu__link--danger:hover {
    background: rgba(220, 38, 38, 0.05);
    color: #dc2626;
}

.mobile-menu__link--danger:hover i {
    color: #dc2626;
}

.mobile-menu__separator {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.5rem 0;
}

/* Мобильная нижняя навигация */
.mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 0.375rem 0.5rem calc(0.375rem + env(safe-area-inset-bottom));
    z-index: 1000;
    display: none;
    justify-content: space-evenly;
    align-items: center;
    gap: 0;
    box-sizing: border-box;
    margin: 0;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    overflow: visible;
}

.mobile-nav-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.125rem;
}

.mobile-nav-icon i {
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.mobile-nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.mobile-nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    width: 20px;
    max-width: 20px;
    height: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}


.mobile-nav-item.active .mobile-nav-icon {
    background: var(--bg-hover);
    box-shadow: none;
    transform: none;
}

.mobile-nav-item.active .mobile-nav-icon i {
    color: var(--primary);
    transform: none;
}

.mobile-nav-item.active .mobile-nav-label {
    color: var(--primary);
    font-weight: 500;
}

.mobile-nav-item:not(.active):active .mobile-nav-icon {
    transform: scale(0.95);
    background: rgba(var(--primary-rgb), 0.1);
}

.mobile-nav-item:not(.active):active .mobile-nav-icon i {
    color: var(--primary);
}

/* Анимация при наведении (для устройств с поддержкой hover) */
@media (hover: hover) {
    .mobile-nav-item:not(.active):hover .mobile-nav-icon {
        background: rgba(var(--primary-rgb), 0.1);
        transform: translateY(-1px);
    }

    .mobile-nav-item:not(.active):hover .mobile-nav-icon i {
        color: var(--primary);
        transform: scale(1.03);
    }

    .mobile-nav-item:not(.active):hover .mobile-nav-label {
        color: var(--primary);
    }
}

/* Адаптивность навигации */
@media (max-width: 991px) {
    html, body {
        overflow-x: clip !important; /* clip вместо hidden - не создает scroll-container */
        max-width: 100vw !important;
        width: 100%;
    }

    .desktop-nav {
        display: none !important;
    }

    .mobile-top-bar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
        width: 100vw;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    body.layout-app > main.container {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom));
        overflow-x: clip; /* clip вместо hidden - не создает scroll-container */
    }

    body.layout-app > main.container:has(.messages-container) {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 992px) {
    .mobile-menu-overlay {
        display: none !important;
    }

}

@media (max-width: 480px) {
    .mobile-bottom-nav {
        padding: 0.25rem 0 calc(0.25rem + env(safe-area-inset-bottom));
        gap: 0;
        width: 100vw;
        max-width: 100%;
    }

    .mobile-nav-item {
        padding: 0.25rem 0.05rem;
        flex: 1 1 0;
        min-width: 0;
        max-width: 20%;
    }

    .mobile-nav-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 0.1rem;
    }

    .mobile-nav-icon i {
        font-size: 1.1rem;
    }

    .mobile-nav-label {
        font-size: 0.6rem;
    }

    .mobile-nav-badge {
        top: -3px;
        right: -3px;
        padding: 0;
        font-size: 0.65rem;
        min-width: 18px;
        width: 18px;
        max-width: 18px;
        height: 18px;
    }
}

@media (min-width: 992px) {
    .mobile-top-bar,
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Контент приложения */
body.layout-app > main.container {
    padding-top: 2rem;
    padding-bottom: 4rem;
    position: relative;
}

@media (min-width: 992px) {
    body.layout-app > main.container {
        min-height: 100vh;
    }
}

@media (max-width: 991px) {
    body.layout-app > main.container {
        padding-top: 1rem;
        padding-bottom: calc(6rem + env(safe-area-inset-bottom));
    }
}

/* Боковая панель профиля */
.profile-sidebar {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.profile-cover-image {
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.profile-info-section {
    padding: 2rem 1.5rem;
    text-align: center;
}

.profile-avatar-container {
    position: relative;
    display: inline-block;
    margin-top: 0;
    margin-bottom: 1rem;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid var(--bg);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.profile-avatar-placeholder {
    background: var(--bg-light);
    border: 3px dashed var(--border) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    box-shadow: none !important;
}

.profile-avatar-placeholder i {
    font-size: 5rem;
    opacity: 0.4;
}

.user-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: #CBD5E0;
    border: 3px solid var(--bg);
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.user-status.online {
    background: #10B981;
}

/* Специфичный стиль для статуса на странице профиля пользователя */
.profile-avatar-container .user-status {
    bottom: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.profile-age-location {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profile-age-location i {
    color: var(--primary);
    font-size: 0.875rem;
}

.profile-separator {
    color: var(--text-muted);
}

.profile-last-seen {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.profile-last-seen i {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.profile-last-seen .last-seen-text {
    color: var(--text-secondary);
}

/* Когда пользователь онлайн, меняем стиль */
.profile-last-seen.online .last-seen-text {
    color: var(--primary);
    font-weight: 500;
}

.profile-last-seen.online i {
    color: var(--primary);
}

/* Кнопки действий */
.profile-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-show-photos-mini {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    transition: all 0.2s ease;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.btn-show-photos-mini:hover {
    background: rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-show-photos-mini i {
    font-size: 0.75rem;
}

.btn-show-photos-mini.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3);
}

.btn-show-photos-mini.active:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.4);
}

.profile-photos-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.btn-action {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-action:active::before {
    width: 300px;
    height: 300px;
}

.btn-like {
    background: linear-gradient(135deg, #10B981, #34D399, #6EE7B7);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    animation: gradient-shift 4s ease infinite;
    position: relative;
    overflow: visible;
}

.btn-like i {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.btn-dislike {
    background: linear-gradient(135deg, #6C757D, #868E96, #ADB5BD);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.4);
    animation: gradient-shift 4s ease infinite;
    position: relative;
    overflow: visible;
}

.btn-dislike i {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
}

/* Активное состояние кнопок (лайк/дизлайк уже поставлен) */
.btn-like.active {
    background: linear-gradient(135deg, #059669, #10B981, #34D399);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6), 0 0 0 3px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
}

.btn-like.active i {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
    animation: heartbeat 2s ease infinite;
}

.btn-dislike.active {
    background: linear-gradient(135deg, #495057, #6C757D, #868E96);
    box-shadow: 0 4px 20px rgba(108, 117, 125, 0.6), 0 0 0 3px rgba(108, 117, 125, 0.3);
    transform: scale(1.05);
}

.btn-dislike.active i {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.15);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
}

@keyframes icon-pulse {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: brightness(1.2);
    }
}

@keyframes rotate-in {
    0% {
        transform: rotate(-180deg) scale(0);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

.btn-action:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    animation: gradient-shift 2s ease infinite;
}

.btn-like:hover {
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5), 0 0 0 4px rgba(16, 185, 129, 0.15);
    animation: gradient-shift 2s ease infinite, pulse-shadow-like 2s ease infinite;
}

.btn-like:hover i {
    animation: heartbeat 1s ease infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.btn-dislike:hover {
    box-shadow: 0 8px 28px rgba(108, 117, 125, 0.5), 0 0 0 4px rgba(108, 117, 125, 0.15);
    animation: gradient-shift 2s ease infinite, pulse-shadow-dislike 2s ease infinite;
}

.btn-dislike:hover i {
    animation: icon-pulse 1.5s ease infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

@keyframes pulse-shadow-like {
    0%, 100% {
        box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5), 0 0 0 4px rgba(16, 185, 129, 0.15);
    }
    50% {
        box-shadow: 0 10px 32px rgba(16, 185, 129, 0.6), 0 0 0 6px rgba(16, 185, 129, 0.2);
    }
}

@keyframes pulse-shadow-dislike {
    0%, 100% {
        box-shadow: 0 8px 28px rgba(108, 117, 125, 0.5), 0 0 0 4px rgba(108, 117, 125, 0.15);
    }
    50% {
        box-shadow: 0 10px 32px rgba(108, 117, 125, 0.6), 0 0 0 6px rgba(108, 117, 125, 0.2);
    }
}

.btn-action:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-like:active {
    box-shadow: 0 2px 12px rgba(255, 107, 157, 0.4);
    animation: none;
}

.btn-like:active i {
    animation: heartbeat 0.3s ease;
}

.btn-dislike:active {
    box-shadow: 0 2px 12px rgba(108, 117, 125, 0.4);
    animation: none;
}

.btn-dislike:active i {
    animation: icon-pulse 0.3s ease;
}

.btn-message-full {
    width: 100%;
    padding: 0.5rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-message-full:hover {
    background: var(--primary-light);
}

.btn-message-full:active {
    background: var(--primary);
}

/* Вторичные действия профиля */
.profile-secondary-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-secondary-action {
    flex: 1;
    padding: 0.5rem 1.5rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary-action i {
    font-size: 1rem;
}

.btn-secondary-action:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    color: var(--text);
}

.btn-secondary-action:first-child:hover {
    color: #dc3545;
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.btn-secondary-action:last-child:hover {
    color: #ffc107;
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.btn-secondary-action:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .profile-secondary-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-secondary-action {
        width: 100%;
    }

    .btn-secondary-action span {
        font-size: 0.8125rem;
    }
}

/* Модальные окна */
.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-check {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.form-check:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.form-check-input {
    cursor: pointer;
    margin-right: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    width: 1rem;
    height: 1rem;
}

.form-check-input:checked ~ .form-check-label {
    color: var(--primary);
    font-weight: 500;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    cursor: pointer;
    color: var(--text);
    font-size: 0.9375rem;
    flex: 1;
    margin: 0;
    user-select: none;
    position: relative;
    z-index: 1;
    padding-left: 0;
}

.form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.1);
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: 500;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
    font-weight: 500;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

.btn-secondary {
    background: var(--bg-light);
    border-color: var(--border);
    color: var(--text);
    font-weight: 500;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

/* Базовая информация */
.basic-info {
    text-align: left;
}

.info-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.info-line i {
    color: var(--primary);
    width: 20px;
    font-size: 1.1rem;
}

/* Секции контента */
.content-section {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* Разрешаем overflow для выпадающих списков внутри секций */
.content-section:has(.custom-select-wrapper) {
    overflow: visible;
}

.content-section .section-body:has(.custom-select-wrapper) {
    overflow: visible;
}

/* Альтернативное решение для браузеров без поддержки :has() */
.edit-profile-form .content-section,
.edit-profile-form .section-body {
    overflow: visible;
}

.details-grid .content-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.section-header {
    padding: 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.section-header i {
    color: var(--primary);
    font-size: 1.375rem;
}

.btn-upload-photo-section {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(118, 74, 241, 0.08);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-upload-photo-section:hover {
    background: rgba(118, 74, 241, 0.12);
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-upload-photo-section:active {
    background: rgba(118, 74, 241, 0.16);
    transform: scale(0.98);
}

.btn-upload-photo-section i {
    font-size: 0.9375rem;
    opacity: 0.9;
}

.btn-upload-photo-section:hover i {
    opacity: 1;
}

.btn-edit-section {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(118, 74, 241, 0.08);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-edit-section:hover {
    background: rgba(118, 74, 241, 0.12);
    color: var(--primary);
    transform: none;
    box-shadow: none;
}

.btn-edit-section:active {
    background: rgba(118, 74, 241, 0.16);
    transform: scale(0.98);
}

.btn-edit-section i {
    font-size: 0.9375rem;
    opacity: 0.9;
}

.btn-edit-section:hover i {
    opacity: 1;
}

.section-body {
    padding: 1.5rem;
    overflow: visible;
}

.details-grid .section-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.section-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* Список деталей */
.detail-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.details-grid .detail-list {
    flex: 1;
    justify-content: flex-start;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.detail-row:last-child {
    border-bottom: none;
}

/* Выравнивание колонок в сетке деталей */
.details-grid .row {
    align-items: stretch;
}

.details-grid .col-md-6 {
    display: flex;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
}

.detail-value {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9375rem;
    text-align: right;
}

/* Теги интересов */
.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tag:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

/* Кнопка добавления фото */
.btn-add-photo {
    padding: 0.375rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-photo:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-add-photo i {
    font-size: 1rem;
}

/* Фотографии */
.photo-upload-rules {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-top: 1rem;
}

.photo-upload-rules-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 0.9375rem;
}

.photo-upload-rules-header i {
    color: var(--primary);
    font-size: 1.125rem;
}

.photo-upload-rules-content {
    padding-left: 0.5rem;
}

.photo-upload-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.photo-upload-rules-list li {
    display: flex;
    align-items: flex-start;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.photo-upload-rules-list li i {
    color: var(--primary);
    font-size: 0.875rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.photo-upload-rules-list li span {
    flex: 1;
}

@media (max-width: 768px) {
    .photo-upload-rules {
        padding: 1rem;
    }

    .photo-upload-rules-header {
        font-size: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .photo-upload-rules-header i {
        font-size: 1rem;
    }

    .photo-upload-rules-list {
        gap: 0.5rem;
    }

    .photo-upload-rules-list li {
        font-size: 0.8125rem;
    }

    .photo-upload-rules-list li i {
        font-size: 0.8125rem;
    }
}

.photos-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.photo-placeholder {
    background: var(--bg-light);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.photo-placeholder-content i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.photo-placeholder-content span {
    font-size: 0.875rem;
    font-weight: 500;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-hover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-hover {
    opacity: 1;
}

.btn-view-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-view-photo:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}

/* Футер */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.site-footer p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.875rem;
}

/* Адаптивность */
@media (max-width: 991px) {
    .profile-sidebar {
        position: static !important;
        margin-bottom: 2rem;
    }

    .photos-masonry {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    body.layout-app > main.container:not(:has(.messages-container)) {
        padding-top: 1rem;
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
    }

    .btn-action {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .photos-masonry {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-header h3 {
        width: 100%;
    }

    .btn-upload-photo-section,
    .btn-edit-section {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 1rem;
    }
}

/* Скроллбар - только для десктопной версии */
@media (min-width: 992px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    ::-webkit-scrollbar-track {
        background: var(--bg-light);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: #CBD5E0;
        border-radius: 10px;
        transition: all 0.2s ease;
        min-height: 40px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #A0AEC0;
    }

    ::-webkit-scrollbar-thumb:active {
        background: #718096;
    }

    ::-webkit-scrollbar-corner {
        background: var(--bg-light);
    }

    /* Для Firefox */
    * {
        scrollbar-width: thin;
        scrollbar-color: #CBD5E0 var(--bg-light);
    }

    /* Стилизация скроллбара для контейнеров с контентом */
    .content-section::-webkit-scrollbar,
    .profile-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .content-section::-webkit-scrollbar-track,
    .profile-sidebar::-webkit-scrollbar-track {
        background: transparent;
        border-radius: 10px;
    }

    .content-section::-webkit-scrollbar-thumb,
    .profile-sidebar::-webkit-scrollbar-thumb {
        background: #CBD5E0;
        border-radius: 10px;
    }

    .content-section::-webkit-scrollbar-thumb:hover,
    .profile-sidebar::-webkit-scrollbar-thumb:hover {
        background: #A0AEC0;
    }

    /* Горизонтальный скроллбар */
    ::-webkit-scrollbar:horizontal {
        height: 6px;
    }

    ::-webkit-scrollbar-thumb:horizontal {
        background: #CBD5E0;
        border-radius: 10px;
        min-width: 40px;
    }

    ::-webkit-scrollbar-thumb:horizontal:hover {
        background: #A0AEC0;
    }
}

/* Минималистичный скроллбар для мобильных устройств */
@media (max-width: 991px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

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

    ::-webkit-scrollbar-thumb {
        background: rgba(118, 74, 241, 0.3);
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(118, 74, 241, 0.5);
    }

    * {
        scrollbar-width: thin;
        scrollbar-color: rgba(118, 74, 241, 0.3) transparent;
    }
}

/* Улучшения */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   СТРАНИЦА РЕДАКТИРОВАНИЯ ПРОФИЛЯ
   ============================================ */

/* Формы */
.form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-control,
.form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    background: var(--bg);
    color: var(--text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Селект месяца в дате рождения */
select.form-control {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

select.form-control option {
    white-space: normal;
    padding: 0.5rem;
}

/* Явно задаем толщину бордера для всех select */
.form-select,
select.form-control,
select.form-select {
    border-width: 1px !important;
}

/* Загрузка фото */
.cover-photo-upload {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.cover-photo-upload:hover {
    opacity: 0.9;
}

.cover-photo-upload button {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cover-photo-upload:hover button {
    opacity: 1;
}

/* Интересы с возможностью редактирования */
.interests-edit {
    padding: 1rem 0;
}

.interests-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.interest-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interest-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.interest-checkbox-item label {
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    user-select: none;
    margin: 0;
}

.interest-checkbox-item label:hover {
    color: var(--primary);
}

.selected-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.tag-editable {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border);
    cursor: default;
    transition: all 0.2s ease;
}

.tag-editable i {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tag-editable i:hover {
    opacity: 1;
    color: #dc3545;
}

.tag-editable:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

/* Кнопки действий */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Заголовок страницы */
h1.h3 {
    color: var(--text);
    font-weight: 600;
}

h1.h3 i {
    color: var(--primary);
}

/* Кнопка удаления фото */
.photo-item .btn-danger,
.photo-item .photo-delete-btn,
.photo-item .photo-hide-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    position: relative;
}

.photo-item:hover .btn-danger,
.photo-item:hover .photo-delete-btn,
.photo-item:hover .photo-hide-btn {
    opacity: 1;
}

.photo-item.photo-hidden .photo-hide-btn {
    opacity: 1;
}

.photo-item.photo-hidden {
    opacity: 0.5;
    position: relative;
}

.photo-item.photo-hidden::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-sm);
    z-index: 1;
}

.photo-item.photo-hidden img {
    filter: grayscale(100%);
}

.photo-item.photo-inactive img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.photo-item.photo-inactive {
    cursor: default;
}

.photo-item.photo-inactive .profile-photo-select {
    cursor: default;
}

.photo-item.photo-inactive:hover .photo-overlay-main,
.photo-item.photo-inactive:hover .photo-overlay-select {
    opacity: 0;
}

.photo-item.photo-inactive .photo-overlay-main,
.photo-item.photo-inactive .photo-overlay-select {
    display: none;
}

/* Выбор главного фото из галереи */
.profile-photo-select {
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-photo-select:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.profile-photo-select img {
    transition: opacity 0.2s ease;
}

.profile-photo-select:hover img {
    opacity: 0.9;
}

.photo-overlay-main,
.photo-overlay-select {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.profile-photo-select:hover .photo-overlay-main,
.profile-photo-select:hover .photo-overlay-select {
    opacity: 1;
}

.profile-photo-select[data-is-main="true"] .photo-overlay-main {
    opacity: 1;
    background: rgba(118, 74, 241, 0.2);
}

.profile-photo-select[data-is-main="true"],
.profile-photo-select.photo-main-active {
    border: 2px solid var(--primary);
}

.photo-overlay-select {
    display: none;
}

.photo-overlay-hidden {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.photo-overlay-hidden .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.photo-status-badge {
    z-index: 5;
    pointer-events: none;
}

.photo-status-badge .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    font-weight: 500;
}

/* Модальное окно для кропа */
.crop-modal-wrapper {
    padding: 0;
    overflow: hidden;
}

.crop-image-wrapper {
    max-height: 70vh;
    overflow: hidden;
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.crop-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.crop-modal-actions .btn {
    min-width: 120px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
}

#crop-modal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(118, 74, 241, 0.9) 100%);
    color: white;
    border-bottom: none;
    padding: 20px 24px;
}

#crop-modal .modal-title {
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
}

#crop-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

#crop-modal .btn-close:hover {
    opacity: 1;
}

#crop-modal .modal-body {
    padding: 24px;
    overflow: hidden;
}

#crop-modal .modal-content {
    overflow: hidden;
}

#crop-modal .modal-dialog {
    max-width: 900px;
}

/* Profile Info Groups */
.profile-info-group {
    margin-bottom: 2rem;
}

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

.profile-info-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

/* Profile Edit Groups */
.profile-edit-group {
    margin-bottom: 2rem;
}

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

.profile-edit-group-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.profile-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.profile-info-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.profile-info-item > i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.profile-info-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.profile-info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-info-value {
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 600;
    word-wrap: break-word;
}

.profile-info-full {
    grid-column: 1 / -1;
}

.profile-info-full .profile-info-value {
    line-height: 1.6;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .profile-info-group {
        margin-bottom: 1.5rem;
    }
    
    .profile-info-group-title {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.375rem;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    
    .profile-info-item {
        padding: 0.75rem 0.875rem;
    }
    
    .profile-info-item > i {
        font-size: 1.125rem;
    }
    
    .profile-info-label {
        font-size: 0.6875rem;
    }
    
    .profile-info-value {
        font-size: 0.875rem;
    }
    
    .profile-info-item:hover {
        transform: none;
    }
}

.profile-photo-select:not([data-is-main="true"]):not(.photo-main-active) .photo-overlay-select {
    display: flex;
}

/* Адаптивность для формы */
@media (max-width: 768px) {
    .cover-photo-upload {
        height: 150px !important;
    }

    .cover-photo-upload button {
        opacity: 1;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .d-flex.justify-content-between > div {
        width: 100%;
    }

    .d-flex.justify-content-between > div .btn {
        width: 100%;
    }
}

/* ============================================
   СТРАНИЦА НАСТРОЕК
   ============================================ */

.settings-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.settings-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.settings-item-info {
    flex: 1;
}

.settings-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.settings-item-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.settings-select {
    min-width: 200px;
}

/* Custom Toggle Switch */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    cursor: pointer;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: all 0.3s ease;
    border-radius: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.settings-toggle input:checked + .settings-toggle-slider {
    background-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15);
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(16px);
}

.settings-toggle input:focus + .settings-toggle-slider {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.settings-toggle:hover .settings-toggle-slider {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.settings-toggle input:checked:hover + .settings-toggle-slider {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
}

/* Session Item */
.session-item {
    transition: all 0.2s ease;
}

.session-item:hover {
    background: var(--bg-light);
}

/* Адаптивность для настроек */
@media (max-width: 768px) {
    .settings-item-content {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }

    .settings-item-info {
        flex: 1;
        min-width: 0;
    }

    .settings-toggle {
        flex-shrink: 0;
    }

    .settings-select {
        width: 100%;
        min-width: auto;
    }

    .settings-item-content .btn {
        width: auto;
        min-width: 120px;
    }
}

/* ============================================
   СТРАНИЦА УВЕДОМЛЕНИЙ
   ============================================ */

.notifications-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.notifications-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.notifications-page-title i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.notifications-page-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

.notifications-mark-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.notifications-mark-all-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.notifications-mark-all-btn i {
    font-size: 0.875rem;
}

/* Notifications List */
.notifications-list-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.notifications-date-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notifications-date-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
}

.notifications-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Notification Row */
.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
}

.notification-row:hover {
    background: var(--bg-light);
    text-decoration: none;
    color: inherit;
}

.notification-row-unread {
    background: rgba(var(--primary-rgb), 0.03);
    border-left-color: var(--primary);
}

.notification-row-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.notification-row-avatar {
    position: relative;
    flex-shrink: 0;
}

.notification-row-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s ease;
}

.notification-row:hover .notification-row-avatar img {
    border-color: var(--primary);
}

.notification-row-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.75rem;
}

.notification-row-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6875rem;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.notification-type-like {
    background: #667eea;
}

.notification-type-mutual {
    background: #f5576c;
}

.notification-type-message {
    background: #4facfe;
}

.notification-type-view {
    background: #43e97b;
}

.notification-type-default {
    background: #fa709a;
}

.notification-row-body {
    flex: 1;
    min-width: 0;
}

.notification-row-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.notification-row-username {
    font-weight: 600;
    color: var(--primary);
}

.notification-row-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.notification-row-time i {
    font-size: 0.75rem;
}

.notification-row-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.notification-row-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.notification-row:hover .notification-row-remove {
    opacity: 1;
}

.notification-row-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.notification-row-remove:active {
    transform: scale(0.95);
}

/* Empty State */
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.notifications-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 2.5rem;
}

.notifications-empty-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.notifications-empty-text p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .notifications-page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .notifications-mark-all-btn {
        width: 100%;
        justify-content: center;
    }

    .notification-row {
        padding: 0.875rem 1rem;
    }

    .notification-row-avatar img,
    .notification-row-avatar-placeholder {
        width: 40px;
        height: 40px;
    }

    .notification-row-badge {
        width: 18px;
        height: 18px;
        font-size: 0.625rem;
        border-width: 2px;
    }

    .notification-row-remove {
        opacity: 1;
    }

    .notifications-date-label {
        font-size: 0.75rem;
    }

    .notifications-empty-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .notifications-empty-text h3 {
        font-size: 1.125rem;
    }
}

/* ============================================
   СТРАНИЦА СООБЩЕНИЙ
   ============================================ */

.messages-container {
    height: calc(100vh - 80px);
    padding: 0 !important;
    margin-top: 0 !important;
}

@media (max-width: 991px) {
    .messages-container {
        height: calc(100vh - 80px - env(safe-area-inset-bottom));
        padding-bottom: 0 !important;
    }
}

.messages-container .row {
    height: 100%;
    margin: 0;
}

.messages-sidebar {
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.messages-sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.messages-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.messages-sidebar-header h1 {
    color: var(--text);
    font-weight: 600;
    margin: 0;
    font-size: 1.25rem;
}

.messages-sidebar-header h1 i {
    color: var(--primary);
}

/* Matches Header */
.matches-header {
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.matches-header h2 {
    color: var(--text);
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.matches-header h2 i {
    color: var(--primary);
    font-size: 1.125rem;
}

/* Matches List */
.matches-list-container {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.matches-list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.matches-list::-webkit-scrollbar {
    height: 4px;
}

.matches-list::-webkit-scrollbar-track {
    background: transparent;
}

.matches-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.matches-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.match-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    min-width: 70px;
}

.match-item:hover {
    transform: translateY(-2px);
}

.match-item:active {
    transform: translateY(0);
}

.match-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.match-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    transition: border-color 0.2s ease;
}

.match-item:hover .match-avatar img {
    border-color: var(--primary);
}

.user-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #CBD5E0;
    border: 2px solid var(--bg);
    display: block;
}

.user-status.online {
    background: #10b981;
}

.match-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.match-item:hover .match-name {
    color: var(--text);
}

.messages-chat-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.chat-item:hover {
    background: var(--bg-light);
}

.chat-item.active {
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary);
}

.chat-item.unread {
    background: rgba(var(--primary-rgb), 0.03);
}

.chat-item.unread .chat-item-name {
    font-weight: 600;
    color: var(--text);
}

.chat-item-avatar {
    position: relative;
    flex-shrink: 0;
}

.chat-item-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.user-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg);
    background: #CBD5E0;
}

.user-status.online {
    background: #10B981;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.chat-item-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.chat-item-preview {
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 2rem;
}

.chat-item-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.chat-item-badge {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.messages-area {
    background: var(--bg-light);
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Правая кромка колонки переписки: разделитель + мягкий «свет» primary (только ≥992px) */
@media (min-width: 992px) {
    .messages-area {
        border-right: 1px solid var(--border);
        box-shadow: inset -1px 0 0 rgba(var(--primary-rgb), 0.14);
    }
}

.messages-area-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}


.messages-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.messages-header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.messages-header-profile-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.messages-header-profile-link:hover .messages-header-name {
    color: var(--primary);
}

.messages-back-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.25rem;
    padding: 0.5rem;
    margin-right: -0.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.messages-back-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

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

.messages-header-avatar {
    position: relative;
    flex-shrink: 0;
}

.messages-header-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.messages-header-avatar .user-status {
    width: 12px;
    height: 12px;
    bottom: 0;
    right: 0;
}

.messages-header-info {
    flex: 1;
    min-width: 0;
}

.messages-header-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.user-status-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.messages-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.messages-header-actions .btn-link {
    padding: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.messages-header-actions button.btn-link {
    font-size: 1.125rem;
}

.messages-header-actions .btn-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.messages-header-actions .btn-link.active {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.messages-header-actions .btn-link.active:hover {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.messages-header-actions .dropdown {
    position: relative;
}

.messages-header-actions .dropdown-toggle::after {
    display: none;
}

.messages-header-actions .dropdown-menu {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    margin-top: 0.5rem;
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    left: auto !important;
    transform: none !important;
    will-change: auto;
    z-index: 1000;
}

.messages-header-actions .dropdown-menu.show {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    left: auto !important;
    transform: none !important;
}

.messages-header-actions .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
}

.messages-header-actions .dropdown-item i {
    width: 20px;
    font-size: 1.1rem;
}

.messages-header-actions .dropdown-item.text-danger {
    color: #dc3545;
}

.messages-header-actions .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.messages-header-actions .dropdown-item.text-warning {
    color: #ffc107;
}

.messages-header-actions .dropdown-item.text-warning:hover {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Blocked User Banner */
.messages-blocked-banner {
    position: absolute;
    top: 80px;
    left: 1.5rem;
    right: 1.5rem;
    margin-top: .5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    z-index: 100;
}

.messages-blocked-banner:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(220, 53, 69, 0.3);
}

.messages-blocked-banner-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    flex-wrap: wrap;
}

.messages-blocked-banner i {
    font-size: 1.25rem;
    color: #fff;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

.messages-blocked-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.messages-blocked-banner-text strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.messages-blocked-banner-text span {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.messages-blocked-banner #unblockUserBtn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .messages-blocked-banner {
        top: 70px;
        left: 1rem;
        right: 1rem;
        padding: 0.875rem 1rem;
    }

    .messages-area-content:has(.messages-blocked-banner) .messages-container-scroll {
        padding-top: 5.5rem;
    }

    .messages-blocked-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.875rem;
    }

    .messages-blocked-banner i {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    .messages-blocked-banner #unblockUserBtn {
        width: 100%;
        justify-content: center;
    }
}

.messages-panel {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages-container-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(118, 74, 241, 0.02) 0%, transparent 100%),
    repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(118, 74, 241, 0.01) 20px,
            rgba(118, 74, 241, 0.01) 21px
    );
    scrollbar-width: thin;
    scrollbar-color: #CBD5E0 transparent;
}

.messages-container-scroll::-webkit-scrollbar {
    width: 6px;
}

.messages-container-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.messages-container-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E0;
    border-radius: 10px;
}

.messages-container-scroll::-webkit-scrollbar-thumb:hover {
    background: #A0AEC0;
}

/* Пока спиннер: не даём внутреннему блоку скроллиться (полоса не нужна) */
.messages-panel.messages-loading .messages-container-scroll {
    overflow-y: hidden;
    overflow-x: hidden;
}

/* Оверлей по видимой панели чата, а не по высоте всего списка сообщений */
.messages-loading-gate {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    background-color: var(--bg-light);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    pointer-events: none;
}

.messages-loading-gate .messages-loading-indicator {
    padding: 0;
}

.messages-panel.messages-loading .messages-list {
    opacity: 0;
}

.messages-panel.messages-loaded .messages-list {
    opacity: 1;
    transition: opacity 0.4s ease;
}

.messages-panel.messages-loaded .messages-loading-gate {
    opacity: 0;
    visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .messages-panel.messages-loaded .messages-list {
        transition: none;
    }

    .messages-panel.messages-loaded .messages-loading-gate {
        transition: none;
    }
}

.messages-area-content:has(.messages-blocked-banner) .messages-container-scroll {
    padding-top: 6rem;
}


.messages-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    position: relative;
    z-index: 0;
}

/* Messages Instructions */
.messages-instructions {
    background: linear-gradient(135deg, rgba(118, 74, 241, 0.08), rgba(79, 172, 254, 0.08));
    border: 1px solid rgba(118, 74, 241, 0.15);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.messages-instructions.hidden {
    display: none;
}

.messages-instructions-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.messages-instructions-header i {
    color: var(--primary);
    font-size: 1.125rem;
}

.messages-instructions-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
}

.messages-instructions-close:hover {
    background: rgba(118, 74, 241, 0.1);
    color: var(--primary);
}

.messages-instructions-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.instructions-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.instructions-item i {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.instructions-item > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.instructions-item strong {
    color: var(--text);
    font-weight: 600;
}

.instructions-item span {
    color: var(--text-secondary);
    line-height: 1.4;
}

.message-date-separator {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    z-index: 2;
}

.message-date-separator::before,
.message-date-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}

.message-date-separator::before {
    left: 0;
}

.message-date-separator::after {
    right: 0;
}

.message-date-separator span {
    background: var(--bg-light);
    padding: 0 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.message-item {
    display: flex;
    gap: 0.625rem;
    align-items: flex-end;
    max-width: 75%;
    position: relative;
    z-index: 2;
    cursor: default;
    margin-bottom: 0.25rem;
}

.message-item.message-incoming {
    align-self: flex-start;
}

.message-item.message-outgoing {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.message-content {
    flex: 1;
    min-width: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.message-bubble {
    background: var(--bg);
    border-radius: 16px;
    padding: 0.625rem 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
    max-width: 100%;
    min-width: 80px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
    display: flex;
    flex-direction: column;
}

.message-item.message-outgoing .message-bubble {
    background: var(--message-outgoing-bg);
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.message-item.message-incoming .message-bubble {
    background: var(--bg);
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.message-text {
    font-size: 0.9375rem;
    line-height: 1.25;
    color: var(--text);
    word-wrap: break-word;
    margin: 0;
    padding-right: 2.5rem;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: default;
}

.message-item.has-reply .message-text {
    margin-top: 0;
}

.message-item.message-outgoing .message-text {
    color: var(--text);
}

.message-time {
    align-self: flex-end;
    font-size: 0.6875rem;
    color: var(--text-muted);
    opacity: 0.7;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin-top: 0.125rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.messages-loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-muted);
}

.messages-loading-indicator .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

.message-item.message-outgoing .message-time {
    color: var(--text-muted);
    opacity: 0.85;
}

.message-check-icon {
    font-size: 1.3em;
    margin-right: 0.125rem;
    color: var(--text-muted);
    opacity: 1;
}

/* Один слот для галочки и спиннера (исходящие): фикс. rem, не em от увеличенного font-size иконки) */
.message-item.message-outgoing .message-time .message-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    width: 1.125rem;
    min-width: 1.125rem;
    height: 1.125rem;
    min-height: 1.125rem;
    max-height: 1.125rem;
    margin-right: 0.125rem;
    font-size: 0.8125rem;
    line-height: 1;
}

.message-item.message-outgoing .message-time .message-check-icon.bi-check-all {
    width: 1.35rem;
    min-width: 1.35rem;
}

.message-item.message-outgoing .message-check-icon--read {
    color: var(--message-outgoing-check-read);
    opacity: 1;
}

.message-item.message-outgoing .message-check-icon--unread {
    color: var(--text-muted);
    opacity: 0.85;
}

.message-check-icon--pending .spinner-border-sm {
    width: 0.65rem;
    height: 0.65rem;
    border-width: 0.1rem;
    opacity: 0.95;
}

.messages-input {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.messages-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    width: 100%;
}

/* Единый блок ввода: поле + эмодзи + кнопка без «отдельного шара» */
.messages-input-composer {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--bg-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.messages-input-composer:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.messages-input-composer .messages-input-wrapper {
    gap: 0.35rem;
    padding: 0.2rem 0.35rem 0.2rem 0.3rem;
}

.messages-input-composer .messages-input-field .form-control {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0.65rem 2.75rem 0.65rem 0.2rem;
}

.messages-input-composer .messages-input-field .form-control:focus {
    border: none;
    box-shadow: none;
}

.messages-input-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.messages-input-actions .btn-link {
    padding: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.messages-input-actions .btn-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.messages-input-field {
    flex: 1;
    min-width: 0;
}

.messages-input-field .form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
}

.messages-input-field .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.1);
}

.messages-input-field {
    position: relative;
}

#emoji-picker {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 0;
    width: 352px;
    z-index: 1000;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
}

#emoji-picker .emoji-mart {
    border: none;
    background: transparent;
    width: 100%;
}

#emoji-picker .emoji-mart-preview,
#emoji-picker .emoji-mart-preview-emoji,
#emoji-picker .emoji-mart-preview-data {
    display: none !important;
}

#emoji-picker .emoji-mart-bar {
    display: none !important;
}

#emoji-picker .emoji-mart-scroll {
    width: 100% !important;
}

#emoji-picker .emoji-mart-category-label {
    width: 100% !important;
}

.messages-input-actions .btn-link.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

/* Стрелка вправо внутри поля ввода */
.message-send-btn.message-send-btn--inside {
    position: absolute;
    right: 0.3rem;
    bottom: 0.35rem;
    z-index: 2;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.message-send-btn.message-send-btn--inside .message-send-arrow-svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.message-send-btn.message-send-btn--inside:hover:not(:disabled) .message-send-arrow-svg {
    transform: translateX(1px);
}

.message-send-btn.message-send-btn--inside:active:not(:disabled) .message-send-arrow-svg {
    transform: translateX(2px);
}

.message-send-btn.message-send-btn--inside:hover:not(:disabled) {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.message-send-btn.message-send-btn--inside:active:not(:disabled) {
    transform: scale(0.94);
}

.message-send-btn.message-send-btn--inside:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.35);
}

.message-send-btn.message-send-btn--inside:disabled {
    opacity: 1;
    cursor: wait;
    transform: none;
    background: rgba(var(--primary-rgb), 0.08);
}

.message-send-btn.message-send-btn--inside .spinner-border-sm {
    width: 1.125rem;
    height: 1.125rem;
    border-width: 0.14em;
    border-color: rgba(var(--primary-rgb), 0.3);
    border-right-color: var(--primary);
}

.messages-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    padding: 2rem;
    text-align: center;
}

.messages-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.messages-empty-icon i {
    font-size: 1.75rem;
    color: var(--text-muted);
}

.messages-empty-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 280px;
}

.messages-empty-text p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.messages-empty-text span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.matches-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 2rem 1rem;
    text-align: center;
}

.matches-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
}

.matches-empty-icon i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.matches-empty-text {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    max-width: 240px;
}

.matches-empty-text p {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.matches-empty-text span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.messages-area-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    padding: 3rem 2rem;
    text-align: center;
}

.messages-area-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.messages-area-empty-icon i {
    font-size: 2rem;
    color: var(--text-muted);
}

.messages-area-empty-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 320px;
}

.messages-area-empty-text h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.messages-area-empty-text p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .messages-empty {
        min-height: 150px;
        padding: 1.5rem 1rem;
    }

    .messages-empty-icon {
        width: 56px;
        height: 56px;
    }

    .messages-empty-icon i {
        font-size: 1.5rem;
    }

    .messages-empty-text {
        max-width: 240px;
    }

    .messages-empty-text p {
        font-size: 0.9375rem;
    }

    .messages-empty-text span {
        font-size: 0.8125rem;
    }

    .matches-empty {
        min-height: 120px;
        padding: 1.5rem 0.75rem;
    }

    .matches-empty-icon {
        width: 48px;
        height: 48px;
    }

    .matches-empty-icon i {
        font-size: 1.25rem;
    }

    .matches-empty-text {
        max-width: 200px;
    }

    .matches-empty-text p {
        font-size: 0.875rem;
    }

    .matches-empty-text span {
        font-size: 0.75rem;
    }

    .messages-area-empty {
        min-height: 300px;
        padding: 2rem 1rem;
    }

    .messages-area-empty-icon {
        width: 64px;
        height: 64px;
    }

    .messages-area-empty-icon i {
        font-size: 1.75rem;
    }

    .messages-area-empty-text {
        max-width: 280px;
    }

    .messages-area-empty-text h3 {
        font-size: 1.125rem;
    }

    .messages-area-empty-text p {
        font-size: 0.875rem;
    }
}

/* Reply to message functionality */
.message-item {
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-item:hover {
    opacity: 0.9;
}

.message-item:not(.replying):hover .message-bubble {
    transform: translateY(-1px);
}

.message-item.message-incoming:not(.replying):hover .message-bubble {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.message-item.message-outgoing:not(.replying):hover .message-bubble {
    background: var(--message-outgoing-bg-hover);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-item.replying {
    animation: message-pulse 0.5s ease;
}

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

.message-item.replying .message-bubble {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3);
    border-color: var(--primary);
}

.message-reply-preview {
    display: none;
    background: rgba(var(--primary-rgb), 0.05);
    border-left: 3px solid var(--primary);
    border-top: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    border-radius: 0;
}

.message-reply-preview.active {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.message-reply-preview-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 2rem;
}

.message-reply-preview-info {
    flex: 1;
    min-width: 0;
}

.message-reply-preview-author {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.message-reply-preview-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.message-reply-preview-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    padding: 0;
}

.message-reply-preview-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.message-reply-indicator {
    display: none;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid var(--border-light);
    font-style: italic;
    opacity: 0.7;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-item.has-reply .message-reply-indicator {
    display: block;
}

.message-item.message-outgoing .message-reply-indicator {
    color: var(--text-secondary);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.message-reply-quote {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: transparent;
    border-left: 2px solid var(--primary);
    border-radius: 0;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-item.message-outgoing .message-reply-quote {
    background: transparent;
    border-left-color: var(--text-muted);
    color: var(--text-secondary);
}

.message-reply-quote-author {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--primary);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-item.message-outgoing .message-reply-quote-author {
    color: var(--text);
}

.message-reply-quote-text {
    font-size: 0.8125rem;
    opacity: 0.85;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.4;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Редактирование сообщений через двойной клик */

/* Режим редактирования через поле ввода */
.message-item.editing {
    opacity: 0.7;
}

/* Режим выбора сообщений */
.messages-select-mode {
    display: none;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.messages-select-mode.active {
    display: flex;
}

.messages-select-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.messages-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.messages-cancel-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.messages-cancel-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.messages-cancel-btn i {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messages-select-text {
    font-size: 0.9375rem;
    color: var(--text);
    font-weight: 500;
}

.messages-select-count {
    font-weight: 600;
    color: var(--primary);
}

.messages-select-actions {
    display: flex;
    gap: 0.5rem;
}

.messages-select-actions .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
}

.messages-select-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message-item.selectable {
    position: relative;
    padding-left: 2.5rem !important;
}

.message-item.selectable.message-outgoing {
    padding-left: 2.5rem !important;
    padding-right: 0 !important;
}

.message-item.selectable::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg);
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 5;
    flex-shrink: 0;
    box-sizing: border-box;
}

.message-item.selectable.selected::before {
    background: var(--primary);
    border-color: var(--primary);
}

.message-item.selectable.selected::after {
    content: '✓';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 6;
    pointer-events: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.messages-list.select-mode {
    padding-left: 0;
}

.messages-list.select-mode .message-item {
    cursor: pointer;
    margin-left: 0;
    margin-right: 0;
}

.messages-list.select-mode .message-item:hover {
    background: transparent;
}

.messages-list.select-mode .message-item.selected {
    background: transparent;
}

.messages-input.select-mode-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.messages-input.select-mode-disabled .form-control {
    background: transparent;
    cursor: not-allowed;
}

.messages-input.select-mode-disabled .messages-input-composer {
    opacity: 0.85;
}

.message-reply-preview.editing {
    border-left-color: #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.message-reply-preview.editing .message-reply-preview-author {
    color: #ffc107;
}

.message-reply-preview.editing .message-reply-preview-author::before {
    content: 'Редактирование: ';
    font-weight: 600;
}

/* Индикатор редактирования */
.message-edited-indicator {
    display: inline;
    font-size: 0.6875rem;
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-item.message-outgoing .message-edited-indicator {
    color: var(--text-muted);
    opacity: 0.85;
}


/* Адаптивность для сообщений */
@media (max-width: 991px) {
    .messages-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 50vh;
    }

    .messages-area {
        height: calc(50vh - 1px);
    }

    .messages-container-scroll {
        padding: 1rem;
    }

    .messages-loading-gate {
        padding: 1rem;
    }

    .message-item {
        max-width: 85%;
    }

    .messages-input {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .messages-sidebar {
        max-height: none;
        height: 100%;
        border-bottom: none;
    }

    .messages-area {
        display: flex;
        height: 100%;
    }

    .messages-sidebar.hidden {
        display: none;
    }
    
    /* На странице view скрываем сайдбар в мобильной версии */
    .messages-view-page .messages-sidebar {
        display: none;
    }
    
    /* На странице index скрываем область сообщений в мобильной версии */
    .messages-index-page .messages-area {
        display: none;
    }

    .messages-back-btn {
        display: flex;
    }

    .messages-sidebar-header {
        padding: 1rem;
    }

    .messages-sidebar-header h1 {
        font-size: 1.125rem;
    }

    .matches-header {
        padding: 0.875rem 1rem 0.625rem;
    }

    .matches-header h2 {
        font-size: 0.9375rem;
    }

    .matches-list-container {
        padding: 0.875rem 1rem;
    }

    .chat-item {
        padding: 0.875rem 1rem;
    }

    .chat-item-avatar img {
        width: 44px;
        height: 44px;
    }

    .messages-header {
        padding: 0.875rem 1rem;
    }

    .messages-header-avatar img {
        width: 40px;
        height: 40px;
    }

    .messages-container-scroll {
        padding: 0.75rem;
    }

    .messages-loading-gate {
        padding: 0.75rem;
    }

    .message-bubble {
        padding: 0.625rem 0.875rem;
    }

    .message-text {
        font-size: 0.875rem;
    }

    .messages-input {
        padding: 0.625rem 0.75rem;
    }

    .messages-input-actions .btn-link {
        font-size: 1.125rem;
        padding: 0.375rem;
    }

    .message-send-btn.message-send-btn--inside {
        width: 2.1rem;
        height: 2.1rem;
        right: 0.25rem;
        bottom: 0.3rem;
        font-size: 1.05rem;
    }

    .messages-input-composer .messages-input-field .form-control {
        padding-right: 2.55rem;
    }

    .message-reply-preview {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.375rem;
    }

    .message-reply-preview-author {
        font-size: 0.75rem;
    }

    .message-reply-preview-text {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .message-reply-preview-close {
        width: 20px;
        height: 20px;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.875rem;
    }

    .message-reply-quote {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }

    .message-reply-quote-author {
        font-size: 0.6875rem;
    }

    .message-reply-quote-text {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .messages-select-mode {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .messages-select-actions {
        width: 100%;
        margin-top: 0.5rem;
    }

    .messages-select-actions .btn {
        flex: 1;
    }

    .messages-instructions {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .messages-instructions-header {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
    }

    .instructions-item {
        font-size: 0.8125rem;
        gap: 0.625rem;
    }

    .instructions-item i {
        font-size: 0.9375rem;
    }

    .message-item.selectable {
        padding-left: 2rem;
    }

    .message-item.selectable::before {
        left: 0.375rem;
        width: 18px;
        height: 18px;
    }

    .message-item.selectable.selected::after {
        left: 0.375rem;
        width: 18px;
        height: 18px;
        font-size: 0.75rem;
    }

    .messages-list.select-mode {
        padding-left: 0;
    }

    .messages-cancel-btn {
        padding: 0.3rem 0.75rem;
        font-size: 0.8125rem;
    }

    .messages-cancel-btn i {
        font-size: 0.8125rem;
        margin-right: 0.375rem;
    }

    .messages-select-text {
        font-size: 0.875rem;
    }

    .messages-select-mode {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .messages-select-info {
        gap: 0.75rem;
    }
}

/* Search Page Styles */
.search-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.search-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.search-page-title i {
    color: var(--primary);
    font-size: 1.75rem;
}

.search-page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.search-page-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.search-page-toolbar .search-page-header {
    margin-bottom: 0;
    text-align: center;
}

.search-page-toolbar .search-page-title {
    justify-content: center;
}

.search-filters-toggle {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.search-filters-toggle:hover {
    background: rgba(var(--primary-rgb), 0.14);
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--primary);
}

#searchFiltersCollapse.search-filters-collapse--static,
#searchFiltersCollapse.search-filters-collapse--static.collapsing {
    transition: none !important;
}

@media (min-width: 576px) {
    .search-page-toolbar {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1.25rem;
    }

    .search-page-toolbar .search-page-header {
        text-align: left;
    }

    .search-page-toolbar .search-page-title {
        justify-content: flex-start;
    }

    .search-filters-toggle {
        align-self: flex-start;
    }
}

.search-form-wrapper {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
}

.search-form-modern {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.search-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.search-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.search-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-filter-label i {
    color: var(--primary);
    font-size: 1rem;
}

.search-filter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: var(--bg-light);
    color: var(--text);
}

.search-filter-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

/* Custom Select Widget Styles */
.custom-select-wrapper {
    position: relative !important;
    width: 100% !important;
    overflow: visible !important;
}

.custom-select-input {
    width: 100% !important;
}

.custom-select-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 0.25rem !important;
    background: var(--bg) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    z-index: 9999 !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: none !important;
}

.custom-select-results {
    padding: 0.5rem !important;
    margin: 0 !important;
    list-style: none !important;
}

.custom-select-item {
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    color: var(--text) !important;
    font-size: 0.9375rem !important;
    margin: 0 !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.custom-select-item:hover {
    background: var(--bg-hover) !important;
    color: var(--primary) !important;
}

.custom-select-item:active {
    background: var(--primary) !important;
    color: white !important;
}

.search-interest-tag {
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-interest-tag:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.search-interest-tag.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.search-interest-tag.active:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

.search-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-search-primary {
    padding: 0.5rem 2rem;
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-search-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-search-reset {
    padding: 0.5rem 2rem;
    background: var(--bg-light);
    border-color: var(--border);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-search-reset:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text);
}

.search-results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.search-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.search-results-count {
    color: var(--primary);
    font-weight: 700;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-card-new {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.user-card-new:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.user-card-new-link {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.user-card-new-link:hover {
    text-decoration: none;
    color: inherit;
}

.user-card-new-avatar {
    position: relative;
    width: 100%;
    height: 250px;
    margin: 0 0 1rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: none;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.user-card-new:hover .user-card-new-avatar {
    transform: scale(1.02);
}

.user-card-new-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
}

.user-card-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.user-card-avatar-placeholder i {
    font-size: 3.5rem;
    opacity: 0.4;
}

.user-online-status-new {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: #CBD5E0;
    border: 3px solid var(--bg);
    border-radius: 50%;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-online-status-new.online {
    background: #10B981;
}

.user-card-new-content {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.user-card-new-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-card-new-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.user-online-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: #10B981;
    padding: 0.125rem 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
}

.user-card-new-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-card-new-age {
    font-weight: 500;
}

.user-card-new-separator {
    color: var(--text-muted);
}

.user-card-new-city {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-card-new-city i {
    color: var(--primary);
    font-size: 0.875rem;
}

.user-card-new-seeking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 12px;
    font-size: 0.8125rem;
    color: #FF6B9D;
    font-weight: 500;
}

.user-card-new-seeking i {
    font-size: 0.875rem;
}

.user-card-new-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.user-card-new-tag {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.user-card-new-tag i {
    color: var(--primary);
    font-size: 0.75rem;
}

.user-card-new-interests {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.user-card-new-interest-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0.25rem 0.625rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.user-card-new:hover .user-card-new-interest-tag {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
}

.user-card-new-action {
    display: none;
}

/* Search Empty State - используем те же стили что и для swipe */
.search-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem 1rem;
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .search-empty-state {
        min-height: 300px;
        padding: 2rem 1rem;
    }
}

/* Старый стиль для обратной совместимости */
.search-empty-state-old {
    padding: 3rem 1rem;
}

/* Pagination Styles */
.pagination-new-wrapper {
    margin-top: 3rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.pagination-new {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-new li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Активная страница */
.pagination-new li.active .pagination-btn {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 600;
    cursor: default;
}

.pagination-new li.active .pagination-btn:hover {
    background: rgba(var(--primary-rgb), 0.1) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.pagination-new li.disabled .pagination-btn {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    color: var(--text-muted);
}

/* Скрываем точки (ellipsis) */
.pagination-new li span {
    display: none !important;
}

/* Адаптивность для страницы поиска */
@media (max-width: 768px) {
    .search-page-title {
        font-size: 1.5rem;
    }

    .search-filters-toggle {
        width: 100%;
        align-self: stretch;
    }

    .search-form-wrapper {
        padding: 1.5rem;
    }

    .search-filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-form-actions {
        flex-direction: column;
    }

    .btn-search-primary,
    .btn-search-reset {
        width: 100%;
        justify-content: center;
    }

    .users-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .user-card-new-link {
        padding: 1.25rem;
    }

    .user-card-new-avatar {
        height: 280px;
    }

    .user-card-new-name {
        font-size: 1.125rem;
    }

    .user-card-new-info {
        font-size: 0.8125rem;
    }

    .user-card-new-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Swipe Cards */
.swipe-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 2rem auto;
    height: 1px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.swipe-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swipe-card {
    position: absolute;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 650px;
    border-radius: 24px;
    overflow: visible;
    box-shadow: var(--shadow-lg);
    cursor: grab;
    user-select: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    background: var(--bg);
    will-change: transform;
    transform-origin: center center;
}

.swipe-card:active {
    cursor: grabbing;
}

.swipe-card.active {
    z-index: 3;
    transform: scale(1);
    opacity: 1;
}

.swipe-card.next {
    z-index: 2;
    transform: scale(0.95) translateY(20px);
    opacity: 1;
}

.swipe-card.behind {
    z-index: 1;
    transform: scale(0.9) translateY(40px);
    opacity: 1;
}

.swipe-card-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
}

.swipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

.swipe-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3), transparent);
    padding: 2rem 1.5rem 1.5rem;
    color: white;
}

.swipe-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.swipe-card-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.swipe-card-details {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.swipe-card-details i {
    color: white;
    font-size: 0.875rem;
}

.swipe-separator {
    color: rgba(255, 255, 255, 0.6);
}

.swipe-card-profession,
.swipe-card-education {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.swipe-card-profession i,
.swipe-card-education i {
    color: white;
    font-size: 0.875rem;
}

.swipe-card-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.swipe-interest-tag {
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

/* Swipe animations */
.swipe-card.swipe-like {
    transform: translateX(100vw) rotate(30deg);
    opacity: 0;
}

.swipe-card.swipe-dislike {
    transform: translateX(-100vw) rotate(-30deg);
    opacity: 0;
}

.swipe-action-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    pointer-events: none;
}

.swipe-action-indicator i {
    position: relative;
    z-index: 2;
}

.swipe-like-indicator {
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 40px rgba(16, 185, 129, 0.8)) drop-shadow(0 0 60px rgba(16, 185, 129, 0.6));
}

.swipe-dislike-indicator {
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 50px rgba(239, 68, 68, 1)) drop-shadow(0 0 80px rgba(239, 68, 68, 0.9)) drop-shadow(0 0 100px rgba(239, 68, 68, 0.7));
}

.swipe-card.swipe-like-preview .swipe-like-indicator,
.swipe-card.swipe-dislike-preview .swipe-dislike-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* Swipe Actions */
.swipe-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding-bottom: 2rem;
}

.btn-swipe {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-swipe::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-swipe:active::before {
    width: 300px;
    height: 300px;
}

.btn-swipe:active {
    transform: scale(0.92);
}

.btn-swipe-dislike {
    background: linear-gradient(135deg, #6C757D, #868E96, #ADB5BD);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.4);
    animation: gradient-shift 4s ease infinite;
    position: relative;
    overflow: visible;
}

.btn-swipe-dislike:hover {
    box-shadow: 0 8px 28px rgba(108, 117, 125, 0.5), 0 0 0 4px rgba(108, 117, 125, 0.15);
    animation: gradient-shift 2s ease infinite, pulse-shadow-dislike 2s ease infinite;
    transform: translateY(-2px);
}

.btn-swipe-dislike i {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.btn-swipe-dislike:hover i {
    animation: icon-pulse 1.5s ease infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.btn-swipe-like {
    background: linear-gradient(135deg, #10B981, #34D399, #6EE7B7);
    background-size: 200% 200%;
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    animation: gradient-shift 4s ease infinite;
    position: relative;
    overflow: visible;
}

.btn-swipe-like:hover {
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5), 0 0 0 4px rgba(16, 185, 129, 0.15);
    animation: gradient-shift 2s ease infinite, pulse-shadow-like 2s ease infinite;
    transform: translateY(-2px);
}

.btn-swipe-like i {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.btn-swipe-like:hover i {
    animation: heartbeat 1s ease infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* Empty State */
.swipe-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
    padding: 2rem 1rem;
}

.empty-state-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 320px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

.empty-state-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.empty-state-icon-wrapper i {
    font-size: 2rem;
    color: var(--text-muted);
}

.empty-state-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.empty-state-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.empty-state-description div {
    line-height: 1.5;
}

.empty-state-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    transition: all 0.15s ease;
    margin-top: 0.5rem;
}

.empty-state-link:hover {
    color: var(--primary);
    background: var(--bg-hover);
    border-color: var(--primary);
}

.empty-state-link span {
    display: flex;
    align-items: center;
    line-height: 1;
}

.empty-state-link i {
    font-size: 0.875rem;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-top: 1px;
}

.empty-state-link:hover i {
    transform: translateX(2px);
}

.swipe-container {
    min-height: 400px;
    height: 1px;
}

@media (min-height: 768px) {
    .swipe-container {
        min-height: 500px;
    }
}

@media (min-height: 912px) {
    .swipe-container {
        min-height: 550px;
    }
}

@media (min-height: 1024px) {
    .swipe-container {
        min-height: 600px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .swipe-container {
        margin-top: 1rem;
        max-width: 100%;
        padding: 0 0.75rem;
    }

    .swipe-card {
        max-width: 100%;
        max-height: calc(100vh - 280px);
        border-radius: 20px;
    }

    .swipe-card-image {
        border-radius: 20px;
    }

    .swipe-card-image img {
        border-radius: 20px;
    }

    .swipe-card.next {
        transform: scale(0.97) translateY(15px);
    }

    .swipe-card.behind {
        transform: scale(0.94) translateY(30px);
    }

    .swipe-card-overlay {
        padding: 1.5rem 1rem 1rem;
    }

    .swipe-card-name {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .swipe-card-details {
        font-size: 0.875rem;
        gap: 0.375rem;
    }

    .swipe-card-profession,
    .swipe-card-education {
        font-size: 0.875rem;
    }

    .swipe-card-interests {
        gap: 0.375rem;
        margin-top: 0.375rem;
    }

    .swipe-interest-tag {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }

    .swipe-actions {
        gap: 2rem;
        padding-bottom: 1rem;
        position: fixed;
        left: 0;
        right: 0;
        z-index: 10;
    }

    .swipe-actions {
        gap: 2.5rem;
    }

    .btn-swipe {
        width: 64px;
        height: 64px;
        font-size: 1.625rem;
    }

    .btn-swipe:active {
        transform: scale(0.92);
    }

    .empty-state-wrapper {
        max-width: 100%;
        gap: 1.25rem;
    }

    .empty-state-icon-wrapper {
        width: 64px;
        height: 64px;
    }

    .empty-state-icon-wrapper i {
        font-size: 1.75rem;
    }

    .empty-state-title {
        font-size: 1rem;
    }

    .empty-state-description {
        font-size: 0.8125rem;
    }

    .empty-state-link {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .swipe-action-indicator {
        font-size: 4.5rem;
    }
}

/* Home Page Styles - Modern Version */
.home-page {
    overflow-x: hidden;
}

/* Hero Section Modern */
.hero-section-modern {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ef1 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.9;
}

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

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.hero-particles .particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.hero-particles .particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.hero-particles .particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 20s;
}

.hero-particles .particle:nth-child(4) {
    left: 70%;
    animation-delay: 1s;
    animation-duration: 16s;
}

.hero-particles .particle:nth-child(5) {
    left: 85%;
    animation-delay: 3s;
    animation-duration: 19s;
}

.hero-particles .particle:nth-child(6) {
    left: 20%;
    animation-delay: 5s;
    animation-duration: 17s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

.hero-content-modern {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text-modern {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.hero-badge i {
    color: #ff6b9d;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
}

.hero-title-modern {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.title-line {
    display: block;
    animation: slideInLeft 0.8s ease-out;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.title-line:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.title-accent {
    background: linear-gradient(135deg, #ffd700, #ff6b9d, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

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

.hero-subtitle-modern {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-stats-modern {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card-modern {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 180px;
    transition: all 0.3s ease;
}

.stat-card-modern:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    color: white;
}

.hero-actions-modern {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: #764ef1;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: #764ef1;
}

.btn-hero-primary i {
    transition: transform 0.3s ease;
}

.btn-hero-primary:hover i {
    transform: translateX(5px);
}

.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    color: white;
}

.hero-visual-modern {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
    animation: floatCard 6s ease-in-out infinite;
}

.floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.card-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.card-2 {
    top: 150px;
    right: 0;
    animation-delay: 2s;
}

.card-3 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(2deg);
    }
    50% {
        transform: translateY(-10px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* Quick Search Modern */
.quick-search-modern {
    padding: 4rem 0;
    background: var(--bg);
}

.search-card-modern {
    background: linear-gradient(135deg, rgba(118, 74, 241, 0.1), rgba(79, 172, 254, 0.1));
    border: 2px solid rgba(118, 74, 241, 0.2);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 10px 50px rgba(118, 74, 241, 0.1);
    backdrop-filter: blur(10px);
}

.search-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.search-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.search-title i {
    color: #ffd700;
    animation: rotate 3s linear infinite;
}

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

.search-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.search-form-modern {
    margin-top: 2rem;
}

.search-preview {
    margin-top: 2rem;
}

.search-preview-filters {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.filter-preview:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-5px);
}

.filter-preview i {
    font-size: 2rem;
    color: var(--primary);
}

.filter-preview span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.search-cta {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.search-cta-text {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.interests-preview {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 20px;
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.interest-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(118, 74, 241, 0.1), rgba(79, 172, 254, 0.1));
    border: 2px solid rgba(118, 74, 241, 0.2);
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.3s ease;
}

.interest-tag:hover {
    background: linear-gradient(135deg, rgba(118, 74, 241, 0.2), rgba(79, 172, 254, 0.2));
    border-color: rgba(118, 74, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(118, 74, 241, 0.2);
}

.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label i {
    color: var(--primary);
}

.filter-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 15px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(118, 74, 241, 0.1);
    transform: translateY(-2px);
}

.btn-search-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(118, 74, 241, 0.3);
    text-decoration: none;
}

.btn-search-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(118, 74, 241, 0.4);
    color: white;
}

.btn-search-modern i {
    font-size: 1.125rem;
}

/* Popular Profiles Modern */
.popular-profiles-modern {
    padding: 5rem 0;
    background: linear-gradient(to bottom, var(--bg), var(--bg-light));
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    gap: 2rem;
}

.section-title-modern {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-view-all:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.profiles-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.profile-card-modern {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.profile-card-modern:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px rgba(118, 74, 241, 0.2);
}

.profile-image-modern {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ef1);
}

.profile-image-modern img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-card-modern:hover .profile-image-modern img {
    transform: scale(1.1);
}

.btn-profile-full {
    width: 100%;
    justify-content: center;
}

.profile-badge-modern {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ffd700, #ff6b9d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.profile-status-modern {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6c757d;
    border: 3px solid white;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-status-modern.online {
    background: #28a745;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
}

.profile-info-modern {
    padding: 1.5rem;
}

.profile-name-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.profile-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-location i {
    font-size: 0.875rem;
}

.profile-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-actions-modern {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-like-modern {
    width: 45px;
    height: 45px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-like-modern:hover {
    border-color: #ff6b9d;
    color: #ff6b9d;
    transform: scale(1.1);
}

.btn-like-modern.liked {
    background: linear-gradient(135deg, #ff6b9d, #ffd700);
    border-color: transparent;
    color: white;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
}

.btn-profile-primary {
    flex: 1;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

.btn-profile-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(118, 74, 241, 0.3);
    color: white;
}

/* Features Modern */
.features-modern {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(118, 74, 241, 0.05), rgba(79, 172, 254, 0.05));
}

.features-header {
    text-align: center;
    margin-bottom: 4rem;
}

.features-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
}

.features-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card-modern {
    background: white;
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.feature-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(118, 74, 241, 0.15);
    border-color: var(--primary);
}

.feature-icon-modern {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(118, 74, 241, 0.3);
    transition: all 0.3s ease;
}

.feature-card-modern:hover .feature-icon-modern {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(118, 74, 241, 0.4);
}

.feature-title-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.feature-desc-modern {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Адаптивность */
@media (max-width: 991px) {
    .hero-content-modern {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title-modern {
        font-size: 2.5rem;
    }

    .hero-visual-modern {
        height: 400px;
    }

    .floating-card {
        width: 150px;
        height: 150px;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .btn-search-modern {
        width: 100%;
    }

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

    .section-title-modern {
        font-size: 2rem;
    }

    .profiles-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section-modern {
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-title-modern {
        font-size: 2rem;
    }

    .hero-subtitle-modern {
        font-size: 1rem;
    }

    .hero-stats-modern {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-card-modern {
        min-width: 100%;
    }

    .hero-actions-modern {
        flex-direction: column;
    }

    .hero-actions-modern .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual-modern {
        height: 300px;
    }

    .floating-card {
        width: 120px;
        height: 120px;
    }

    .search-card-modern {
        padding: 2rem 1.5rem;
    }

    .search-title {
        font-size: 1.75rem;
    }

    .search-preview-filters {
        gap: 1rem;
    }

    .filter-preview {
        padding: 1rem;
        min-width: 100px;
    }

    .filter-preview i {
        font-size: 1.5rem;
    }

    .search-cta {
        padding: 1.5rem;
    }

    .mobile-auth-buttons {
        gap: 0.375rem;
    }

    .mobile-auth-buttons .btn {
        padding: 0.3rem 0.625rem;
        font-size: 0.8125rem;
    }

    .features-title {
        font-size: 2rem;
    }

    .profiles-grid-modern {
        grid-template-columns: 1fr;
    }

    .features-grid-modern {
        grid-template-columns: 1fr;
    }

    .interests-preview {
        padding: 1.5rem;
    }

    .interests-tags {
        gap: 0.5rem;
    }

    .interest-tag {
        padding: 0.4rem 1rem;
        font-size: 0.875rem;
    }
}

/* Footer Modern */
.footer-modern {
    background: #1a1a1a;
    color: #ffffff;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 4rem;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.footer-logo .brand-icon {
    font-size: 1.75rem;
}

.footer-logo .brand-text {
    background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-nav {
    display: flex;
    gap: 4rem;
    justify-content: center;
}

.footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    width: fit-content;
}

.footer-nav-link:hover {
    color: #ffffff;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.footer-contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-contact-link:hover {
    color: #ffffff;
}

.footer-contact-link i {
    font-size: 1rem;
    opacity: 0.8;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.social-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 2rem;
    }

    .footer-contact {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .footer-modern {
        padding: 3rem 0 1.5rem;
        margin-top: 4rem;
    }

    .footer-wrapper {
        gap: 2rem;
    }

    .footer-top {
        gap: 2.5rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .footer-social {
        align-self: flex-start;
    }
}

/* Register Page */
.register-page {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding: 4rem 0;
}

.register-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.register-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.register-header {
    text-align: center;
    margin-bottom: 3rem;
}

.register-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.register-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.register-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 0;
}

.register-form {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(118, 74, 241, 0.1);
}

.form-section-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

.form-section-description {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: -0.5rem 0 0.5rem 0;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

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

.password-toggle i {
    font-size: 1.125rem;
}

.form-text {
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    display: block;
}

.agreement-check {
    padding: 1rem;
    background: rgba(118, 74, 241, 0.05);
    border: 1px solid rgba(118, 74, 241, 0.1);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.agreement-check:last-child {
    margin-bottom: 0;
}

.agreement-check .form-check-label {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.agreement-check .form-check-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.agreement-check .form-check-label a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    padding-top: 1rem;
}

.btn-register-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(118, 74, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-register-submit:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(118, 74, 241, 0.4);
    color: white;
}

.btn-register-submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-footer-text {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

.form-footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-footer-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .register-page {
        padding: 2rem 0;
    }

    .register-wrapper {
        border-radius: 20px;
    }

    .register-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .register-icon {
        font-size: 2rem;
    }

    .register-subtitle {
        font-size: 1rem;
    }

    .form-section {
        gap: 1.25rem;
    }

    .form-section-title {
        font-size: 1.125rem;
    }

    .btn-register-submit {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Login Page */
.login-page {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding: 4rem 0;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.login-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 3rem;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.login-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.login-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 0;
}

.login-form {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    margin: 0;
    display: flex;
    align-items: center;
}

.remember-me .form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
}

.remember-me .form-check-label {
    font-size: 0.9375rem;
    color: var(--text);
    cursor: pointer;
    margin: 0;
    display: flex;
    align-items: center;
}

.forgot-password-link {
    font-size: 0.9375rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.forgot-password-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.btn-login-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(118, 74, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login-submit:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(118, 74, 241, 0.4);
    color: white;
}

.btn-login-submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .login-page {
        padding: 2rem 0;
    }

    .login-wrapper {
        border-radius: 20px;
    }

    .login-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .login-icon {
        font-size: 2rem;
    }

    .login-subtitle {
        font-size: 1rem;
    }

    .login-form {
        gap: 1.5rem;
    }

    .btn-login-submit {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Reset Password Page */
.reset-password-page {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding: 4rem 0;
}

.reset-password-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.reset-password-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.reset-password-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.reset-password-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.reset-password-icon {
    font-size: 2rem;
    color: var(--primary);
}

.reset-password-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

.reset-password-form {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.btn-reset-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.0625rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(118, 74, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-reset-submit:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(118, 74, 241, 0.4);
    color: white;
}

.btn-reset-submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forgot Password Page */
.forgot-password-page {
    background: linear-gradient(180deg, rgba(118, 74, 241, 0.02) 0%, rgba(79, 172, 254, 0.02) 100%);
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.forgot-password-container {
    max-width: 500px;
    margin: 0 auto;
}

.forgot-password-wrapper {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.08);
}

.forgot-password-header {
    text-align: center;
    margin-bottom: 3rem;
}

.forgot-password-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    line-height: 1.2;
    flex-wrap: wrap;
}

.forgot-password-icon {
    font-size: 2.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.forgot-password-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin: 0;
}

.forgot-password-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.btn-forgot-password-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-forgot-password-submit:hover {
    background: #6a42e8;
}

.btn-forgot-password-submit:active {
    background: #5d3dd6;
}

.btn-forgot-password-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(118, 74, 241, 0.2);
}

@media (max-width: 768px) {
    .forgot-password-page {
        padding: 2rem 0;
    }

    .forgot-password-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .forgot-password-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
        line-height: 1.3;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .forgot-password-link {
        align-self: flex-end;
    }

    .forgot-password-icon {
        font-size: 2rem;
    }

    .forgot-password-subtitle {
        font-size: 1rem;
    }

    .forgot-password-form {
        gap: 1.5rem;
    }

    .btn-forgot-password-submit {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* ============================================
   Кастомные стили для алертов Bootstrap
   ============================================ */

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    position: relative;
    font-size: 0.9375rem;
    line-height: 1.5;
    background: var(--bg);
    animation: alert-slide-in 0.3s ease-out;
    transition: all 0.2s ease;
}

.alert:hover {
    box-shadow: var(--shadow-md);
}

@keyframes alert-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 0;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-success::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.alert-success i {
    color: #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.03) 100%);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-danger::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.alert-danger i {
    color: #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-warning::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.alert-warning i {
    color: #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-info::before {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.alert-info i {
    color: #3b82f6;
}

.alert-primary {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0.03) 100%);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.alert-primary::before {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
}

.alert-primary i {
    color: var(--primary);
}

.alert-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.alert-body > * {
    margin: 0;
}

.alert-heading {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: inherit;
}

.alert-link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.alert-link:hover {
    opacity: 0.8;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible {
    padding-right: 2.75rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.25rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    opacity: 0.5;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.1);
}

.alert-dismissible .btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.alert-dismissible .btn-close::before {
    content: '×';
    font-size: 1.375rem;
    line-height: 1;
    color: currentColor;
    font-weight: 300;
    display: block;
}

/* Переопределяем стандартный стиль Bootstrap для btn-close в алертах */
.alert .btn-close {
    background-image: none;
    opacity: 0.5;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Иконки для алертов */
.alert i {
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    line-height: 1;
}

.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Анимация для закрытия алерта */
.alert.fade {
    transition: opacity 0.15s linear;
}

.alert.fade:not(.show) {
    opacity: 0;
}

.alert.showing {
    opacity: 0;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.875rem;
        min-height: 3rem;
    }

    .alert-dismissible {
        padding-right: 2.75rem;
    }

    .alert-dismissible .btn-close {
        top: 50%;
        right: 0.625rem;
        transform: translateY(-50%);
        width: 1.5rem;
        height: 1.5rem;
    }

    .alert-dismissible .btn-close:hover {
        transform: translateY(-50%) scale(1.1);
    }

    .alert-icon {
        font-size: 1.125rem !important;
    }
}

/* ============================================
   Кастомные стили для Lobibox уведомлений
   ============================================ */

.lobibox-notify {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow) !important;
    border: none !important;
    min-height: 80px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
    position: relative;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Иконка */
.lobibox-notify-icon-wrapper {
    left: 1.25rem !important;
    width: 48px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.lobibox-notify-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.lobibox-notify-icon > div {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lobibox-notify-icon > div .icon-el {
    font-size: 1.875rem !important;
    line-height: 1 !important;
}

/* Тело уведомления */
.lobibox-notify-body {
    flex: 1 !important;
    margin: 0 !important;
    padding: 1rem 3rem 1rem 0.75rem !important;
    min-width: 0 !important;
}

.lobibox-notify-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.375rem !important;
    line-height: 1.4 !important;
    color: inherit !important;
}

.lobibox-notify-msg {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    color: inherit !important;
    opacity: 0.95;
}

/* Кнопка закрытия */
.lobibox-close {
    position: absolute !important;
    right: 0.875rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1.75rem !important;
    height: 1.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    background: transparent !important;
    opacity: 0.7 !important;
    cursor: pointer !important;
    color: inherit !important;
    border-radius: 4px !important;
    transition: opacity 0.2s ease !important;
}

.lobibox-close:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Индикатор задержки */
.lobibox-delay-indicator {
    position: absolute !important;
    bottom: 0 !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    height: 2px !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 2px !important;
    overflow: hidden !important;
}

.lobibox-delay-indicator > div {
    height: 100% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    transition: width linear !important;
    border-radius: 2px !important;
}

/* Success уведомление */
.lobibox-notify-success {
    background: #10b981 !important;
    color: white !important;
}

.lobibox-notify-success .lobibox-delay-indicator > div {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Error уведомление */
.lobibox-notify-error {
    background: #ef4444 !important;
    color: white !important;
}

.lobibox-notify-error .lobibox-delay-indicator > div {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Warning уведомление */
.lobibox-notify-warning {
    background: #f59e0b !important;
    color: white !important;
}

.lobibox-notify-warning .lobibox-delay-indicator > div {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Info уведомление */
.lobibox-notify-info {
    background: #3b82f6 !important;
    color: white !important;
}

.lobibox-notify-info .lobibox-delay-indicator > div {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Default уведомление */
.lobibox-notify-default {
    background: var(--bg) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
}

.lobibox-notify-default .lobibox-delay-indicator > div {
    background: var(--primary) !important;
}

.lobibox-notify-default .lobibox-close {
    color: var(--text-secondary) !important;
}

/* Без иконки */
.lobibox-notify.without-icon .lobibox-notify-body {
    padding-left: 1.25rem !important;
}

/* Обертка для уведомлений */
.lobibox-notify-wrapper {
    z-index: 9999 !important;
}

.lobibox-notify-wrapper.top {
    top: 1rem !important;
}

.lobibox-notify-wrapper.bottom {
    bottom: 1rem !important;
}

.lobibox-notify-wrapper.right {
    right: 1rem !important;
}

.lobibox-notify-wrapper.left {
    left: 1rem !important;
}

/* Простая анимация появления */
@keyframes lobibox-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lobibox-notify {
    animation: lobibox-fade-in 0.2s ease-out;
}

/* Мини версия */
.lobibox-notify.notify-mini {
    min-height: 56px !important;
}

.lobibox-notify.notify-mini .lobibox-notify-icon-wrapper {
    left: 1rem !important;
    width: 36px !important;
}

.lobibox-notify.notify-mini .lobibox-notify-icon > div .icon-el {
    font-size: 1.5rem !important;
}

.lobibox-notify.notify-mini .lobibox-notify-body {
    padding: 0.75rem 2.5rem 0.75rem 0.5rem !important;
}

.lobibox-notify.notify-mini .lobibox-notify-title {
    font-size: 0.875rem !important;
    margin-bottom: 0.25rem !important;
}

.lobibox-notify.notify-mini .lobibox-notify-msg {
    font-size: 0.8125rem !important;
}

.lobibox-notify.notify-mini .lobibox-close {
    width: 1.5rem !important;
    height: 1.5rem !important;
    font-size: 1.125rem !important;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .lobibox-notify {
        min-height: 72px !important;
        margin: 0.5rem !important;
    }

    .lobibox-notify-icon-wrapper {
        left: 1rem !important;
        width: 40px !important;
    }

    .lobibox-notify-icon > div .icon-el {
        font-size: 1.625rem !important;
    }

    .lobibox-notify-body {
        padding: 0.875rem 2.5rem 0.875rem 0.625rem !important;
    }

    .lobibox-notify-title {
        font-size: 0.9375rem !important;
    }

    .lobibox-notify-msg {
        font-size: 0.8125rem !important;
    }

    .lobibox-close {
        width: 1.5rem !important;
        height: 1.5rem !important;
        right: 0.625rem !important;
        font-size: 1.125rem !important;
    }

    .lobibox-notify-wrapper.right,
    .lobibox-notify-wrapper.left {
        right: 0.5rem !important;
        left: 0.5rem !important;
    }

    .lobibox-notify-wrapper.top {
        top: 0.5rem !important;
    }

    .lobibox-notify-wrapper.bottom {
        bottom: 0.5rem !important;
    }
}

/* ============================================
   НОВЫЙ ДИЗАЙН ГЛАВНОЙ СТРАНИЦЫ
   ============================================ */

/* Homepage Hero Section */
.homepage-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    overflow: hidden;
}

.hero-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ef1 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.95;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text-wrapper {
    color: white;
}

.hero-badge-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.hero-badge-new i {
    color: #ff6b9d;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.hero-title-new {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: white;
}

.hero-description {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stat-item {
    flex: 1;
    min-width: 120px;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.hero-actions-new {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-main {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: #764ef1;
    padding: 1.125rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-hero-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: #764ef1;
}

.btn-hero-main i {
    transition: transform 0.3s ease;
}

.btn-hero-main:hover i {
    transform: translateX(5px);
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.125rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-image-wrapper {
    position: relative;
    height: 500px;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-profile-card {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 4px solid white;
    animation: floatCard 6s ease-in-out infinite;
}

/* ============================================
   СТРАНИЦА ГОРОДОВ (CITY LANDING)
   ============================================ */

.city-hero-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.city-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.city-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ef1 30%, #a855f7 70%, #c084fc 100%);
}

.city-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.city-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.city-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
}

.city-hero-badge i {
    font-size: 1.1rem;
}

.city-hero-heading {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.city-hero-text {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
}

.city-hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.city-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: white;
    color: var(--primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.city-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    color: var(--primary);
}

.city-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.city-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .city-hero-section {
        padding: 4rem 0;
        min-height: auto;
    }

    .city-hero-heading {
        font-size: 2rem;
    }

    .city-hero-text {
        font-size: 1.0625rem;
    }

    .city-hero-buttons {
        flex-direction: column;
    }

    .city-btn-primary,
    .city-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   СТРАНИЦА ВСЕХ ГОРОДОВ (CITIES LIST)
   ============================================ */

.cities-hero-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.cities-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.cities-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ef1 40%, #a855f7 100%);
}

.cities-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.cities-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cities-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
}

.cities-hero-badge i {
    font-size: 1.1rem;
}

.cities-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cities-hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.cities-list-section {
    padding: 5rem 0;
    background: #FAFBFC;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.city-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 1.0625rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.city-card:hover {
    border-color: rgba(118, 74, 241, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(118, 74, 241, 0.12);
}

.city-card i {
    font-size: 1.25rem;
    color: var(--primary);
}

.cities-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.cities-pagination .pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cities-pagination .page-item {
    margin: 0;
}

.cities-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cities-pagination .page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(118, 74, 241, 0.06);
}

.cities-pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.cities-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .cities-hero-section {
        padding: 4rem 0;
        min-height: auto;
    }

    .cities-hero-title {
        font-size: 2rem;
    }

    .cities-hero-description {
        font-size: 1.0625rem;
    }

    .cities-list-section {
        padding: 3rem 0;
    }

    .cities-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .city-card {
        padding: 1rem 1.25rem;
    }
}

/* How It Works Section */
.how-it-works-section {
    padding: 5rem 0;
    background: #FAFBFC;
}

.how-it-works-section .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin: 0 auto;
}

/* Steps flow - горизонтальная цепочка с стрелками */
.steps-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 2.5rem;
}

.step-item {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
}

.step-item-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.step-item-number span {
    font-size: 1.5rem;
    font-weight: 800;
}

.step-item-content {
    flex: 1;
}

.step-item-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.step-item-title i {
    font-size: 1.25rem;
    color: var(--primary);
}

.step-item-desc {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    color: var(--border);
    font-size: 1.5rem;
}

@media (max-width: 991px) {
    .step-arrow {
        transform: rotate(90deg);
        width: 100%;
        padding: 0.5rem 0;
    }
}

/* Features Section */
.features-section-new {
    padding: 5rem 0;
    background: white;
}

.features-section-new .section-header {
    margin-bottom: 3.5rem;
}

.features-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: 2rem;
}

.feature-card-new {
    padding: 2.5rem 2rem;
    background: #FAFBFC;
    border-radius: 16px;
    text-align: center;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.feature-card-new:hover {
    background: white;
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    background: white;
    color: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.feature-title-new {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.feature-text-new {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
    position: relative;
}

.cta-card {
    position: relative;
    margin: 0 auto;
    padding: 4rem 3rem;
    text-align: center;
}

.cta-content {
    color: white;
}

.cta-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.cta-description {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 1.75rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: var(--primary);
}

.btn-cta-primary i {
    transition: transform 0.25s ease;
}

.btn-cta-primary:hover i {
    transform: translateX(3px);
}

/* About Section */
.about-section-new {
    padding: 5rem 0;
    background: #FAFBFC;
}

.about-content {
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.about-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.about-description:last-child {
    margin-bottom: 0;
}

/* Адаптивность для нового дизайна */
@media (max-width: 991px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title-new {
        font-size: 2.5rem;
    }

    .hero-image-wrapper {
        height: 400px;
    }

    .floating-profile-card {
        width: 140px;
        height: 140px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-number {
        font-size: 2rem;
    }

    .steps-flow {
        flex-direction: column;
        align-items: center;
    }

    .step-item {
        max-width: 100%;
    }

    .features-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 2.25rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-card {
        padding: 3rem 2rem;
    }

    .about-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .homepage-hero {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-title-new {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-actions-new {
        flex-direction: column;
    }

    .btn-hero-main,
    .btn-hero-outline {
        width: 100%;
        justify-content: center;
    }

    .steps-flow {
        flex-direction: column;
    }

    .step-item {
        max-width: 100%;
    }

    .features-grid-new {
        grid-template-columns: 1fr;
    }

    .feature-card-new {
        padding: 1.75rem 1.5rem;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-description {
        font-size: 1.125rem;
    }
}

/* ============================================
   ГЛАВНАЯ — РЕДИЗАЙН (MATUR HOME)
   Палитра под бренд: фиолет #764AF1 + мягкий розовый акцент
   ============================================ */

.mhome {
    /* Семантика имён сохранена для совместимости разметки.
       Моно-фиолетовая палитра под бренд сайта (#764AF1 + #aa7ffd) с одной cyan-нотой. */
    --m-cream: #FAFBFF;
    --m-cream-deep: #F0E8FF;
    --m-blush: #F5F0FF;
    --m-blush-deep: #E0D2FF;
    --m-rose-50: #F5F0FF;
    --m-rose-300: #C8B0FF;
    --m-rose-500: #764AF1;
    --m-rose-700: #5A35C9;
    --m-burgundy: #3D1A8C;
    --m-gold-300: #DCC8FF;
    --m-gold-400: #B49BFF;
    --m-gold-500: #aa7ffd;
    --m-gold-700: #5A35C9;
    --m-ink: #1A1A2E;
    --m-ink-soft: #4A5568;
    --m-ink-muted: #718096;
    --m-divider: rgba(118, 74, 241, 0.16);
    --m-shadow-soft: 0 18px 48px rgba(118, 74, 241, 0.12);
    --m-shadow-warm: 0 16px 36px rgba(118, 74, 241, 0.18);

    --m-display: 'Cormorant Garamond', 'PT Serif', Georgia, serif;

    position: relative;
    background:
        radial-gradient(1100px 580px at -10% -10%, rgba(170, 127, 253, 0.20), transparent 60%),
        radial-gradient(900px 520px at 110% 8%, rgba(79, 172, 254, 0.14), transparent 55%),
        linear-gradient(180deg, #FFFFFF 0%, #F8F5FF 100%);
    color: var(--m-ink);
    overflow: hidden;
}

.mhome::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(118, 74, 241, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: 0 0;
    opacity: 0.5;
    z-index: 0;
}

.mhome .container {
    position: relative;
    z-index: 1;
}

.mhome a {
    text-decoration: none;
}

.mhome em {
    font-style: italic;
    color: var(--m-rose-700);
    font-family: var(--m-display);
    font-weight: 600;
}

.mhome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--m-gold-700);
    margin-bottom: 0.85rem;
}

.mhome-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--m-gold-500));
}

.mhome-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 3rem;
}

.mhome-section-head--left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
    max-width: 760px;
}

.mhome-section-head--left .mhome-eyebrow::before {
    background: linear-gradient(90deg, var(--m-gold-500), transparent);
}

.mhome-section-head--left .mhome-eyebrow {
    flex-direction: row-reverse;
}

.mhome-section-title {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--m-ink);
    margin: 0 0 0.85rem;
}

.mhome-section-lead {
    margin: 0;
    color: var(--m-ink-soft);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    line-height: 1.65;
}

.mhome-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(118, 74, 241, 0.24);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    color: var(--m-rose-700);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(118, 74, 241, 0.06);
}

.mhome-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--m-rose-500);
    box-shadow: 0 0 0 3px rgba(118, 74, 241, 0.18);
    animation: mhome-pulse 2s ease-in-out infinite;
}

@keyframes mhome-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(118, 74, 241, 0.18); }
    50% { box-shadow: 0 0 0 6px rgba(118, 74, 241, 0); }
}

.mhome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.mhome-btn--primary {
    background: linear-gradient(135deg, var(--m-rose-500) 0%, var(--m-rose-700) 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(118, 74, 241, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}

.mhome-btn--primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(118, 74, 241, 0.42), inset 0 1px 0 rgba(255,255,255,0.18);
}

.mhome-btn--gold {
    background: linear-gradient(135deg, #E0D2FF 0%, var(--m-gold-500) 60%, var(--m-gold-700) 100%);
    color: var(--m-burgundy);
    box-shadow: 0 14px 32px rgba(118, 74, 241, 0.32), inset 0 1px 0 rgba(255,255,255,0.4);
}

.mhome-btn--gold:hover {
    color: var(--m-burgundy);
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(118, 74, 241, 0.42), inset 0 1px 0 rgba(255,255,255,0.4);
}

.mhome-btn--ghost {
    background: rgba(255, 255, 255, 0.6);
    color: var(--m-ink);
    border-color: rgba(118, 74, 241, 0.28);
    backdrop-filter: blur(8px);
}

.mhome-btn--ghost:hover {
    color: var(--m-rose-700);
    background: #fff;
    border-color: var(--m-rose-300);
    transform: translateY(-2px);
}

.mhome-btn--lg {
    padding: 1.1rem 2.1rem;
    font-size: 1.04rem;
}

.mhome-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--m-rose-700);
    font-weight: 600;
    transition: gap 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mhome-link:hover {
    color: var(--m-burgundy);
    gap: 0.7rem;
}

.mhome-link--lg {
    font-size: 1rem;
    padding: 0.8rem 1.4rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(118, 74, 241, 0.26);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.mhome-link--lg:hover {
    background: #fff;
    border-color: var(--m-rose-300);
}

.mhome-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--m-gold-500);
    opacity: 0.7;
    margin-bottom: 2.5rem;
}

.mhome-divider svg {
    width: 22px;
    height: 22px;
}

.mhome-divider::before,
.mhome-divider::after {
    content: "";
    flex: 1;
    max-width: 220px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--m-divider), transparent);
    margin: 0 1rem;
}

/* HERO */
.mhome-hero {
    position: relative;
    padding: 5.5rem 0 5rem;
    overflow: hidden;
}

.mhome-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.mhome-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.mhome-hero__glow--rose {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -120px;
    background: radial-gradient(circle, rgba(170, 127, 253, 0.42), transparent 70%);
}

.mhome-hero__glow--gold {
    width: 480px;
    height: 480px;
    top: 80px;
    right: -100px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.32), transparent 70%);
}

.mhome-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
}

.mhome-hero__title {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: clamp(2.6rem, 5.6vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    color: var(--m-ink);
    margin: 0 0 1.4rem;
}

.mhome-hero__title span {
    display: block;
}

em.mhome-hero__title-em {
    display: block;
    font-style: italic;
    background: linear-gradient(135deg, var(--m-rose-500) 0%, var(--m-rose-700) 50%, var(--m-burgundy) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-family: var(--m-display);
    font-weight: 600;
    position: relative;
    width: fit-content;
}

em.mhome-hero__title-em::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M0 4 Q 25 0 50 4 T 100 4' stroke='%23764AF1' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat;
    background-size: 100% 100%;
    opacity: 0.7;
}

.mhome-hero__lead {
    margin: 0 0 2rem;
    color: var(--m-ink-soft);
    font-size: clamp(1.05rem, 1.5vw, 1.18rem);
    line-height: 1.7;
    max-width: 540px;
}

.mhome-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.mhome-hero__visual {
    position: relative;
    min-height: 540px;
}

.mhome-hero__ornament-circle {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,235,210,0.55) 60%, transparent 78%),
        conic-gradient(from 90deg at 50% 50%, var(--m-gold-300), #fff, var(--m-rose-300), #fff, var(--m-gold-300));
    opacity: 0.45;
    filter: blur(2px);
    box-shadow: 0 30px 80px rgba(118, 74, 241, 0.15);
    z-index: 0;
}

.mhome-hero__card {
    position: absolute;
    background: #fff;
    border: 1px solid rgba(118, 74, 241, 0.16);
    border-radius: 22px;
    box-shadow: var(--m-shadow-warm);
    z-index: 1;
}

.mhome-hero__card--profile {
    top: 0;
    left: 0;
    width: 290px;
    padding: 1.1rem;
    display: flex;
    gap: 0.95rem;
    align-items: center;
    transform: rotate(-2deg);
    animation: mhome-float-1 7s ease-in-out infinite;
}

.mhome-hero__card--match {
    top: 38%;
    right: 0;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, #F5F0FF 100%);
    border-color: rgba(118, 74, 241, 0.25);
    transform: rotate(3deg);
    animation: mhome-float-2 8s ease-in-out infinite;
    z-index: 2;
}

.mhome-hero__card--quote {
    bottom: 0;
    left: 6%;
    width: 300px;
    padding: 1.25rem 1.35rem 1.15rem;
    background: linear-gradient(160deg, #F5F0FF 0%, #fff 100%);
    border-color: rgba(118, 74, 241, 0.24);
    transform: rotate(-1.5deg);
    animation: mhome-float-3 9s ease-in-out infinite;
}

.mhome-hero__profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--m-gold-300) 0%, var(--m-gold-500) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 1.6rem;
    box-shadow: 0 6px 14px rgba(118, 74, 241, 0.3);
    flex-shrink: 0;
}

.mhome-hero__profile-name {
    margin: 0 0 2px;
    font-weight: 700;
    color: var(--m-ink);
    font-size: 1rem;
}

.mhome-hero__profile-city {
    margin: 0 0 0.5rem;
    color: var(--m-ink-muted);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mhome-hero__profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.mhome-hero__profile-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    background: var(--m-cream-deep);
    color: var(--m-rose-700);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.mhome-hero__match-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--m-rose-500), var(--m-rose-700));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 6px 16px rgba(118, 74, 241, 0.45);
    flex-shrink: 0;
}

.mhome-hero__match-title {
    margin: 0 0 2px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--m-rose-700);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mhome-hero__match-sub {
    margin: 0;
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--m-ink);
}

.mhome-hero__quote-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--m-cream-deep);
    color: var(--m-rose-500);
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
}

.mhome-hero__quote-text {
    margin: 0 0 0.4rem;
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
    color: var(--m-ink);
}

.mhome-hero__quote-author {
    font-size: 0.78rem;
    color: var(--m-ink-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

@keyframes mhome-float-1 {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-8px); }
}
@keyframes mhome-float-2 {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-10px); }
}
@keyframes mhome-float-3 {
    0%, 100% { transform: rotate(-1.5deg) translateY(0); }
    50% { transform: rotate(-1.5deg) translateY(-6px); }
}

/* VALUES — bento асимметричная раскладка */
.mhome-values {
    position: relative;
    padding: 4.5rem 0 6rem;
}

.mhome-values__bento {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    min-height: 460px;
}

.mhome-values__card {
    position: relative;
    padding: 2.4rem 2rem 2.2rem;
    background: linear-gradient(180deg, #fff 0%, #FAFBFF 100%);
    border: 1px solid rgba(118, 74, 241, 0.16);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(118, 74, 241, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mhome-values__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(118, 74, 241, 0.16);
    border-color: rgba(118, 74, 241, 0.32);
}

.mhome-values__card--lg {
    grid-row: 1 / span 2;
    background: linear-gradient(160deg, #3D1A8C 0%, #5A35C9 60%, #764AF1 100%);
    color: #fff;
    padding: 3rem 2.5rem 2.8rem;
    border-color: rgba(170, 127, 253, 0.4);
    box-shadow: 0 18px 44px rgba(61, 26, 140, 0.4);
}

.mhome-values__card--lg:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 56px rgba(61, 26, 140, 0.5);
    border-color: rgba(170, 127, 253, 0.6);
}

.mhome-values__card-ornament {
    position: absolute;
    top: -24px;
    right: -28px;
    width: 180px;
    height: 180px;
    color: rgba(118, 74, 241, 0.07);
    pointer-events: none;
    transition: transform 0.6s ease, color 0.3s ease;
}

.mhome-values__card-ornament svg {
    width: 100%;
    height: 100%;
    display: block;
}

.mhome-values__card:hover .mhome-values__card-ornament {
    transform: rotate(8deg) scale(1.05);
    color: rgba(118, 74, 241, 0.12);
}

.mhome-values__card--lg .mhome-values__card-ornament {
    width: 320px;
    height: 320px;
    top: auto;
    bottom: -70px;
    right: -70px;
    color: rgba(255, 255, 255, 0.07);
}

.mhome-values__card--lg:hover .mhome-values__card-ornament {
    color: rgba(255, 255, 255, 0.12);
}

.mhome-values__card-num {
    display: inline-flex;
    align-items: center;
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--m-rose-300);
    letter-spacing: 0.2em;
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
    line-height: 1;
}

.mhome-values__card-num::after {
    content: "";
    display: inline-block;
    margin-left: 0.7rem;
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.6;
    vertical-align: middle;
}

.mhome-values__card--lg .mhome-values__card-num {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.mhome-values__card-title {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: clamp(1.55rem, 2.4vw, 1.95rem);
    line-height: 1.1;
    letter-spacing: -0.005em;
    margin: 0 0 0.85rem;
    color: var(--m-ink);
    position: relative;
    z-index: 1;
}

.mhome-values__card--lg .mhome-values__card-title {
    color: #fff;
    font-size: clamp(2.1rem, 3.5vw, 3.1rem);
    margin-bottom: 1.4rem;
}

.mhome-values__card-text {
    margin: 0;
    color: var(--m-ink-soft);
    font-size: 1rem;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

.mhome-values__card--lg .mhome-values__card-text {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.06rem;
    max-width: 32ch;
}

/* STEPS */
.mhome-steps {
    position: relative;
    padding: 4rem 0 5.5rem;
}

.mhome-steps__track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.mhome-steps__track::before {
    content: "";
    position: absolute;
    top: 64px;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--m-gold-400) 30%, var(--m-gold-400) 70%, transparent);
    opacity: 0.5;
}

.mhome-step {
    position: relative;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(118, 74, 241, 0.18);
    border-radius: 22px;
    padding: 2rem 1.7rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 32px rgba(118, 74, 241, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mhome-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(118, 74, 241, 0.14);
}

.mhome-step__number {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 2.6rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--m-gold-500);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.mhome-step__title {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
    color: var(--m-ink);
}

.mhome-step__text {
    margin: 0;
    color: var(--m-ink-soft);
    font-size: 0.98rem;
    line-height: 1.62;
}

/* CITIES */
.mhome-cities {
    padding: 4rem 0 5.5rem;
}

.mhome-cities .mhome-section-head {
    margin-bottom: 2.25rem;
}

.mhome-cities__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0 0 2.25rem;
}

.mhome-city {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(118, 74, 241, 0.2);
    border-radius: 14px;
    color: var(--m-ink);
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: all 0.22s ease;
}

.mhome-city:hover {
    color: var(--m-rose-700);
    background: #fff;
    border-color: var(--m-rose-300);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(118, 74, 241, 0.12);
}

.mhome-city__pin {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--m-cream-deep), var(--m-gold-300));
    color: var(--m-rose-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.mhome-city:hover .mhome-city__pin {
    background: linear-gradient(135deg, var(--m-rose-500), var(--m-rose-700));
    color: #fff;
}

.mhome-city__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.96rem;
}

.mhome-city__arrow {
    color: var(--m-ink-muted);
    font-size: 0.88rem;
    transition: transform 0.22s ease, color 0.22s ease;
}

.mhome-city:hover .mhome-city__arrow {
    color: var(--m-rose-700);
    transform: translate(2px, -2px);
}

.mhome-cities__more {
    display: flex;
    justify-content: center;
}

/* FAQ */
.mhome-faq {
    padding: 4rem 0 5.5rem;
}

.mhome-faq__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 3.5rem;
    align-items: start;
}

.mhome-faq__head {
    position: sticky;
    top: 6rem;
}

.mhome-faq__head .mhome-link {
    margin-top: 1.3rem;
}

.mhome-faq__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mhome-faq__item {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(118, 74, 241, 0.2);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(6px);
}

.mhome-faq__item:hover {
    border-color: rgba(118, 74, 241, 0.32);
}

.mhome-faq__item[open] {
    border-color: rgba(118, 74, 241, 0.4);
    box-shadow: 0 12px 28px rgba(118, 74, 241, 0.1);
}

.mhome-faq__item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.15rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--m-display);
    font-weight: 600;
    font-size: 1.18rem;
    color: var(--m-ink);
    transition: color 0.2s ease;
}

.mhome-faq__item summary::-webkit-details-marker {
    display: none;
}

.mhome-faq__item summary i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--m-cream-deep);
    color: var(--m-rose-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
    flex-shrink: 0;
}

.mhome-faq__item[open] summary i {
    transform: rotate(45deg);
    background: var(--m-rose-700);
    color: #fff;
}

.mhome-faq__item[open] summary {
    color: var(--m-rose-700);
}

.mhome-faq__body {
    padding: 0 1.4rem 1.3rem;
    color: var(--m-ink-soft);
    font-size: 1rem;
    line-height: 1.65;
}

/* CTA — финальное действие, светлая editorial-карточка */
.mhome-cta {
    padding: 2rem 0 6rem;
}

.mhome-cta__card {
    position: relative;
    background:
        radial-gradient(720px 460px at 0% 0%, rgba(170, 127, 253, 0.12), transparent 60%),
        radial-gradient(640px 400px at 100% 100%, rgba(79, 172, 254, 0.10), transparent 60%),
        #FFFFFF;
    border: 1px solid rgba(118, 74, 241, 0.18);
    border-radius: 32px;
    box-shadow: 0 24px 64px rgba(118, 74, 241, 0.16);
    overflow: hidden;
    text-align: center;
    padding: 4rem 2rem 4.25rem;
}

.mhome-cta__ornament {
    width: 36px;
    height: 36px;
    margin: 0 auto 1.5rem;
    color: var(--m-rose-300);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mhome-cta__ornament svg {
    width: 100%;
    height: 100%;
}

.mhome-cta__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mhome-cta__action .mhome-eyebrow {
    margin-bottom: 0.85rem;
}

.mhome-cta__title {
    font-family: var(--m-display);
    font-weight: 600;
    font-size: clamp(1.85rem, 3.6vw, 2.7rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--m-ink);
    margin: 0 0 1rem;
}

.mhome-cta__title em {
    color: var(--m-rose-500);
    font-family: var(--m-display);
    font-style: italic;
    font-weight: 600;
}

.mhome-cta__lead {
    margin: 0 0 1.85rem;
    color: var(--m-ink-soft);
    font-size: clamp(1rem, 1.4vw, 1.1rem);
    line-height: 1.65;
}

.mhome-cta__bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem 1.4rem;
}

.mhome-cta__bullets li {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    color: var(--m-ink-soft);
    font-weight: 500;
}

.mhome-cta__bullets i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--m-cream-deep);
    color: var(--m-rose-500);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1199px) {
    .mhome-hero__grid {
        gap: 2.5rem;
    }

    .mhome-cities__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .mhome-hero {
        padding: 4rem 0 4.5rem;
    }

    .mhome-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .mhome-hero__visual {
        min-height: 460px;
        max-width: 480px;
        margin: 0 auto;
    }

    .mhome-steps__track {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .mhome-steps__track::before {
        display: none;
    }

    .mhome-faq__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .mhome-faq__head {
        position: static;
    }

    .mhome-values__bento {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        min-height: 0;
    }

    .mhome-values__card--lg {
        grid-row: auto;
        padding: 2.6rem 2rem 2.4rem;
    }

    .mhome-values__card--lg .mhome-values__card-ornament {
        width: 240px;
        height: 240px;
        bottom: -50px;
        right: -50px;
    }

    .mhome-cta__card {
        padding: 3.25rem 1.5rem 3.5rem;
    }
}

@media (max-width: 767px) {
    .mhome-hero {
        padding: 3rem 0 3.5rem;
    }

    .mhome-hero__title {
        font-size: clamp(2.2rem, 9vw, 3rem);
    }

    .mhome-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mhome-hero__actions .mhome-btn {
        width: 100%;
    }

    .mhome-hero__visual {
        min-height: 440px;
    }

    .mhome-hero__card--profile { width: 240px; }
    .mhome-hero__card--quote { width: 250px; left: 4%; }
    .mhome-hero__card--match { right: 4%; }

    .mhome-cities__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.65rem;
    }

    .mhome-section-head--left .mhome-section-title,
    .mhome-section-head .mhome-section-title {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    .mhome-faq__item summary {
        font-size: 1.05rem;
        padding: 1rem 1.1rem;
    }

    .mhome-faq__body {
        padding: 0 1.1rem 1.1rem;
    }

    .mhome-cta {
        padding: 1.5rem 0 4rem;
    }

    .mhome-cta__card {
        padding: 2.75rem 1.25rem 3rem;
        border-radius: 24px;
    }

    .mhome-cta__title {
        font-size: clamp(1.55rem, 6.5vw, 2rem);
    }

    .mhome-cta__bullets {
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
    }

    .mhome-cta__action .mhome-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mhome-cities__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mhome-values__card {
        padding: 2rem 1.4rem 1.8rem;
        border-radius: 20px;
    }

    .mhome-values__card--lg {
        padding: 2.4rem 1.6rem 2.2rem;
    }

    .mhome-values__card-ornament {
        width: 140px;
        height: 140px;
        top: -16px;
        right: -20px;
    }

    .mhome-values__card--lg .mhome-values__card-ornament {
        width: 180px;
        height: 180px;
        bottom: -40px;
        right: -40px;
    }

    .mhome-values__card-num {
        font-size: 0.82rem;
    }

    .mhome-values__card--lg .mhome-values__card-num {
        font-size: 0.85rem;
    }

    .mhome-values__card-title {
        font-size: clamp(1.45rem, 6.5vw, 1.7rem);
    }

    .mhome-values__card--lg .mhome-values__card-title {
        font-size: clamp(1.85rem, 8vw, 2.4rem);
    }
}

/* ============================================
   СТРАНИЦЫ АВТОРИЗАЦИИ И РЕГИСТРАЦИИ
   ============================================ */

/* Login Page */
.login-page,
.register-page,
.reset-password-page {
    min-height: calc(100vh - 200px);
    padding: 4rem 0;
    background: var(--bg-light);
}

.login-container,
.register-container,
.reset-password-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.login-wrapper,
.register-wrapper,
.reset-password-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.login-header,
.register-header,
.reset-password-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title,
.register-title,
.reset-password-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-icon,
.register-icon,
.reset-password-icon {
    font-size: 2rem;
    color: var(--primary);
}

.login-subtitle,
.register-subtitle,
.reset-password-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}

.login-form,
.register-form,
.reset-password-form {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.form-section {
    margin-bottom: 1.5rem;
}

.form-group-custom {
    margin-bottom: 1.5rem;
}

.form-group-custom .form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: block;
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(118, 74, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

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

.password-toggle i {
    font-size: 1.125rem;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    font-size: 0.9375rem;
    color: var(--text);
    cursor: pointer;
    margin: 0;
}

.forgot-password-link {
    font-size: 0.9375rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.form-actions {
    margin-top: 2rem;
}

.btn-login-submit,
.btn-register-submit,
.btn-reset-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #764ef1, #4facfe);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(118, 74, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login-submit:hover:not(.disabled),
.btn-register-submit:hover:not(.disabled),
.btn-reset-submit:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(118, 74, 241, 0.4);
    color: white;
}

.btn-login-submit.disabled,
.btn-register-submit.disabled,
.btn-reset-submit.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-footer-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.form-footer-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.form-footer-text a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Error messages */
.help-block,
.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.has-error .form-control {
    border-color: #dc3545;
    border-width: 1px;
}

/* Убираем галочку валидации, оставляем только обводку */
.form-control.is-valid,
.form-select.is-valid,
.was-validated .form-control:valid,
.was-validated .form-select:valid {
    background-image: none !important;
    border-color: #198754 !important;
    border-width: 1px !important;
    padding-right: 0.75rem !important;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus,
.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus {
    border-color: #198754 !important;
    border-width: 1px !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

.has-error .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

/* Captcha container */
#captcha-container {
    margin-bottom: 1rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .login-page,
    .register-page,
    .reset-password-page {
        padding: 2rem 0;
    }

    .login-form,
    .register-form,
    .reset-password-form {
        padding: 2rem 1.5rem;
    }

    .login-title,
    .register-title,
    .reset-password-title {
        font-size: 1.75rem;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Legal pages (FAQ / Terms / Policy) */
.legal-page {
    background: transparent;
}

.legal-hero {
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 1.5rem;
}

.legal-kicker {
    display: inline-block;
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.legal-page h1 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.6rem;
}

.legal-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.legal-lead {
    color: #4b5563;
    margin: 0;
    font-size: 1rem;
}

.legal-section {
    background: transparent;
    border: 0;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 0;
    margin-bottom: 0;
}

.legal-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: #111827;
}

.legal-section-number {
    display: inline;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
}

.legal-section p {
    margin: 0;
    color: #374151;
}

.legal-section ul {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
}

.legal-section li {
    color: #374151;
    margin-bottom: 0.35rem;
}

.legal-section li:last-child {
    margin-bottom: 0;
}

.legal-section a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-section-last {
    margin-bottom: 0;
}

/* About page */
.about-page {
    background: #FAFBFC;
    padding: 3rem 0 4rem;
}


.about-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.about-kicker {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-hero h1 {
    margin: 0 0 1rem;
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

.about-hero p {
    margin: 0 auto;
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.about-hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.about-hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.about-hero-badges span i {
    color: var(--primary);
    font-size: 1.1rem;
}

.about-section {
    margin-bottom: 3rem;
}

.about-section h2 {
    margin: 0 0 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.about-section > p {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.about-feature-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.about-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.about-feature-card i {
    display: block;
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.about-feature-card p {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: white;
    border-radius: 16px;
    padding: 2rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.about-step > span {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(145deg, #f0ebff, #e8e0ff);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.about-step h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.about-step p {
    margin: 0;
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: 20px;
    padding: 4rem 3rem;
    margin-top: 3rem;
    text-align: center;
}

.about-cta h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.about-cta p {
    margin: 0;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.about-cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.about-cta-actions .btn-primary {
    background: white;
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
}

.about-cta-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
}

.about-cta-actions .btn-outline-primary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.about-cta-actions .btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: white;
}

@media (max-width: 767.98px) {
    .about-page {
        padding: 2rem 0 3rem;
    }

    .about-hero {
        margin-bottom: 3rem;
    }

    .about-hero h1 {
        font-size: 2rem;
    }

    .about-hero p {
        font-size: 1.125rem;
    }

    .about-hero-badges {
        margin-top: 1.5rem;
    }

    .about-section {
        margin-bottom: 2.5rem;
    }

    .about-section h2 {
        font-size: 1.5rem;
    }

    .about-feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-feature-card {
        padding: 2rem;
    }

    .about-step {
        padding: 1.5rem;
    }

    .about-cta {
        padding: 3rem 2rem;
        margin-top: 2rem;
    }

    .about-cta h2 {
        font-size: 1.5rem;
    }

    .about-cta-actions {
        flex-direction: column;
    }

    .about-cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
