* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #f9f6f5 0%, #f0e8e6 100%);
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== ФОНОВЫЙ ГРАДИЕНТ ДЛЯ ЭКРАНА ВХОДА ===== */
#authBackground {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #EE9CA7 0%, #FFDDE1 100%);
    background-size: 400% 400%;
    animation: gradientMove 8s ease infinite;
    z-index: 999;
    display: none;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== НАВБАР ===== */
.navbar {
    background: linear-gradient(135deg, #ff6685 0%, #ff3366 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 25px 25px;
    box-shadow: 0 8px 25px rgba(255, 102, 133, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-links { display: flex; gap: 5px; flex-wrap: wrap; }

.navbar a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.navbar a i { font-size: 16px; }
.navbar a:hover, .navbar a.active { background: rgba(255,255,255,0.2); transform: translateY(-2px); }

.profile-btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.logo { font-size: 24px; font-weight: 700; color: white; display: flex; align-items: center; gap: 10px; }
.logo i { font-size: 28px; }

.nav-auth-btn { background: white !important; color: #ff3366 !important; font-weight: 700 !important; }
.nav-auth-btn:hover { background: #fff0f3 !important; }

/* ===== МОБИЛЬНАЯ НАВИГАЦИЯ ===== */
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 26px; cursor: pointer; }

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: white;
    border-top: 1px solid #eee;
    z-index: 1000;
    padding: 8px 0;
}

.mobile-nav-links { display: flex; justify-content: space-around; }

.mobile-nav-link {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 8px 12px;
    text-decoration: none; color: #adb5bd; font-size: 10px;
    transition: color 0.2s;
}

.mobile-nav-link i { font-size: 20px; }
.mobile-nav-link.active, .mobile-nav-link:hover { color: #ff3366; }

/* ===== КОНТЕЙНЕР И СЕКЦИИ ===== */
.container { max-width: 1900px; margin: 10px auto; padding: 20px; }

.section {
    display: none;
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    animation: fadeIn 0.4s ease;
}

.section.active { display: block; }

h2 { color: #ff3366; margin-bottom: 25px; font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
h2 i { font-size: 26px; }

/* ===== ФИЛЬТРЫ ===== */
.filters-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 20px; }
.filter-group { display: flex; flex-direction: column; }
.filter-group label { font-weight: 600; margin-bottom: 8px; color: #495057; font-size: 14px; }

.filter-input, .filter-select {
    padding: 14px 18px;
    border: none;
    border-radius: 15px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    font-size: 15px;
    transition: all 0.3s ease;
}

.filter-input:focus, .filter-select:focus { outline: none; box-shadow: 0 3px 15px rgba(255,102,133,0.2); }

.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff3366' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.filter-btn {
    background: linear-gradient(135deg, #ff6685 0%, #ff3366 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255,102,133,0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.filter-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255,102,133,0.4); }

.filter-interest-tag {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid #ffb3c1;
    color: #ff3366;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}

.filter-interest-tag.active { background: #ff3366; color: white; border-color: #ff3366; }

/* ===== КАРТОЧКИ ПОЛЬЗОВАТЕЛЕЙ ===== */
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }

.user-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.08); transition: all 0.3s ease; }
.user-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.12); }
.user-img { width: 100%; height: 220px; object-fit: cover; }
.user-info { padding: 20px; }
.user-name { font-size: 20px; font-weight: 700; color: #ff3366; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.user-details { color: #6c757d; margin-bottom: 12px; font-size: 14px; }
.user-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }

.tag { display: inline-block; background: white; color: #ff3366; padding: 5px 12px; border-radius: 15px; font-size: 12px; font-weight: 500; border: 1.5px solid #ffccd5; white-space: nowrap; }
    #userBioDisplay {
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
.user-actions { display: flex; gap: 12px; }

.action-btn { flex: 1; padding: 10px; border: none; border-radius: 12px; font-weight: 500; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: 8px; }
.like-btn { background: linear-gradient(135deg, #ff6685 0%, #ff3366 100%); color: white; }
.message-btn { background: #f8f9fa; color: #495057; border: 1px solid #e9ecef; }
.action-btn:hover { transform: translateY(-2px); }

.no-results { text-align: center; padding: 50px 20px; color: #6c757d; }
.no-results i { font-size: 60px; color: #dee2e6; margin-bottom: 15px; }

/* ===== ЧАТЫ ===== */
.chat-container { display: flex; height: 640px; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,0.10); background: white; }
.chats-list { width: 320px; flex-shrink: 0; background: #fff; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; overflow: hidden; }
.chat-search { padding: 14px 16px; background: #fff; border-bottom: 1px solid #f5f5f5; }
.chat-search-input { width: 100%; padding: 10px 14px 10px 36px; border: none; border-radius: 24px; background: #f5f5f7; font-size: 13px; font-family: 'Poppins',sans-serif; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px center; outline: none; }
#chatItemsContainer { flex: 1; overflow-y: auto; }
.chat-item { display: flex; padding: 10px 14px; align-items: center; gap: 12px; cursor: pointer; transition: background 0.15s; border-radius: 12px; margin: 2px 8px; }
.chat-item:hover { background: #fef2f4; }
.chat-item.active { background: #ffe8ed; }
.chat-avatar-wrap { position: relative; flex-shrink: 0; }
.chat-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; display: block; }
.chat-avatar-placeholder { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg,#ffb3c8,#ff6685); display: flex; align-items: center; justify-content: center; font-size: 18px; color: white; font-weight: 700; flex-shrink: 0; }
.chat-online-dot { position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px; background: #22c55e; border-radius: 50%; border: 2px solid #fff; }
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 14px; color: #1a1a2e; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-preview { font-size: 12px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-typing-dots { display: inline-flex; align-items: center; gap: 3px; height: 16px; }
.chat-typing-dots span { width: 5px; height: 5px; border-radius: 50%; background: #ff6685; animation: typingBounce 1.2s infinite; }
.chat-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-4px);opacity:1} }
.chat-time { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-time-label { font-size: 11px; color: #c4c4cc; }
.chat-unread-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; background: #ff3366; color: #fff; border-radius: 9px; font-size: 10px; font-weight: 700; line-height: 1; }
.chat-messages { flex: 1; background: #fafafa; display: flex; flex-direction: column; min-width: 0; position: relative; }
.chat-header { padding: 14px 20px; background: white; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 12px; min-height: 64px; }
.chat-header-info { flex: 1; min-width: 0; }
.chat-header-name { font-weight: 700; font-size: 15px; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-header-status { font-size: 12px; color: #9ca3af; margin-top: 1px; }
.chat-header-status.online { color: #22c55e; }
.messages-container { flex: 1; padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.msg-date-sep { text-align: center; margin: 12px 0 8px; }
.msg-date-sep span { font-size: 11px; color: #b0b0bc; background: #f0f0f4; border-radius: 20px; padding: 3px 12px; font-weight: 500; }
.msg-group-gap { height: 10px; }
.message { max-width: 68%; padding: 9px 14px; border-radius: 18px; position: relative; word-break: break-word; font-size: 14px; line-height: 1.5; }
.message-in { align-self: flex-start; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.07); color: #1a1a2e; border-bottom-left-radius: 4px; }
.message-in.msg-first { border-top-left-radius: 4px; border-bottom-left-radius: 18px; }
.message-in.msg-mid { border-top-left-radius: 4px; border-bottom-left-radius: 4px; }
.message-out { align-self: flex-end; background: linear-gradient(135deg,#ff6685,#ff3366); color: white; border-bottom-right-radius: 4px; }
.message-out.msg-first { border-top-right-radius: 4px; border-bottom-right-radius: 18px; }
.message-out.msg-mid { border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.message-time { font-size: 10px; margin-top: 4px; opacity: 0.65; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.msg-ticks { font-size: 12px; line-height: 1; }
.msg-ticks.read { color: #fff; opacity: 1; text-shadow: 0 0 6px rgba(100,220,255,0.9); }
.msg-ticks.sent { color: rgba(255,255,255,0.35); }
.msg-reply-quote { background: rgba(0,0,0,0.06); border-left: 3px solid rgba(255,255,255,0.6); border-radius: 8px; padding: 5px 9px; margin-bottom: 6px; font-size: 12px; line-height: 1.4; cursor: pointer; max-width: 100%; overflow: hidden; }
.message-in .msg-reply-quote { background: rgba(0,0,0,0.05); border-left-color: #ff6685; }
.msg-reply-quote-name { font-weight: 600; font-size: 11px; margin-bottom: 2px; opacity: 0.8; }
.msg-reply-quote-text { opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-bar { display: none; align-items: center; gap: 10px; padding: 8px 16px; background: #fff8fa; border-top: 1px solid #ffe4ed; }
.chat-reply-bar.active { display: flex; }
.chat-reply-bar-content { flex: 1; min-width: 0; }
.chat-reply-bar-name { font-size: 12px; font-weight: 600; color: #ff3366; }
.chat-reply-bar-text { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-bar-cancel { width: 28px; height: 28px; border-radius: 50%; border: none; background: #f0f0f0; color: #999; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-reply-bar-cancel:hover { background: #ffe0e8; color: #ff3366; }
.message { position: relative; }
.msg-reply-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,0.08); color: #888; cursor: pointer; font-size: 12px; display: none; align-items: center; justify-content: center; transition: background .15s; z-index: 2; }
.msg-reply-btn:hover { background: rgba(255,51,102,0.15); color: #ff3366; }
.message-out .msg-reply-btn { left: -36px; }
.message-in  .msg-reply-btn { right: -36px; }
.message:hover .msg-reply-btn { display: flex; }
.msg-delete-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(0,0,0,0.08); color: #888; cursor: pointer; font-size: 11px; display: none; align-items: center; justify-content: center; transition: background .15s; z-index: 2; }
.msg-delete-btn:hover { background: rgba(231,76,60,0.15); color: #e74c3c; }
.message-out .msg-delete-btn { left: -70px; }
.message:hover .msg-delete-btn { display: flex; }
.chat-item .chat-item-menu-btn { opacity: 0; transition: opacity .12s, background .12s; }
.chat-item:hover .chat-item-menu-btn { opacity: 1; }
.chat-item-menu-btn:hover { background: rgba(255,51,102,0.1) !important; color: #ff3366 !important; }
@media (hover: none) {
    .chat-item .chat-item-menu-btn { opacity: 1; }
}
/* Режим выбора сообщений */
.msg-selection-mode .message { cursor: pointer; }
.msg-selection-mode .msg-reply-btn,
.msg-selection-mode .msg-delete-btn { display: none !important; }
.message.msg-selected { outline: 2px solid #ff3366; outline-offset: 2px; border-radius: 14px; background: rgba(255,51,102,0.08); }
.msg-deleted-text { color: #adb5bd !important; font-style: italic; font-size: 13px; }
.msg-deleted-wrap.message-out .msg-deleted-text { color: rgba(255,255,255,0.6) !important; }
.msg-highlight { animation: msgFlash .7s ease; }
@keyframes msgFlash { 0%,100%{background:inherit} 35%{background:rgba(255,51,102,.18)} }
body.dark .msg-reply-quote { background: rgba(255,255,255,0.08); }
body.dark .chat-reply-bar { background: var(--dk-surface); border-top-color: var(--dk-border); }
.chat-input-wrap { padding: 12px 16px; background: white; border-top: 1px solid #f0f0f0; display: flex; align-items: flex-end; gap: 10px; }
.message-textarea { flex: 1; padding: 10px 14px; border: 1.5px solid #f0f0f0; border-radius: 22px; background: #f8f8fa; font-size: 14px; font-family: 'Poppins',sans-serif; resize: none; outline: none; min-height: 42px; max-height: 120px; overflow-y: auto; line-height: 1.5; transition: border-color 0.2s; }
.message-textarea:focus { border-color: #ffb3c8; background: #fff; }

/* ===== ФОТО В ЧАТЕ ===== */
.msg-image-wrap {
    cursor: zoom-in;
    border-radius: 12px;
    overflow: hidden;
    max-width: 260px;
    line-height: 0;
}
.msg-image {
    width: 100%;
    max-width: 260px;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: opacity 0.2s;
}
.msg-image:hover { opacity: 0.92; }
.message.message-has-image {
    padding: 6px;
    background: transparent !important;
    box-shadow: none !important;
}
.message.message-has-image .message-text {
    padding: 4px 8px 0;
    font-size: 13px;
}
.message.message-has-image .message-time {
    padding: 0 8px;
}

/* ===== ПОДАРОК В ЧАТЕ ===== */
.message.message-gift {
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    align-self: center;
}
.msg-gift-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fff0f5, #ffe8f0);
    border: 2px solid #ffb3c8;
    border-radius: 20px;
    padding: 16px 24px;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.12);
}
.msg-gift-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
}
.msg-gift-img-placeholder {
    width: 80px;
    height: 80px;
    background: #ffe4ed;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #ff3366;
}
.msg-gift-label {
    font-size: 11px;
    color: #ff9db0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.msg-gift-name {
    font-size: 14px;
    font-weight: 700;
    color: #ff3366;
}
/* Тёмная тема */
body.dark .msg-gift-card {
    background: linear-gradient(135deg, #2a1520, #1f1020);
    border-color: #6b2040;
}
body.dark .msg-gift-label { color: #a06070; }
body.dark .msg-gift-name { color: #ff6685; }
body.dark .msg-gift-img-placeholder { background: #2a1a22; color: #ff6685; }
.chat-input { padding: 12px 16px; background: white; border-top: 1px solid #f0f0f0; display: flex; align-items: flex-end; gap: 10px; }
.message-input { flex: 1; padding: 10px 14px; border: 1.5px solid #f0f0f0; border-radius: 22px; background: #f8f8fa; font-size: 14px; font-family: 'Poppins',sans-serif; outline: none; }
.send-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: linear-gradient(135deg, #ff6685 0%, #ff3366 100%); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; flex-shrink: 0; box-shadow: 0 3px 10px rgba(255,51,102,0.35); }
.send-btn:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(255,51,102,0.5); }
.chat-action-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: #c4c4cc; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; transition: color 0.2s, transform 0.15s; }
.chat-action-btn:hover { color: #ff3366; transform: scale(1.12); }

/* ===== МОДАЛЬНОЕ ОКНО ВХОДА/РЕГИСТРАЦИИ ===== */
.auth-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-modal-overlay.show { display: flex; }

body.no-auth .auth-modal-overlay { background: transparent; backdrop-filter: none; }

.auth-modal {
    background: white;
    border-radius: 28px;
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: fadeIn 0.35s ease;
    overflow: hidden;
    z-index: 1000 !important;
}

.auth-modal::before {
    content: '';
    position: absolute;
    width: 150%; height: 150%;
    top: -25%; left: -25%;
    background-image: conic-gradient(transparent, #ff3366, #ff6685, transparent 30%);
    animation: rotateGlow 4s linear infinite;
    z-index: 0;
}

.auth-modal::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: white;
    border-radius: 24px;
    z-index: 1;
}

.auth-modal > * { position: relative; z-index: 2; }

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

.auth-modal-logo { text-align: center; margin-bottom: 8px; }
.auth-modal-logo i { font-size: 42px; background: linear-gradient(135deg, #ff6685, #ff3366); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.auth-modal h3 { text-align: center; font-size: 24px; font-weight: 700; color: #2c3e50; margin-bottom: 6px; }
.auth-modal-subtitle { text-align: center; color: #7f8c8d; font-size: 14px; margin-bottom: 28px; }

.auth-tabs { display: flex; background: #f8f9fa; border-radius: 14px; padding: 5px; margin-bottom: 28px; gap: 4px; }
.auth-tab { flex: 1; padding: 10px; border: none; border-radius: 10px; background: transparent; font-size: 14px; font-weight: 600; color: #7f8c8d; cursor: pointer; transition: all 0.25s; }
.auth-tab.active { background: white; color: #ff3366; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: 13px; font-weight: 600; color: #495057; margin-bottom: 7px; }
.auth-field input, .auth-field select { width: 100%; padding: 14px 16px; border: 1.5px solid #e9ecef; border-radius: 14px; font-size: 15px; font-family: 'Poppins', sans-serif; transition: all 0.25s; background: #fafafa; color: #2c3e50; outline: none; }
.auth-field input:focus, .auth-field select:focus { border-color: #ff6685; background: white; box-shadow: 0 0 0 4px rgba(255,102,133,0.1); }
.auth-field input::placeholder { color: #bdc3c7; }

.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-gender-group { display: flex; gap: 10px; }
.auth-gender-btn { flex: 1; padding: 12px; border: 1.5px solid #e9ecef; border-radius: 12px; background: #fafafa; font-size: 13px; font-weight: 600; color: #7f8c8d; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 7px; }
.auth-gender-btn.selected { border-color: #ff6685; background: #fff0f3; color: #ff3366; }

.auth-submit-btn { width: 100%; padding: 15px; border: none; border-radius: 15px; background: linear-gradient(135deg, #ff6685 0%, #ff3366 100%); color: white; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: all 0.3s; box-shadow: 0 6px 20px rgba(255,51,102,0.3); font-family: 'Poppins', sans-serif; }
.auth-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(255,51,102,0.4); }

.auth-divider { text-align: center; color: #adb5bd; font-size: 13px; margin: 16px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: #e9ecef; }
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-social-btn { width: 100%; padding: 13px; border: 1.5px solid #e9ecef; border-radius: 14px; background: white; font-size: 14px; font-weight: 500; color: #495057; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s; font-family: 'Poppins', sans-serif; margin-bottom: 10px; }
.auth-social-btn:hover { background: #f8f9fa; border-color: #dee2e6; }

.auth-agree { font-size: 12px; color: #adb5bd; text-align: center; margin-top: 14px; }
.auth-agree a { color: #ff3366; text-decoration: none; }
.auth-checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: #495057; cursor: pointer; line-height: 1.5; }
.auth-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; margin-top: 1px; accent-color: #ff3366; cursor: pointer; border-radius: 4px; }
.auth-checkbox-label a { color: #ff3366; text-decoration: none; }
.auth-checkbox-label a:hover { text-decoration: underline; }

.auth-error { background: #fff0f3; border: 1px solid #ffb3c1; color: #ff3366; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }

.auth-success { text-align: center; padding: 20px 0; }
.auth-success i { font-size: 56px; color: #4cd964; margin-bottom: 14px; }
.auth-success h4 { font-size: 20px; color: #2c3e50; margin-bottom: 6px; }
.auth-success p { color: #7f8c8d; font-size: 14px; }

/* ===== КНОПКА НАЗАД В ЧАТЕ ===== */
.chat-back-btn {
    display: none;
    width: 36px; height: 36px;
    border-radius: 50%; border: none;
    background: #f5f0f4; color: #ff3366;
    font-size: 15px; cursor: pointer;
    align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s;
}
.chat-back-btn:hover { background: #ffe4ed; }

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    /* Навбар */
    .mobile-menu-btn { display: block; }
    .nav-links { display: none; }
    .mobile-nav { display: block; }

    /* Контейнер */
    .container { padding: 10px 10px 80px; }

    /* Секции */
    .section { padding: 18px 14px; border-radius: 16px; margin-bottom: 14px; }
    h2 { font-size: 20px; margin-bottom: 16px; }
    h2 i { font-size: 18px; }

    /* Фильтры */
    .filters-container { padding: 16px 14px; border-radius: 14px; }
    .filters-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .filter-input, .filter-select { padding: 10px 12px; font-size: 13px; border-radius: 11px; }
    .filter-btn { width: 100%; justify-content: center; padding: 12px; }

    /* Карточки пользователей */
    .results-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .user-card { border-radius: 14px; }
    .user-img { height: 160px; }
    .user-info { padding: 12px; }
    .user-name { font-size: 15px; }
    .user-details { font-size: 12px; }
    .action-btn { padding: 8px 6px; font-size: 12px; gap: 4px; }

    /* ── ЧАТ ── */
    .chat-container {
        flex-direction: column;
        height: calc(100vh - 140px);
        border-radius: 16px;
        overflow: hidden;
        position: relative;
    }
    /* По умолчанию — список во всю высоту */
    .chats-list {
        width: 100%;
        height: 100%;
        max-height: none;
        flex-shrink: 0;
        overflow-y: auto;
    }
    /* Сообщения скрыты */
    .chat-messages {
        display: none;
        position: absolute;
        inset: 0;
        flex-direction: column;
        background: #fafafa;
        z-index: 2;
    }
    /* Когда открыт чат — обратная ситуация */
    .chat-container.mobile-chat-open .chats-list { display: none; }
    .chat-container.mobile-chat-open .chat-messages {
        display: flex;
    }
    /* Кнопка назад */
    .chat-back-btn { display: flex; }

    .messages-container { padding: 12px 10px; }
    .message { max-width: 80%; font-size: 13px; }
    .chat-header { padding: 10px 12px; min-height: 56px; gap: 8px; }
    .chat-header-name { font-size: 14px; }
    .chat-input { padding: 8px 10px; gap: 7px; }
    .message-textarea { font-size: 13px; min-height: 38px; }
    .chat-action-btn { font-size: 16px; width: 36px; height: 36px; }
    .send-btn { width: 38px; height: 38px; }

    /* Истории */
    #chatStoriesBar { margin-bottom: 10px; }

    /* Авторизация */
    .auth-modal { padding: 24px 18px; border-radius: 20px; }
    .auth-row { grid-template-columns: 1fr; gap: 12px; }

    /* Знакомства — вкладки */
    .ankety-tabs { gap: 0; padding: 0; margin-bottom: 0; }
    .ankety-tab { flex: 1; font-size: 11px; padding: 10px 4px; gap: 3px;
        flex-direction: column; align-items: center; justify-content: center; }
    .ankety-tab i { font-size: 17px; }

    /* Моя анкета */
    .my-anketa-wrap { max-width: 100%; }
    .my-anketa-form { padding: 14px; }

    /* Профиль */
    #profileBanner { height: 120px; border-radius: 14px 14px 0 0; }
}

@media (max-width: 480px) {
    /* Навбар */
    .logo span { display: inline; font-size: 18px; font-weight: 800; letter-spacing: -0.5px; }
    .logo { font-size: 20px; gap: 8px; }
    .navbar { padding: 12px 14px; border-radius: 0 0 18px 18px; }

    /* Секции */
    .section { padding: 14px 12px; border-radius: 14px; }
    .container { padding: 8px 8px 76px; }

    /* Карточки — 1 колонка на самых маленьких */
    .results-grid { grid-template-columns: 1fr; gap: 10px; }
    .user-img { height: 200px; }

    /* Сообщения */
    .message { max-width: 86%; font-size: 13px; }
    .messages-container { padding: 10px 8px; }

    /* Фильтры — в 1 колонку */
    .filters-grid { grid-template-columns: 1fr; gap: 8px; }

    /* Текст */
    h2 { font-size: 18px; }

    /* Профиль */
    #profileBanner { height: 100px; }
}

/* Вертикальный телефон — чат во весь экран */
@media (max-width: 768px) and (max-height: 700px) {
    .chat-container { height: calc(100vh - 120px); }
}

/* ── Чат-секция: скрываем h2, даём контейнеру максимум высоты ── */
@media (max-width: 768px) {
    #chats.section { padding: 0; border-radius: 14px; overflow: hidden; }
    #chats h2 { display: none; }
    #chats #chatStoriesBar { padding: 10px 12px 0; margin-bottom: 0; }
    .chat-container { height: calc(100vh - 148px); border-radius: 14px; }

    /* Профиль — убираем лишний padding */
    #profile.section { padding: 0 !important; }

    /* Relationships — вкладки компактнее */
    #relationships.section { padding: 0; border-radius: 14px; overflow: hidden; }
    #relationships h2 { display: none; }
    .ankety-tabs { border-radius: 0; }
    #rel-view-ankety,
    #rel-view-search,
    #rel-view-matches,
    #rel-view-mine { padding: 14px 12px; }

    /* Reply-кнопка на мобиле — всегда видна, а не только на hover */
    .message:hover .msg-reply-btn,
    .msg-reply-btn { display: flex; }
    .message-out .msg-reply-btn { left: -34px; }
    .message-in  .msg-reply-btn { right: -34px; }

    /* Карточки анкет */
    .ankety-card-wrap { padding: 0; }
}



/* ===== НОВАЯ ЛЕНТА ===== */

#feed.section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.feed-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 20px;
    align-items: start;
}

.feed-col { min-width: 0; }

/* Search */
.feed-search-bar {
    background: white;
    border-radius: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 12px rgba(255,51,102,0.07);
    margin-bottom: 14px;
    position: relative;
}
.feed-search-bar > i { color: #ffb3c1; font-size: 14px; flex-shrink: 0; }
.feed-search-bar input {
    border: none; outline: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; color: #2c3e50;
    width: 100%; background: transparent;
}
.feed-search-bar input::placeholder { color: #ccc; }

/* Stories */
.stories-wrap {
    background: white;
    border-radius: 20px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(255,51,102,0.06);
    overflow: hidden;
}
.stories-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.stories-row::-webkit-scrollbar { display: none; }
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    cursor: pointer;
}
.story-ring {
    width: 58px; height: 58px;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #ff3366, #ff9db0);
}
.story-ring.add-btn { background: linear-gradient(135deg, #f0f0f0, #e0e0e0); }
.story-ring.mine { background: #27ae60; }
.story-ava {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    border: 2px solid white;
}
.story-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.story-ava .plus { font-size: 22px; color: #ff3366; font-weight: 300; line-height: 1; }
.story-label {
    font-size: 10px; font-weight: 500;
    color: #555;
    max-width: 60px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Create post */
.create-post {
    background: white;
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(255,51,102,0.06);
    border-top: 3px solid #ff3366;
}
.create-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.create-ava {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb3c1, #ff6b9d);
    flex-shrink: 0;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.create-ava img { width: 100%; height: 100%; object-fit: cover; }
.create-textarea {
    width: 100%;
    background: #fdf5f7;
    border-radius: 14px;
    padding: 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #2c3e50;
    border: 1.5px solid #fde8ed;
    outline: none;
    resize: none;
    box-sizing: border-box;
    transition: border-color .2s;
}
.create-textarea::placeholder { color: #bbb; }
.create-textarea:focus { border-color: #ffb3c1; }
.create-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.create-action-btn {
    display: flex; align-items: center; gap: 5px;
    background: none; border: 1.5px solid #fde8ed;
    border-radius: 20px; padding: 6px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 12px; color: #ff6b9d;
    cursor: pointer; font-weight: 500;
    transition: all .2s;
    text-decoration: none;
}
.create-action-btn:hover { background: #fdf5f7; border-color: #ffb3c1; }
.post-btn {
    margin-left: auto;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white; border: none;
    border-radius: 20px; padding: 8px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 12px rgba(255,51,102,0.3);
    transition: opacity .2s;
    white-space: nowrap;
}
.post-btn:hover { opacity: .9; }

/* Feed tabs */
.feed-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    background: white;
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 2px 12px rgba(255,51,102,0.06);
}
.feed-tab {
    flex: 1; border: none;
    border-radius: 12px;
    padding: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    color: #aaa;
    background: none;
    transition: all .2s;
}
.feed-tab.active {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    box-shadow: 0 3px 10px rgba(255,51,102,0.25);
}
.feed-tab:hover:not(.active) { color: #ff3366; background: #fdf5f7; }

/* Post card */
.post-card {
    background: white;
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 14px rgba(255,51,102,0.06);
    transition: transform .2s, box-shadow .2s;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255,51,102,0.1);
}
.post-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.post-ava {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb3c1, #ff6b9d);
    overflow: hidden; flex-shrink: 0;
    border: 2px solid #fde8ed;
    display: flex; align-items: center; justify-content: center;
}
.post-ava img { width: 100%; height: 100%; object-fit: cover; }
.post-meta { flex: 1; min-width: 0; }
.post-name {
    font-size: 14px; font-weight: 600; color: #2c3e50;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.post-date { font-size: 11px; color: #bbb; font-weight: 400; margin-top: 2px; }
.post-more {
    width: 32px; height: 32px;
    background: none; border: none;
    border-radius: 50%; color: #ccc;
    cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s; flex-shrink: 0;
}
.post-more:hover { background: #f7f0f2; color: #ff3366; }
.post-text {
    font-size: 14px; line-height: 1.6;
    color: #2c3e50; margin: 0 0 14px; word-break: break-word;
}
.post-img {
    width: 100%; border-radius: 14px;
    margin-bottom: 14px;
    object-fit: cover;
    max-height: 420px; display: block;
}
.post-divider {
    height: 1px;
    background: #fdf0f3;
    margin-bottom: 10px;
}
.post-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.post-action {
    display: flex; align-items: center; gap: 5px;
    background: none; border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; color: #bbb;
    cursor: pointer; padding: 6px 10px;
    border-radius: 12px;
    transition: all .2s;
    font-weight: 500;
}
.post-action:hover { background: #fdf5f7; color: #ff3366; }
.post-action.liked { color: #ff3366; }
.post-action i { font-size: 14px; }
.post-action-share {
    margin-left: auto;
    display: flex; align-items: center; gap: 5px;
    background: none; border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; color: #bbb;
    cursor: pointer; padding: 6px 10px;
    border-radius: 12px;
    transition: all .2s;
}
.post-action-share:hover { background: #fdf5f7; color: #ff3366; }
.post-report {
    width: 30px; height: 30px;
    background: none; border: none;
    border-radius: 8px; color: #e0e0e0;
    cursor: pointer; font-size: 12px;
    transition: all .2s;
    display: flex; align-items: center; justify-content: center;
}
.post-report:hover { background: #fff5f5; color: #e74c3c; }

/* Sidebar */
.feed-sidebar { position: sticky; top: 80px; }
.sidebar-card {
    background: white;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(255,51,102,0.06);
}
.sidebar-title {
    font-size: 14px; font-weight: 700;
    color: #2c3e50; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-title i { color: #ff3366; }
.suggest-item {
    display: flex; align-items: center;
    gap: 10px; margin-bottom: 12px;
}
.suggest-item:last-child { margin-bottom: 0; }
.suggest-ava {
    width: 40px; height: 40px;
    border-radius: 50%; overflow: hidden; flex-shrink: 0;
    background: linear-gradient(135deg, #ffb3c1, #ff6b9d);
    display: flex; align-items: center; justify-content: center;
}
.suggest-ava img { width: 100%; height: 100%; object-fit: cover; }
.suggest-info { flex: 1; min-width: 0; }
.suggest-name { font-size: 13px; font-weight: 600; color: #2c3e50; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-sub { font-size: 11px; color: #bbb; }
.suggest-btn {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white; border: none;
    border-radius: 12px; padding: 5px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255,51,102,0.25);
    white-space: nowrap;
}
.trend-item {
    padding: 8px 0;
    border-bottom: 1px solid #fdf0f3;
    cursor: pointer;
}
.trend-item:last-child { border-bottom: none; padding-bottom: 0; }
.trend-tag { font-size: 13px; font-weight: 600; color: #ff3366; }
.trend-count { font-size: 11px; color: #bbb; margin-top: 2px; }

/* Feed adaptive */
@media (max-width: 900px) {
    .feed-layout { grid-template-columns: 1fr; padding: 12px 0; }
    .feed-sidebar { display: none; }
}
@media (max-width: 768px) {
    .create-actions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .post-btn { padding: 7px 13px; font-size: 12px; }
    .feed-tab { font-size: 12px; padding: 7px 4px; }
}

/* ===== ТЁМНАЯ ТЕМА ===== */
/* ===================================================
   ТЁМНАЯ ТЕМА — Deep Black
   =================================================== */

/* CSS переменные тёмной темы */
body.dark {
    --dk-bg:        #0b0b0e;
    --dk-surface:   #111116;
    --dk-surface2:  #18181f;
    --dk-surface3:  #1f1f28;
    --dk-border:    #26262f;
    --dk-border2:   #2e2e3a;
    --dk-text:      #e4e4ef;
    --dk-text2:     #8a8a9e;
    --dk-text3:     #55556a;
    --dk-accent:    #ff3366;
    --dk-accent2:   #ff6685;

    background: var(--dk-bg);
    color: var(--dk-text);
}

/* Навбар */
body.dark .navbar {
    background: var(--dk-surface) !important;
    box-shadow: 0 1px 0 var(--dk-border);
    border-radius: 0;
}
body.dark .navbar a { color: var(--dk-text2); }
body.dark .navbar a:hover,
body.dark .navbar a.active { background: var(--dk-surface3); color: var(--dk-text); }
body.dark .logo { color: var(--dk-accent2); }

/* Секции */
body.dark .section {
    background: var(--dk-surface);
    box-shadow: none;
    border: 1px solid var(--dk-border);
    border-radius: 16px;
}
body.dark h2 { color: var(--dk-text); }

/* Фильтры */
body.dark .filters-container {
    background: var(--dk-surface2);
    border: 1px solid var(--dk-border);
}
body.dark .filter-input,
body.dark .filter-select {
    background: var(--dk-surface3);
    color: var(--dk-text);
    box-shadow: none;
    border: 1px solid var(--dk-border2);
}
body.dark .filter-group label { color: var(--dk-text2); }

/* Карточки */
body.dark .user-card {
    background: var(--dk-surface2);
    border: 1px solid var(--dk-border);
    box-shadow: none;
}
body.dark .user-name { color: var(--dk-text); }
body.dark .user-details { color: var(--dk-text2); }
body.dark .tag { background: var(--dk-surface3); color: var(--dk-text2); border: 1px solid var(--dk-border2); }

/* Чаты */
body.dark .chat-container { background: var(--dk-surface); border: 1px solid var(--dk-border); }
body.dark .chats-list { background: var(--dk-surface); border-right: 1px solid var(--dk-border); }
body.dark .chat-search { background: var(--dk-surface); border-bottom: 1px solid var(--dk-border); }
body.dark .chat-search-input { background: var(--dk-surface3); color: var(--dk-text); }
body.dark .chat-item:hover { background: var(--dk-surface2); }
body.dark .chat-item.active { background: var(--dk-surface3); }
body.dark .chat-name { color: var(--dk-text); }
body.dark .chat-preview { color: var(--dk-text3); }
body.dark .chat-messages { background: var(--dk-bg); }
body.dark .chat-header { background: var(--dk-surface); border-bottom: 1px solid var(--dk-border); }
body.dark .chat-header-name { color: var(--dk-text); }
body.dark .chat-input { background: var(--dk-surface); border-top: 1px solid var(--dk-border); }
body.dark .message-input { background: var(--dk-surface3); color: var(--dk-text); border-color: var(--dk-border); }
body.dark .message-textarea { background: var(--dk-surface3); color: var(--dk-text); border-color: var(--dk-border); }
body.dark .chat-action-btn { color: var(--dk-text3); }
body.dark .chat-action-btn:hover { color: var(--dk-accent2); }
body.dark .message-in { background: var(--dk-surface2); color: var(--dk-text); }
body.dark .msg-date-sep span { background: var(--dk-surface2); color: var(--dk-text3); }

/* Мобильная навигация */
body.dark .mobile-nav {
    background: var(--dk-surface);
    border-top: 1px solid var(--dk-border);
}
body.dark .mobile-nav-link { color: var(--dk-text3); }
body.dark .mobile-nav-link.active { color: var(--dk-accent2); }

/* Настройки */
body.dark #settingsPanel {
    background: var(--dk-surface2) !important;
    border: 1px solid var(--dk-border) !important;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7) !important;
}
body.dark #settingsPanel p { color: var(--dk-text) !important; }
body.dark #settingsPanel span { color: var(--dk-text) !important; }
body.dark #settingsPanel button { color: var(--dk-text) !important; }
body.dark #settingsPanel button:hover { background: var(--dk-surface3) !important; }

/* Профиль — белые блоки */
body.dark [style*="background:white"],
body.dark [style*="background: white"] {
    background: var(--dk-surface) !important;
    border-color: var(--dk-border) !important;
}
body.dark #userNameDisplay { color: var(--dk-text) !important; }
body.dark #userBioDisplay { color: var(--dk-text2) !important; }
body.dark #userMetaDisplay { color: var(--dk-text3) !important; }
body.dark #userUsernameDisplay { color: var(--dk-accent2) !important; }

body.dark [style*="border:1px solid #f0e8e8"],
body.dark [style*="border: 1px solid #f0e8e8"] { border-color: var(--dk-border) !important; }
body.dark [style*="color:#2c3e50"] { color: var(--dk-text) !important; }
body.dark [style*="color: #2c3e50"] { color: var(--dk-text) !important; }
body.dark [style*="color:#888"],
body.dark [style*="color:#999"],
body.dark [style*="color:#aaa"],
body.dark [style*="color: #888"],
body.dark [style*="color: #999"] { color: var(--dk-text2) !important; }
body.dark [style*="color:#bbb"],
body.dark [style*="color:#eee"] { color: var(--dk-text3) !important; }

/* Блок интересов */
body.dark #myInterests {
    border-color: var(--dk-border2) !important;
    background: var(--dk-surface2) !important;
}
body.dark #myInterests .tag { background: var(--dk-surface3); color: var(--dk-text2); }

/* Интересы в модалке редактирования */
#availableTags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}
body.dark #availableTags {
    background: var(--dk-surface2) !important;
    border: none !important;
}
body.dark #availableTags .tag {
    background: var(--dk-surface3) !important;
    color: var(--dk-text2) !important;
    border: none !important;
}
body.dark #availableTags .tag.tag-selected,
body.dark #availableTags .tag[style*="background:#ff3366"] {
    background: #ff3366 !important;
    color: white !important;
}
body.dark [style*="background:#fff5f7"],
body.dark [style*="background: #fff5f7"] { background: var(--dk-surface2) !important; }
body.dark [style*="background:#fafafa"],
body.dark [style*="background: #fafafa"] { background: var(--dk-surface2) !important; }
body.dark [style*="background:#f8f9fa"],
body.dark [style*="background: #f8f9fa"] { background: var(--dk-surface2) !important; }
body.dark [style*="background:#f0e8e8"] { background: var(--dk-surface3) !important; }
body.dark [style*="background:#ffe4e8"],
body.dark [style*="background: #ffe4e8"] { background: var(--dk-surface3) !important; }

/* Посты — блок создания */
body.dark #createPostBlock {
    background: var(--dk-surface) !important;
    border-color: var(--dk-border) !important;
    box-shadow: none !important;
}
body.dark #profileCreatePostBlock {
    background: var(--dk-surface2) !important;
    border-color: var(--dk-border2) !important;
    box-shadow: none !important;
}
body.dark #postText,
body.dark #profilePostText {
    background: var(--dk-surface3) !important;
    color: var(--dk-text) !important;
    border-color: var(--dk-border2) !important;
}
body.dark #postText::placeholder,
body.dark #profilePostText::placeholder { color: var(--dk-text3) !important; }

/* Интересы — пунктирная рамка */
body.dark #myInterests {
    border-color: var(--dk-border2) !important;
    background: transparent !important;
}

/* Посты */
body.dark [style*="border:1.5px solid #f0e8e8"] { border-color: var(--dk-border) !important; }
body.dark textarea,
body.dark input[type="text"],
body.dark input[type="email"],
body.dark input[type="password"] {
    background: var(--dk-surface3) !important;
    color: var(--dk-text) !important;
    border-color: var(--dk-border2) !important;
}

/* Модалка редактирования */
body.dark #editProfileOverlay > div {
    background: var(--dk-surface) !important;
    border: 1px solid var(--dk-border) !important;
}
body.dark #editProfileOverlay label { color: var(--dk-text2) !important; }
body.dark #editProfileOverlay input,
body.dark #editProfileOverlay textarea {
    background: var(--dk-surface3) !important;
    color: var(--dk-text) !important;
    border-color: var(--dk-border2) !important;
}
body.dark #editProfileOverlay h3 { color: var(--dk-text) !important; }
body.dark #editBannerPreview { opacity: 0.85; }
body.dark button[onclick="openEditModal()"] {
    background: var(--dk-surface2) !important;
    border-color: var(--dk-border2) !important;
    color: var(--dk-text2) !important;
}

/* Авторизация */
body.dark .auth-modal::after { background: var(--dk-surface); }
body.dark .auth-modal h3 { color: var(--dk-text); }
body.dark .auth-modal-subtitle { color: var(--dk-text2); }
body.dark .auth-field label { color: var(--dk-text2); }
body.dark .auth-field input,
body.dark .auth-field select {
    background: var(--dk-surface3);
    color: var(--dk-text);
    border-color: var(--dk-border2);
}
body.dark .auth-tabs { background: var(--dk-surface3); }
body.dark .auth-tab { color: var(--dk-text2); }
body.dark .auth-tab.active { background: var(--dk-surface); color: var(--dk-accent2); }
body.dark .auth-social-btn {
    background: var(--dk-surface3);
    border-color: var(--dk-border2);
    color: var(--dk-text);
}
body.dark .auth-social-btn:hover { background: var(--dk-surface2); }
body.dark .auth-agree { color: var(--dk-text3); }
body.dark .auth-checkbox-label { color: var(--dk-text2); }

/* Скроллбар */
body.dark ::-webkit-scrollbar { width: 6px; height: 6px; }
body.dark ::-webkit-scrollbar-track { background: var(--dk-bg); }
body.dark ::-webkit-scrollbar-thumb { background: var(--dk-border2); border-radius: 3px; }
body.dark ::-webkit-scrollbar-thumb:hover { background: var(--dk-accent2); }

/* Гендер-кнопки на регистрации */
body.dark .auth-gender-btn {
    background: var(--dk-surface3);
    border-color: var(--dk-border2);
    color: var(--dk-text2);
}
body.dark .auth-gender-btn.selected { border-color: var(--dk-accent2); background: #2d1a22; color: var(--dk-accent2); }

/* Поиск */
body.dark #searchResults {
    background: var(--dk-surface2) !important;
    border: 1px solid var(--dk-border);
}
body.dark #searchResults [onmouseover] { color: var(--dk-text); }
/* ===== АНКЕТЫ ===== */
.ankety-tabs {
    display: flex; gap: 8px; margin-bottom: 24px;
    border-bottom: 2px solid #f0e8e8; padding-bottom: 0;
}
.ankety-tab {
    padding: 10px 20px; border: none; background: none; cursor: pointer;
    font-family: Poppins, sans-serif; font-size: 14px; font-weight: 600;
    color: #adb5bd; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .2s; position: relative; display: flex; align-items: center; gap: 6px;
}
.ankety-tab.active { color: #ff3366; border-bottom-color: #ff3366; }
.ankety-matches-badge {
    background: #ff3366; color: white; border-radius: 20px;
    font-size: 10px; font-weight: 700; padding: 1px 6px; min-width: 16px; text-align: center;
}

/* Обёртка карточки */
.ankety-card-wrap { display: flex; justify-content: center; padding: 8px 0 24px; }

/* Карточка анкеты */
.ankety-card {
    background: white; border-radius: 24px; width: 100%; max-width: 420px;
    box-shadow: 0 8px 40px rgba(255,51,102,0.12); overflow: hidden;
    transition: transform .3s ease, opacity .3s ease;
}
.ankety-card.ankety-swipe-right {
    transform: translateX(120%) rotate(15deg); opacity: 0;
}
.ankety-card.ankety-swipe-left {
    transform: translateX(-120%) rotate(-15deg); opacity: 0;
}
/* Фото-слайдер анкеты */
.ankety-photo-wrap {
    position: relative; height: 340px; overflow: hidden; background: linear-gradient(135deg,#ff6685,#ff3366);
    cursor: pointer; user-select: none;
}
.ankety-slides { position: absolute; inset: 0; }
.ankety-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity .25s ease;
}
.ankety-slide.active { opacity: 1; }
.ankety-banner-overlay {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 55%);
    z-index: 2;
}
.ankety-photo-dots {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 3;
}
.ankety-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.45); transition: background .2s, transform .2s;
}
.ankety-dot.active { background: #fff; transform: scale(1.2); }

/* Заглушка — старый .ankety-banner для совместимости */
.ankety-banner {
    position: relative; height: 280px; background-size: cover; background-position: center;
}
.ankety-avatar {
    position: absolute; bottom: -44px; left: 24px;
    width: 88px; height: 88px; border-radius: 50%;
    border: 4px solid white; object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.ankety-info { padding: 24px 24px 16px; }
.ankety-name-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.ankety-name { font-size: 22px; font-weight: 700; color: #2c3e50; }
.ankety-age { font-size: 18px; color: #ff3366; font-weight: 600; }
.ankety-city { font-size: 13px; color: #7f8c8d; margin-bottom: 6px; }
.ankety-goal { font-size: 13px; color: #ff9db0; font-weight: 500; margin-bottom: 8px; }
.ankety-about {
    font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ankety-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.ankety-tag {
    background: #fff0f3; color: #ff3366; border-radius: 20px;
    font-size: 11px; font-weight: 600; padding: 3px 10px;
}
.ankety-actions {
    display: flex; justify-content: center; align-items: center;
    gap: 32px; padding: 16px 24px 24px;
}
.ankety-btn {
    width: 64px; height: 64px; border-radius: 50%; border: none;
    cursor: pointer; font-size: 24px; display: flex; align-items: center;
    justify-content: center; transition: all .2s; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.ankety-skip { background: white; color: #bdc3c7; }
.ankety-skip:hover { background: #f8f9fa; color: #e74c3c; transform: scale(1.08); }
.ankety-like { background: linear-gradient(135deg,#ff3366,#ff6b9d); color: white; }
.ankety-like:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(255,51,102,0.35); }

/* Пусто / загрузка */
.ankety-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 24px; color: #adb5bd; text-align: center;
    gap: 8px;
}
.ankety-empty i { font-size: 48px; margin-bottom: 8px; color: #ffb3c1; }
.ankety-loading { display: flex; align-items: center; justify-content: center; padding: 80px; color: #ffb3c1; font-size: 28px; }

/* ===== PHOTO VIEWER (VK-стиль) ===== */
.pv-overlay {
    position: fixed; inset: 0; z-index: 10500;
    background: #0d0d0d;
    display: none; /* открывается JS-ом */
    flex-direction: row;
    align-items: stretch;
    animation: pvFadeIn .18s ease;
}
@keyframes pvFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* Центральная зона с фото */
.pv-center {
    flex: 1; display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative; min-width: 0;
}
#pvImg {
    max-width: 100%; max-height: 100vh;
    object-fit: contain; user-select: none; display: block;
    transition: opacity .2s;
}

/* Боковые стрелки */
.pv-side {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 20px; z-index: 10;
    transition: background .2s; user-select: none;
}
.pv-side:hover { background: rgba(255,255,255,0.22); }
.pv-side-left  { left: 16px; }
.pv-side-right { right: 16px; }

/* Правая панель */
.pv-panel {
    width: 300px; flex-shrink: 0;
    background: #1a1a1a; border-left: 1px solid #2a2a2a;
    display: flex; flex-direction: column; padding: 24px 20px;
    overflow-y: auto;
}
.pv-panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pv-author    { display: flex; align-items: center; gap: 10px; }
.pv-counter   { font-size: 13px; color: #888; white-space: nowrap; }
.pv-date      { font-size: 12px; color: #666; margin-bottom: 20px; }
.pv-actions   { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.pv-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    background: rgba(255,255,255,0.08); color: #ccc;
    transition: background .2s; font-family: 'Poppins', sans-serif;
}
.pv-action-btn:hover { background: rgba(255,255,255,0.15); }
.pv-del { background: rgba(231,76,60,0.18) !important; color: #e74c3c !important; }
.pv-del:hover { background: rgba(231,76,60,0.32) !important; }

/* Кнопка закрыть */
.pv-close {
    position: fixed; top: 16px; right: 16px; z-index: 20;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.12); color: white; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.pv-close:hover { background: rgba(255,255,255,0.25); }

/* Мобиль — прячем панель */
@media (max-width: 640px) {
    .pv-panel { display: none; }
    .pv-side-left  { left: 8px; }
    .pv-side-right { right: 8px; }
    .pv-side { width: 40px; height: 40px; font-size: 16px; }
}

/* Матчи */
.ankety-matches-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px;
}
.ankety-match-card {
    background: white; border-radius: 18px; padding: 20px 16px 16px;
    text-align: center; cursor: pointer; position: relative;
    box-shadow: 0 4px 16px rgba(255,51,102,0.08); transition: all .2s;
    border: 1px solid #f0e8e8;
}
.ankety-match-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(255,51,102,0.15); }
.ankety-match-avatar { position: relative; display: inline-block; margin-bottom: 10px; }
.ankety-match-avatar img {
    width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
    border: 3px solid #ffb3c1;
}
.ankety-match-heart {
    position: absolute; bottom: 0; right: 0;
    width: 24px; height: 24px; background: #ff3366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; color: white; border: 2px solid white;
}
.ankety-match-name { font-size: 14px; font-weight: 700; color: #2c3e50; margin-bottom: 2px; }
.ankety-match-city { font-size: 11px; color: #adb5bd; margin-bottom: 10px; }
.ankety-match-chat {
    background: linear-gradient(135deg,#ff3366,#ff6b9d); color: white;
    border: none; border-radius: 20px; padding: 6px 16px; font-size: 12px;
    font-weight: 600; cursor: pointer; font-family: Poppins, sans-serif;
    display: flex; align-items: center; gap: 6px; margin: 0 auto;
}

/* Матч попап */
.match-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.match-modal {
    background: white; border-radius: 28px; padding: 40px 32px;
    text-align: center; max-width: 360px; width: 90%;
    animation: matchPop .4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes matchPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.match-hearts { font-size: 40px; margin-bottom: 8px; animation: heartBeat .6s ease .2s both; }
@keyframes heartBeat {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.match-title { font-size: 28px; font-weight: 700; color: #ff3366; margin-bottom: 4px; }
.match-subtitle { font-size: 14px; color: #7f8c8d; margin-bottom: 24px; }
.match-avatars { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 16px; }
.match-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.match-avatar-heart { margin: 0 -8px; z-index: 1; font-size: 28px; color: #ff3366; }
.match-name { font-size: 18px; font-weight: 700; color: #2c3e50; margin-bottom: 24px; }
.match-btns { display: flex; flex-direction: column; gap: 10px; }
.match-btn-write {
    background: linear-gradient(135deg,#ff3366,#ff6b9d); color: white;
    border: none; border-radius: 14px; padding: 14px; font-size: 15px;
    font-weight: 700; cursor: pointer; font-family: Poppins,sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.match-btn-skip {
    background: none; border: 1.5px solid #f0e8e8; border-radius: 14px;
    padding: 12px; font-size: 14px; font-weight: 500; cursor: pointer;
    color: #7f8c8d; font-family: Poppins,sans-serif;
}
.match-btn-write:hover { opacity: .9; }
.match-btn-skip:hover { background: #f8f9fa; }

/* Тёмная тема */
body.dark .ankety-card { background: var(--dk-surface); box-shadow: none; border: 1px solid var(--dk-border); }
body.dark .ankety-avatar { border-color: var(--dk-surface); }
body.dark .ankety-name { color: var(--dk-text); }
body.dark .ankety-city, body.dark .ankety-about { color: var(--dk-text2); }
body.dark .ankety-tag { background: var(--dk-surface3); color: var(--dk-accent2); }
body.dark .ankety-skip { background: var(--dk-surface2); color: var(--dk-text2); }
body.dark .ankety-match-card { background: var(--dk-surface); border-color: var(--dk-border); }
body.dark .ankety-match-name { color: var(--dk-text); }
body.dark .ankety-tab { color: var(--dk-text2); }
body.dark .ankety-tab.active { color: var(--dk-accent2); border-bottom-color: var(--dk-accent2); }
body.dark .ankety-tabs { border-bottom-color: var(--dk-border); }
body.dark .match-modal { background: var(--dk-surface); }
body.dark .match-title { color: var(--dk-accent2); }
body.dark .match-subtitle, body.dark .match-btn-skip { color: var(--dk-text2); }
body.dark .match-name { color: var(--dk-text); }
body.dark .match-btn-skip { border-color: var(--dk-border); }
body.dark #rel-view-search .filters-container { background: var(--dk-surface); }
body.dark #rel-view-search #relInterestTags { background: var(--dk-surface2) !important; box-shadow: none !important; }

/* ===== МОЯ АНКЕТА ===== */
.my-anketa-wrap { max-width: 480px; margin: 0 auto; }
.my-anketa-preview-label {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #adb5bd;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.my-anketa-form {
    background: white;
    border-radius: 20px;
    padding: 22px;
    margin-top: 16px;
    box-shadow: 0 4px 20px rgba(255,51,102,0.07);
}
.my-anketa-form-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 18px;
}
.my-anketa-field {
    margin-bottom: 14px;
}
.my-anketa-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #ff9db0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.my-anketa-select, .my-anketa-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #f0e8e8;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #2c3e50;
    outline: none;
    transition: border 0.2s;
    box-sizing: border-box;
    background: white;
}
.my-anketa-select:focus, .my-anketa-input:focus { border-color: #ffb3c1; }
.my-anketa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.my-anketa-save-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s;
}
.my-anketa-save-btn:hover { opacity: 0.88; }
.my-anketa-edit-btn {
    flex: 1;
    padding: 12px;
    background: white;
    color: #ff3366;
    border: 1.5px solid #ffccd5;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.my-anketa-edit-btn:hover { background: #fff5f7; }
.my-anketa-toggle-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.my-anketa-toggle-active {
    background: #e8faf0;
    color: #27ae60;
    border: 1.5px solid #a8e6c0;
}
.my-anketa-toggle-active:hover { background: #d4f5e5; }
.my-anketa-toggle-inactive {
    background: #fff0f0;
    color: #e74c3c;
    border: 1.5px solid #f5c0c0;
}
.my-anketa-toggle-inactive:hover { background: #ffe5e5; }
body.dark .my-anketa-toggle-active { background: rgba(39,174,96,0.15); color: #2ecc71; border-color: rgba(39,174,96,0.3); }
body.dark .my-anketa-toggle-inactive { background: rgba(231,76,60,0.15); color: #e74c3c; border-color: rgba(231,76,60,0.3); }

/* dark */
body.dark .my-anketa-form { background: var(--dk-surface); box-shadow: none; border: 1px solid var(--dk-border); }
body.dark .my-anketa-form-title { color: var(--dk-text); }
body.dark .my-anketa-select, body.dark .my-anketa-input { background: var(--dk-surface2); border-color: var(--dk-border); color: var(--dk-text); }
body.dark .my-anketa-select:focus, body.dark .my-anketa-input:focus { border-color: var(--dk-accent2); }
body.dark .my-anketa-edit-btn { background: var(--dk-surface2); color: var(--dk-accent2); border-color: var(--dk-border); }
body.dark .my-anketa-edit-btn:hover { background: var(--dk-surface3); }
body.dark .my-anketa-preview-label { color: var(--dk-text2); }

/* ===== CITY AUTOCOMPLETE ===== */
.city-ac-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1.5px solid #ffccd5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(255,51,102,0.1);
    z-index: 9999;
    margin-top: 4px;
    overflow: hidden;
}
.city-ac-item {
    padding: 10px 14px;
    font-size: 13px;
    color: #2c3e50;
    cursor: pointer;
    transition: background 0.15s;
    font-family: 'Poppins', sans-serif;
}
.city-ac-item:hover { background: #fff0f5; color: #ff3366; }
body.dark .city-ac-dropdown {
    background: var(--dk-surface2);
    border-color: var(--dk-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
body.dark .city-ac-item { color: var(--dk-text); }
body.dark .city-ac-item:hover { background: var(--dk-surface3); color: var(--dk-accent2); }

/* ===== CHAT UNREAD BADGE ===== */
.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e91e8c;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.chat-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

/* ===== CHAT TABS ===== */
.chat-tabs {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 8px;
    padding: 0 12px;
    gap: 4px;
}

.chat-tab-btn {
    position: relative;
    padding: 10px 16px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #adb5bd;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}





.settings-balance-card {
    background: linear-gradient(135deg, #ff3366 0%, #ff6b9d 100%);
    padding: 16px;
    color: white;
}
.balance-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.balance-label {
    font-size: 11px;
    opacity: 0.9;
}
.balance-username {
    font-size: 11px;
    opacity: 0.75;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.balance-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.balance-coin {
    font-size: 20px;
    color: #ffd93d;
    display: inline-flex;
    align-items: center;
}
.balance-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
}
.balance-currency {
    font-size: 12px;
    opacity: 0.85;
}
.balance-topup-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    color: #ff3366;
    border: none;
    padding: 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.balance-topup-btn:hover {
    background: white;
    transform: translateY(-1px);
}
.balance-topup-btn:active {
    transform: translateY(0);
}











/* ===== ПОЛОСА ПОДАРКОВ В ПРОФИЛЕ ===== */
.profile-gifts-bar {
    background: #fff9fa;
    border: 1px solid #f0e8e6;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.profile-gifts-bar:hover {
    background: #ffe9ee;
    border-color: #ffb3c1;
    transform: translateY(-1px);
}
.gifts-bar-all {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 11px;
    color: #ff3366;
    font-weight: 600;
}
.gifts-bar-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}
.gifts-bar-count {
    background: #ff3366;
    color: white;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 4px;
}
.gifts-bar-list {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}
.gift-preview {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255,51,102,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}
.gift-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.gift-preview-more {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    font-weight: 700;
    font-size: 12px;
    padding: 0;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.profile-gifts-empty {
    background: #fff9fa;
    border: 1.5px dashed #ffb3c1;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
}
.gifts-empty-icon {
    font-size: 24px;
    color: #ffb3c1;
    margin-bottom: 6px;
}
.profile-gifts-empty p {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px;
}
.gifts-empty-btn {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border: none;
    padding: 7px 18px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

/* ===== МОДАЛКА ПОДАРКОВ ===== */
.gifts-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 5000;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 20px;
    overflow-y: auto;
}
.gifts-modal-overlay.show {
    display: flex;
}
.gifts-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: giftsModalSlide .25s ease;
}
@keyframes giftsModalSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.gifts-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0e8e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gifts-modal-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gifts-modal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffe4e8;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gifts-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gifts-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}
.gifts-modal-subtitle {
    font-size: 11px;
    color: #999;
    margin: 2px 0 0;
}
.gifts-modal-close {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.gifts-modal-filters {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid #f0e8e6;
    overflow-x: auto;
}
.gift-filter-btn {
    background: white;
    border: 1.5px solid #f0e8e6;
    color: #666;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
    transition: all .15s;
}
.gift-filter-btn.active {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border-color: transparent;
}
.gifts-modal-body {
    padding: 16px 20px;
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.gift-card {
    background: #fff9fa;
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    transition: transform .15s;
    border: 1px solid transparent;
}
.gift-card:hover {
    transform: translateY(-2px);
    border-color: #ffb3c1;
}
.gift-card-img {
    width: 100%;
    height: 50px;
    object-fit: contain;
    margin-bottom: 4px;
}
.gift-card-name {
    font-size: 11px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gift-card-from {
    font-size: 10px;
    color: #999;
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
.gift-card-from:hover {
    color: #ff3366;
}
.gift-card-price {
    font-size: 10px;
    color: #ff9500;
    font-weight: 700;
    margin-top: 2px;
}
.gift-sell-btn {
    margin-top: 6px;
    width: 100%;
    padding: 5px 0;
    background: linear-gradient(135deg, #f9c74f, #f8961e);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.gift-sell-btn:hover { opacity: 0.88; transform: scale(1.03); }
.gift-sell-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
body.dark .gift-sell-btn { background: linear-gradient(135deg, #b8860b, #d4700a); }
.gifts-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0e8e6;
    background: #fff9fa;
}
.btn-give-gift {
    width: 100%;
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border: none;
    padding: 11px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .gifts-modal-body {
        grid-template-columns: repeat(3, 1fr);
    }
}





/* ===== МОДАЛКА ВЫБОРА ПОДАРКА ===== */
.gift-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 6000;
    align-items: flex-start;
    justify-content: center;
    padding: 30px 20px;
    overflow-y: auto;
}
.gift-picker-overlay.show {
    display: flex;
}
.gift-picker {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: giftPickerSlide .25s ease;
}
@keyframes giftPickerSlide {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.gift-picker-header {
    padding: 18px 20px;
    border-bottom: 1px solid #f0e8e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff9fa 0%, #fff 100%);
}
.gift-picker-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gift-picker-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffe4e8;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gift-picker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gift-picker-title {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}
.gift-picker-balance {
    font-size: 12px;
    color: #999;
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.gift-picker-close {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.gift-picker-body {
    padding: 16px 20px;
    max-height: 50vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.gift-picker-card {
    background: #fff9fa;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.gift-picker-card:hover {
    transform: translateY(-2px);
    border-color: #ffb3c1;
}
.gift-picker-card.selected {
    border-color: #ff3366;
    background: #fff0f3;
    box-shadow: 0 4px 12px rgba(255,51,102,0.2);
}
.gift-picker-card.cant-afford {
    opacity: 0.45;
    cursor: not-allowed;
}
.gift-picker-card.cant-afford:hover {
    transform: none;
    border-color: transparent;
}
.gift-picker-card-img {
    width: 100%;
    height: 60px;
    object-fit: contain;
    margin-bottom: 6px;
}
.gift-picker-card-name {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gift-picker-card-price {
    font-size: 12px;
    color: #ff9500;
    font-weight: 700;
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.gift-picker-card-price i {
    font-size: 10px;
    color: #ffd93d;
}

.gift-picker-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0e8e6;
    background: #fff9fa;
    display: flex;
    align-items: center;
    gap: 12px;
}
.gift-picker-selected {
    flex: 1;
    font-size: 13px;
    color: #2c3e50;
}
.gift-picker-selected b {
    color: #ff3366;
}
.gift-picker-send-btn {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.gift-picker-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Модалка успешной отправки */
.gift-success-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 7000;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}
.gift-success-overlay.show {
    display: flex;
}
.gift-success {
    background: white;
    border-radius: 24px;
    padding: 30px 26px;
    text-align: center;
    width: 100%;
    max-width: 360px;
    animation: giftSuccessPop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes giftSuccessPop {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.gift-success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    box-shadow: 0 8px 24px rgba(46,204,113,0.35);
}
.gift-success h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 6px;
}
.gift-success p {
    font-size: 13px;
    color: #888;
    margin: 0 0 18px;
}
.gift-success-btn {
    background: linear-gradient(135deg, #ff3366, #ff6b9d);
    color: white;
    border: none;
    padding: 11px 28px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

@media (max-width: 600px) {
    .gift-picker-body {
        grid-template-columns: repeat(2, 1fr);
    }
}





.chat-tab-btn.active {
    color: #e91e8c;
    border-bottom-color: #e91e8c;
}

.chat-tab-btn:hover {
    color: #e91e8c;
}

#requestsTabBadge {
    display: none;
    position: absolute;
    top: 6px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e91e8c;
    color: #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== REQUEST ITEM ===== */
.request-item {
    cursor: default !important;
}

.request-item .chat-info {
    cursor: pointer;
}

.request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.req-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}

.req-btn:hover { transform: scale(1.1); }
.req-btn:active { transform: scale(0.95); }

.req-accept {
    background: #e8f5e9;
    color: #2e7d32;
}

.req-accept:hover { background: #c8e6c9; }

/* ===== МЫСЛИ (THOUGHT BUBBLE) ===== */

/* Кольцо вокруг аватара */
.has-thought {
    outline: 3px solid transparent;
    outline-offset: 2px;
    border-radius: 50%;
    background-image: linear-gradient(white, white),
                      linear-gradient(135deg, #ff6685, #ffb347, #ff3366);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: thoughtRingPulse 2.5s ease-in-out infinite;
}
@keyframes thoughtRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,51,102,0.0); }
    50%       { box-shadow: 0 0 0 5px rgba(255,51,102,0.18); }
}

/* Обёртка аватара с кольцом */
.avatar-thought-ring {
    display: inline-flex;
    position: relative;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #a18cd1, #fbc2eb); /* фиолетово-розовый — мысль */
    cursor: pointer;
    flex-shrink: 0;
    animation: thoughtRingPulse 2.5s ease-in-out infinite;
}
.avatar-thought-ring img,
.avatar-thought-ring .chat-avatar-placeholder {
    border: 2.5px solid white;
    border-radius: 50%;
}

/* Кольцо фото-истории — яркий оранжево-розовый градиент как в Инстаграм */
#profileAvatarWrap.has-photo-story {
    display: inline-flex;
    border-radius: 50%;
    padding: 2.5px;
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    animation: thoughtRingPulse 2s ease-in-out infinite;
}
#profileAvatarWrap.has-photo-story img,
#profileAvatarWrap.has-photo-story > div:not(.thought-bubble) {
    border: 2.5px solid white;
    border-radius: 50%;
}

/* Пузырь мысли — стиль Discord */
.thought-bubble {
    position: absolute;
    left: calc(100% + 26px);
    top: 50%;
    transform: translateY(-50%);
    background: #111214;
    color: #dbdee1;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    padding: 9px 13px 9px 10px;
    border-radius: 8px;
    max-width: 230px;
    min-width: 80px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.4);
    animation: thoughtAppear .18s ease;
    /* overflow: visible — чтобы хвостик-кружки не обрезались */
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.thought-bubble-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    font-size: 13px;
    color: #dbdee1;
}
/* Хвостик — два кружка как в Discord */
.thought-bubble::before,
.thought-bubble::after {
    content: '';
    position: absolute;
    background: #111214;
    border-radius: 50%;
}
.thought-bubble::before {
    width: 10px; height: 10px;
    left: -14px; top: 50%; transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.thought-bubble::after {
    width: 6px; height: 6px;
    left: -22px; top: 50%; transform: translateY(-50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.thought-bubble-timer {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    display: block;
    white-space: nowrap;
}
/* Бейдж 💭 на аватаре */
.avatar-thought-ring::after {
    content: '💭';
    position: absolute;
    bottom: -2px; right: -2px;
    width: 20px; height: 20px;
    font-size: 13px;
    background: #111214;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    line-height: 1;
    z-index: 2;
}
/* Когда есть и история и мысль — бейдж не нужен (кольцо уже оранжевое) */
#profileAvatarWrap.has-photo-story.avatar-thought-ring::after {
    display: none;
}
@keyframes thoughtAppear {
    from { opacity: 0; transform: translateY(-50%) translateX(-6px); }
    to   { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Модалка написать мысль */
.thought-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.thought-modal-overlay.show { display: flex; }
.thought-modal {
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 32px;
    width: 100%;
    max-width: 500px;
    animation: slideUp .25s ease;
}
@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.thought-modal-title {
    font-size: 16px; font-weight: 700; color: #1a1a2e;
    margin-bottom: 4px;
}
.thought-modal-sub {
    font-size: 12px; color: #94a3b8; margin-bottom: 16px;
}
.thought-textarea {
    width: 100%;
    min-height: 90px;
    border: 1.5px solid #f0e8f0;
    border-radius: 16px;
    padding: 12px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    resize: none;
    outline: none;
    color: #1a1a2e;
    background: #fafafa;
    transition: border-color .2s;
    box-sizing: border-box;
}
.thought-textarea:focus { border-color: #ff8fab; background: white; }
.thought-char-count {
    font-size: 11px; color: #bbb; text-align: right; margin-top: 4px;
}
.thought-modal-actions {
    display: flex; gap: 10px; margin-top: 14px;
}
.thought-save-btn {
    flex: 1; padding: 13px;
    background: linear-gradient(135deg, #ff6685, #ff3366);
    color: white; border: none; border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: opacity .2s;
}
.thought-save-btn:hover { opacity: .9; }
.thought-clear-btn {
    padding: 13px 16px;
    background: #f8f0f4; color: #e05078;
    border: 1.5px solid #ffd6e0; border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px; font-weight: 600; cursor: pointer;
}

/* Кнопка «+ мысль» рядом с аватаром в профиле */
.thought-add-btn {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 26px; height: 26px;
    background: linear-gradient(135deg, #ff6685, #ff3366);
    color: white; border: 2px solid white;
    border-radius: 50%; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2;
    transition: transform .15s;
}
.thought-add-btn:hover { transform: scale(1.15); }

body.dark .thought-bubble { background: #111214; color: #dbdee1; }
body.dark .thought-bubble::before,
body.dark .thought-bubble::after { background: #111214; }
body.dark .thought-modal { background: var(--dk-surface); }
body.dark .thought-modal-title { color: var(--dk-text); }
body.dark .thought-textarea { background: var(--dk-surface3); color: var(--dk-text); border-color: var(--dk-border); }
body.dark .thought-clear-btn { background: var(--dk-surface2); border-color: var(--dk-border); color: var(--dk-accent2); }

.req-ignore {
    background: #fce4ec;
    color: #c62828;
}

.req-ignore:hover { background: #f8bbd0; }

/* ===== REQUEST BANNER ===== */
.request-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff8fb;
    border: 1px solid #fce4ec;
    border-radius: 12px;
    margin: 8px 12px;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
}

.request-banner p { margin: 0; }

.request-banner-btns {
    display: flex;
    gap: 8px;
}

.btn-accept-banner {
    padding: 7px 18px;
    background: #e91e8c;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-accept-banner:hover { background: #c2185b; }

.btn-ignore-banner {
    padding: 7px 18px;
    background: #f5f5f5;
    color: #888;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-ignore-banner:hover { background: #ebebeb; }

/* ===== TOAST ===== */
.chat-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2c3e50;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

.chat-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== ЖАЛОБА НА СООБЩЕНИЕ ===== */
.report-reason-btn {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #f0e8e8;
    border-radius: 12px;
    background: white;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}
.report-reason-btn:hover {
    background: #fff0f4;
    border-color: #ffb3c1;
}
.report-reason-btn:active {
    background: #ffe0ea;
}

/* ===== ТЁМНАЯ ТЕМА — НОВАЯ ЛЕНТА ===== */
body.dark #feed.section {
    background: transparent;
    border: none;
    box-shadow: none;
}
body.dark .feed-search-bar,
body.dark .stories-wrap,
body.dark .create-post,
body.dark .feed-tabs,
body.dark .post-card,
body.dark .sidebar-card {
    background: var(--dk-surface);
    border: 1px solid var(--dk-border);
    box-shadow: none;
}
body.dark .feed-search-bar input { color: var(--dk-text); }
body.dark .feed-search-bar input::placeholder { color: var(--dk-text3); }
body.dark .story-label { color: var(--dk-text2); }
body.dark .create-textarea {
    background: var(--dk-surface3);
    color: var(--dk-text);
    border-color: var(--dk-border2);
}
body.dark .create-textarea::placeholder { color: var(--dk-text3); }
body.dark .create-action-btn { color: var(--dk-accent2); border-color: var(--dk-border2); }
body.dark .create-action-btn:hover { background: var(--dk-surface3); border-color: var(--dk-accent); }
body.dark .feed-tab { color: var(--dk-text3); }
body.dark .feed-tab:hover:not(.active) { color: var(--dk-accent2); background: var(--dk-surface3); }
body.dark .post-name { color: var(--dk-text); }
body.dark .post-date { color: var(--dk-text3); }
body.dark .post-text { color: var(--dk-text); }
body.dark .post-more { color: var(--dk-text3); }
body.dark .post-more:hover { background: var(--dk-surface3); color: var(--dk-accent2); }
body.dark .post-divider { background: var(--dk-border); }
body.dark .post-action { color: var(--dk-text3); }
body.dark .post-action:hover { background: var(--dk-surface3); color: var(--dk-accent2); }
body.dark .post-action-share { color: var(--dk-text3); }
body.dark .post-action-share:hover { background: var(--dk-surface3); color: var(--dk-accent2); }
body.dark .post-report { color: var(--dk-border2); }
body.dark .sidebar-title { color: var(--dk-text); }
body.dark .suggest-name { color: var(--dk-text); }
body.dark .suggest-sub { color: var(--dk-text3); }
body.dark .trend-item { border-color: var(--dk-border); }
body.dark .trend-count { color: var(--dk-text3); }
body.dark .post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.4); transform: translateY(-2px); }

/* ===== МОБИЛЬНЫЕ ПАНЕЛИ УВЕДОМЛЕНИЙ И НАСТРОЕК ===== */
@media (max-width: 768px) {
    #notifPanel.mobile-open {
        position: fixed !important;
        top: 58px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-width: none !important;
        max-height: 75vh !important;
        border-radius: 16px !important;
        z-index: 99999 !important;
        display: flex !important;
    }
    #settingsPanel.mobile-open {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 280px !important;
        max-width: 85vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border-top-left-radius: 20px !important;
        border-bottom-left-radius: 20px !important;
        z-index: 99999 !important;
        display: block !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        animation: slideInRight 0.25s ease !important;
    }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ===== SKELETON LOADERS ===== */
@keyframes skeletonShimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: skeletonShimmer 1.4s infinite;
    border-radius: 8px;
}
body.dark .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 800px 100%;
}
.skeleton-post { background: white; border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
body.dark .skeleton-post { background: var(--dk-surface); }
.skeleton-post .sk-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.skeleton-post .sk-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skeleton-post .sk-name { height: 13px; width: 120px; margin-bottom: 6px; }
.skeleton-post .sk-date { height: 11px; width: 80px; }
.skeleton-post .sk-text { height: 13px; margin-bottom: 8px; }
.skeleton-post .sk-text.w80 { width: 80%; }
.skeleton-post .sk-text.w60 { width: 60%; }
.skeleton-post .sk-actions { display: flex; gap: 16px; margin-top: 12px; }
.skeleton-post .sk-btn { height: 24px; width: 50px; border-radius: 12px; }
.skeleton-chat { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.skeleton-chat .sk-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; }
.skeleton-chat .sk-info { flex: 1; }
.skeleton-chat .sk-name { height: 13px; width: 100px; margin-bottom: 8px; }
.skeleton-chat .sk-preview { height: 11px; width: 150px; }

/* ===== EMOJI & STICKER PANELS ===== */
.emoji-panel, .sticker-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #f0f0f0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-btn {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background 0.15s;
    line-height: 1;
}
.emoji-btn:hover { background: #f5f5f5; }

.sticker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.sticker-btn {
    font-size: 48px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.15s, transform 0.1s;
    line-height: 1;
    text-align: center;
}
.sticker-btn:hover { background: #f5f5f5; transform: scale(1.1); }

.sticker-pack-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}
.sticker-pack-tab {
    padding: 4px 12px;
    border-radius: 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #888;
    font-family: inherit;
}
.sticker-pack-tab.active {
    background: #fff0f3;
    color: #ff3366;
    font-weight: 600;
}

/* Sticker message in chat */
.msg-sticker {
    font-size: 72px;
    line-height: 1;
    background: none !important;
    box-shadow: none !important;
    padding: 4px 0 !important;
    display: block;
}
/* ===== Кружок для переключателя "Показывать дистанцию" ===== */
#geoVisibleSlider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform .3s;
}
#editGeoVisible:checked + #geoVisibleSlider::before {
    transform: translateX(18px);
}

/* ===== FIX: AUTH ===== */

/* фон на весь экран, включая iOS */
#authBackground { inset: 0; height: 100vh; height: 100dvh; }
body.no-auth { background: linear-gradient(135deg, #EE9CA7 0%, #FFDDE1 100%); }

/* оверлей скроллится, карточка центрируется, но не обрезается */
.auth-modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100vh; height: 100dvh;
}
.auth-modal { margin: auto; }

/* на экране входа оверлей не перехватывает клики (куки-баннер снова нажимается),
   а снизу оставляем место под баннер */
body.no-auth .auth-modal-overlay { pointer-events: none; padding-bottom: 130px; }
body.no-auth .auth-modal { pointer-events: auto; }

/* аккуратная вращающаяся обводка без артефактов */
@property --glow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes glowSpin { to { --glow-angle: 360deg; } }
.auth-modal::before {
    inset: 0; width: auto; height: auto; top: 0; left: 0;
    background-image: conic-gradient(from var(--glow-angle),
        rgba(255,51,102,0.15) 0%, #ff3366 15%, #ff6685 30%, rgba(255,51,102,0.15) 50%, rgba(255,51,102,0.15) 100%);
    animation: glowSpin 4s linear infinite;
}

/* разделитель «или войдите через» */
.auth-divider { display: flex; align-items: center; gap: 12px; }
.auth-divider::before, .auth-divider::after {
    content: ''; position: static; flex: 1; width: auto; height: 1px; background: #e9ecef;
}

/* дата на iOS */
.auth-field input[type="date"] {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100%; min-width: 0; max-width: 100%;
    min-height: 50px; text-align: left;
}
.auth-field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.auth-field { min-width: 0; }
.auth-row > * { min-width: 0; }

/* чекбоксы согласий */
.auth-field .auth-checkbox-label {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; font-weight: 400; margin-bottom: 0;
}

/* «Забыли пароль?» */
.auth-forgot { font-size: 13px; color: #ff3366; font-weight: 500; cursor: pointer; }
.auth-forgot:hover { text-decoration: underline; }

/* на телефоне: место под куки-баннер и без зума iOS при фокусе */
@media (max-width: 768px) {
    body.no-auth .auth-modal-overlay { padding-bottom: 200px; }
    .auth-field input, .auth-field select { font-size: 16px; }
}

