﻿:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #1e1e32;
    
    --accent-green: #00ff88;
    --accent-blue: #00d4ff;
    --accent-purple: #7b2dff;
    --accent-pink: #ff2d7b;
    
    --text-primary: #ffffff;
    --text-secondary: #8b8b9e;
    --text-muted: #4a4a5e;
    
    --border-color: #2a2a3e;
    
    --nav-height: 70px;
    --top-bar-height: 56px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

body {
    display: flex;
    flex-direction: column;
    /*  Разрешаем только вертикальный скролл внутри контейнеров */
    overflow: hidden;
    height: 100vh;
}

html {
    overflow: hidden;
    height: 100vh;
}

/*  Разрешаем скролл только внутри конкретных блоков */
.content, .page.active, #page-chat, #page-feed, .modal-content, .chat-messages, .tg-chat-body, .feed-cards {
    touch-action: pan-y;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== Loading Screen ===== */
#loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.loader-ring {
    width: 80px;
    height: 80px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 20px;
    font-size: 15px;
    font-weight: 500;
    font-family: 'Onest', sans-serif;
    letter-spacing: 0.5px;
    color: var(--accent-green);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
    text-align: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== App Container ===== */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

/* ===== Top Bar ===== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    height: var(--top-bar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon {
    width: 26px;
    height: 26px;
    color: var(--accent-green);
    filter: drop-shadow(0 0 6px var(--accent-green));
}

.logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--accent-green);
    text-shadow: 0 0 8px var(--accent-green);
}

.search-bar {
    flex: 1;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 7px 14px 7px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.2);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
}

.settings-btn, .info-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.settings-btn:hover { color: var(--accent-green); }
.info-btn:hover { color: var(--accent-blue); }
.settings-btn svg, .info-btn svg { width: 22px; height: 22px; }

/* ===== Content Area ===== */
.content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.page {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.page.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Map Container ===== */
.map-container {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 300px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
}

#yandex-map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Мягкая карта — снижаем контраст */
.yandex-map .maplibregl-canvas {
    filter: brightness(0.85) saturate(0.7) contrast(0.9);
}

/* Анимация пульсации маркера пользователя */
@keyframes pulseUserMarker {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* MapLibre — стилизация popup */
.tutzhe-popup .maplibregl-popup-content {
    padding: 12px 16px !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
}

.tutzhe-popup .maplibregl-popup-close-button {
    font-size: 20px !important;
    padding: 6px !important;
    color: #888 !important;
}

.tutzhe-popup .maplibregl-popup-close-button:hover {
    color: #fff !important;
}

.light-theme .tutzhe-popup .maplibregl-popup-close-button:hover {
    color: #333 !important;
}

/* Скрываем attribution */
.maplibregl-ctrl-attrib {
    display: none !important;
}

/* MapLibre контролы навигации — тёмная тема */
.maplibregl-ctrl-group {
    background: rgba(20, 20, 35, 0.92) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.maplibregl-ctrl-group button {
    background: transparent !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.2s ease !important;
}

.maplibregl-ctrl-group button:last-child {
    border-bottom: none !important;
}

.maplibregl-ctrl-group button:hover {
    background: rgba(0, 255, 136, 0.1) !important;
    color: #00ff88 !important;
}

.maplibregl-ctrl-group button:active {
    background: rgba(0, 255, 136, 0.2) !important;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
    filter: none !important;
}

/* Светлая тема — контролы */
.light-theme .maplibregl-ctrl-group {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.light-theme .maplibregl-ctrl-group button {
    color: #333 !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

.light-theme .maplibregl-ctrl-group button:hover {
    background: rgba(0, 255, 136, 0.08) !important;
    color: #00cc66 !important;
}

/* ===== Map Actions — выравнивание кнопок ===== */
.map-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding: 0 16px;
}

/* ===== Кнопка удаления метки — в стиле кнопки обновления но красная ===== */
.delete-mark-btn {
    appearance: none;
    border: none;
    outline: none;
    background: rgba(255, 45, 123, 0.08);
    cursor: pointer;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Glass effect */
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    /* Borders with red tint */
    border: 1px solid rgba(255, 45, 123, 0.3);
    border-top: 1px solid rgba(255, 45, 123, 0.5);

    /* Shadows with red glow */
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(255, 45, 123, 0.08),
        inset 0 1px 0 rgba(255, 45, 123, 0.2);

    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1), background 0.3s;
    color: #ff2d7b;
}

.delete-mark-btn svg {
    width: 22px;
    height: 22px;
    color: #ff2d7b;
    transition: all var(--transition-fast);
}

.delete-mark-btn:hover {
    background: rgba(255, 45, 123, 0.15);
    border-color: rgba(255, 45, 123, 0.5);
    transform: scale(1.05);
}

.delete-mark-btn:hover svg {
    color: #ff5a9b;
    filter: drop-shadow(0 0 6px rgba(255, 45, 123, 0.5));
}

.delete-mark-btn:active {
    transform: scale(0.95);
}

/* ===== Current Location Badge ===== */
.current-location {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px 10px;
    z-index: 5;
    min-width: 140px;
    max-width: 170px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-fast);
}

.light-theme .current-location {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.location-icon {
    font-size: 10px;
    margin-bottom: 2px;
}

.location-text {
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.light-theme .location-text {
    color: #1a1a1a;
}

.location-coords {
    display: none; /* Скрываем — пользователю не нужны */
}

.location-updated {
    font-size: 8px;
    color: #00ff88;
    margin-top: 1px;
}

/* ===== Селектор радиуса ===== */
.radius-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.radius-selector select {
    appearance: none;
    background: rgba(20, 20, 35, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #ffffff;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    padding: 6px 28px 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300ff88' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.radius-selector select:hover {
    border-color: rgba(0, 255, 136, 0.6);
    background-color: rgba(25, 25, 45, 0.95);
}

.radius-selector select:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.radius-selector select option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 8px;
}

.light-theme .radius-selector select {
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.15);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.light-theme .radius-selector select:hover {
    border-color: rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.98);
}

.light-theme .radius-selector select option {
    background: #ffffff;
    color: #1a1a1a;
}

/* ===== "Я ТУТ" Button — Glassmorphism + Neon Green ===== */
.im-here-btn {
    position: relative;
    margin: 0;
    appearance: none;
    border: none;
    outline: none;
    /* Лёгкий зелёный тинт */
    background: rgba(0, 255, 136, 0.08);
    cursor: pointer;

    padding: 14px 32px;
    min-width: 0;
    flex: 1;
    max-width: 300px;
    border-radius: 70px;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: inherit;
    color: rgba(0, 255, 136, 0.95);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);

    /* Glass effect */
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    /* Glass edge с зелёным тинтом */
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-top: 1px solid rgba(0, 255, 136, 0.5);
    border-bottom: 1px solid rgba(0, 150, 80, 0.2);

    /* Shadows с зелёным свечением */
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 12px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(0, 255, 136, 0.1),
        inset 0 1px 0 rgba(0, 255, 136, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);

    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glossy shimmer — зелёный */
.im-here-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(95deg, transparent, rgba(0, 255, 136, 0.2), transparent);
    transform: skewX(-25deg);
    transition: left 0.65s ease;
    pointer-events: none;
    z-index: 1;
}

.im-here-btn:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 22px 40px rgba(0, 0, 0, 0.28),
        0 8px 18px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(0, 255, 136, 0.2),
        inset 0 1px 2px rgba(0, 255, 136, 0.3);
    color: #00ff88;
    text-shadow: 0 0 16px rgba(0, 255, 136, 0.6);
    letter-spacing: 3.5px;
    backdrop-filter: blur(16px) saturate(200%);
}

.im-here-btn:hover::before {
    left: 120%;
}

.im-here-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(0, 255, 136, 0.2);
    transition: 0.08s linear;
    backdrop-filter: blur(12px);
}

/* Ripple on click — зелёный */
.im-here-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.4) 0%, rgba(0, 255, 136, 0) 80%);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, opacity 0.4s;
    opacity: 0;
    pointer-events: none;
}

.im-here-btn:active::after {
    width: 200px;
    height: 200px;
    opacity: 0.5;
    transition: 0s;
}

/* Active state — усиленное зелёное свечение */
.im-here-btn.active {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow:
        0 0 40px rgba(0, 255, 136, 0.3),
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 255, 136, 0.35);
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.7);
}

.im-here-btn.cooldown {
    background: rgba(26, 26, 46, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 0.4;
    color: var(--text-muted);
    text-shadow: none;
}

.cooldown-timer {
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ===== Glass Refresh Button — Neon Green ===== */
.glass-refresh-btn {
    appearance: none;
    border: none;
    outline: none;
    background: rgba(0, 255, 136, 0.08);
    cursor: pointer;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* Glass effect */
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);

    /* Borders with green tint */
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-top: 1px solid rgba(0, 255, 136, 0.5);

    /* Shadows with green glow */
    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(0, 255, 136, 0.08),
        inset 0 1px 0 rgba(0, 255, 136, 0.2);

    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1), background 0.3s;
}

.glass-refresh-btn .icon-wrapper {
    display: inline-block;
    width: 22px;
    height: 22px;
    user-select: none;
    will-change: transform;
    color: #00ff88;
}

.glass-refresh-btn .icon-wrapper svg {
    width: 100%;
    height: 100%;
}

/* Spin animation only on the icon */
.glass-refresh-btn:hover .icon-wrapper {
    color: #00ffaa;
    filter: drop-shadow(0 0 6px rgba(0, 255, 136, 0.5));
}

.glass-refresh-btn.is-refreshing .icon-wrapper {
    animation: spinIcon 0.6s cubic-bezier(0.25, 0.1, 0.2, 1);
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shimmer on glass */
.glass-refresh-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.15), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s;
    pointer-events: none;
}

.glass-refresh-btn:hover::before {
    left: 150%;
}

.glass-refresh-btn:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(0, 255, 136, 0.15),
        inset 0 1px 0 rgba(0, 255, 136, 0.3);
    transform: translateY(-2px) scale(1.04);
}

.glass-refresh-btn:active {
    transform: scale(0.9);
    box-shadow:
        0 5px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(0, 255, 136, 0.15);
    transition: 0.08s linear;
}

.pulse-ring {
    position: absolute;
    inset: -3px;
    border: 2px solid #00ff88;
    border-radius: 70px;
    animation: pulseRing 2s ease-out infinite;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

.im-here-btn.active .pulse-ring { opacity: 1; }

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ===== Nearby List — Glassmorphism Cards ===== */
.nearby-list {
    width: 100%;
    padding: 14px;
    padding-bottom: 20px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nearby-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 2px;
}

.nearby-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    /* Glassmorphism effect */
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nearby-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
}

.nearby-item:hover {
    background: rgba(26, 26, 46, 0.85);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 15px rgba(0, 255, 136, 0.08);
}

.nearby-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.nearby-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), #00cc70);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.2);
}

.nearby-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Онлайн-индикатор на аватарке */
.nearby-avatar .online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    background: #00ff88;
    border: 2px solid var(--bg-card);
    border-radius: 50%;
}

.nearby-info {
    flex: 1;
    min-width: 0;
}

.nearby-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mood/status tag рядом с ником */
.nearby-mood {
    font-size: 11px;
    color: var(--accent-blue);
    font-weight: 500;
    opacity: 0.8;
}

.nearby-status {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.nearby-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.nearby-distance {
    font-size: 11px;
    color: var(--accent-green);
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.nearby-interests {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.nearby-interest-tag {
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    color: var(--accent-green);
}

/* ===== Private chats list ===== */
.private-chats-list { flex: 1; overflow-y: auto; padding: 14px; }
.private-chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}
.private-chat-item:hover { background: var(--bg-card-hover); border-color: var(--accent-blue); }
.private-chat-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}
.private-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: linear-gradient(135deg, #00d4ff, #0088ff);
    flex-shrink: 0;
    overflow: hidden;
}
.private-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.private-chat-info { flex: 1; min-width: 0; }
.private-chat-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.private-chat-last-msg { font-size: 12px; color: var(--text-secondary); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.private-chat-meta { text-align: right; flex-shrink: 0; }
.private-chat-time { font-size: 11px; color: var(--text-muted); }
.private-chat-unread {
    background: #ff2d7b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    margin-left: auto;
}

/* ===== Feed Page ===== */
#page-feed { padding: 18px 16px; }
#page-radar { padding-bottom: 0; }
#page-chat { padding-bottom: 0; }

.page-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 16px;
}

.feed-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
}

.feed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    transition: all var(--transition-fast);
    animation: slideUp 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.feed-card:nth-child(1) { animation-delay: 0.1s; }
.feed-card:nth-child(2) { animation-delay: 0.2s; }
.feed-card:nth-child(3) { animation-delay: 0.3s; }
.feed-card:nth-child(4) { animation-delay: 0.4s; }
.feed-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

.feed-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.1);
}

.feed-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}
.feed-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.feed-user-info { flex: 1; }
.feed-username { font-size: 14px; font-weight: 700; }

.feed-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
}

.feed-tag { color: var(--accent-blue); }

.feed-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feed-actions {
    display: flex;
    gap: 8px;
}

.feed-btn {
    flex: 1;
    padding: 9px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.feed-btn.primary {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
}

.feed-btn.secondary {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.feed-btn:active { transform: scale(0.95); }

/* ===== Chat Page ===== */
#page-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
}

.chat-online {
    font-size: 12px;
    color: var(--accent-green);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
}

.chat-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.2s ease;
    align-items: flex-end;
    max-width: 100%;
    padding: 2px 0;
}

/* Группировка сообщений от одного пользователя — Telegram стиль */
.chat-message[data-group="cont"] {
    padding-top: 0;
    margin-top: -2px;
}

.chat-message[data-group="cont"] .chat-msg-avatar-spacer {
    width: 36px;
    flex-shrink: 0;
    visibility: hidden;
}

/* Спейсер вместо аватарки для consecutive сообщений */
.chat-msg-avatar-spacer {
    width: 36px;
    flex-shrink: 0;
}

/* Свои сообщения — справа */
.chat-message.mine {
    flex-direction: row-reverse;
    align-items: flex-end;
    margin-left: auto;
    justify-content: flex-end;
}

.chat-message.mine .chat-msg-avatar {
    display: none;
}

.chat-message.mine .chat-msg-content {
    align-items: flex-end;
    max-width: 78%;
    margin-left: auto;
}

.chat-message.mine .chat-msg-header {
    display: none;
}

.chat-message.mine .chat-msg-text {
    /* Telegram-style bubble — свои */
    background: #2b5278;
    color: #ffffff;
    border-radius: 16px 4px 16px 16px;
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 7px 12px 5px;
    font-size: 14.5px;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.chat-message.mine .chat-msg-text .mine-time {
    font-size: 11px;
    opacity: 0.6;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 0;
}

/* Чужие сообщения — слева */
.chat-message:not(.mine) .chat-msg-content {
    align-items: flex-start;
    max-width: 78%;
    margin-right: auto;
}

.chat-message:not(.mine) .chat-msg-text {
    /* Telegram-style bubble — чужие */
    background: #2b2b3d;
    color: #e8e8e8;
    border-radius: 4px 16px 16px 16px;
    padding: 7px 12px 5px;
    font-size: 14.5px;
    line-height: 1.35;
    width: fit-content;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Скрываем ник/время для consecutive сообщений */
.chat-message:not(.mine) .chat-msg-header {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 2px;
    padding-left: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Аватарка — круглая как в Telegram */
.chat-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chat-msg-avatar:hover {
    transform: scale(1.08);
}

.chat-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-msg-content {
    flex: 1;
    min-width: 0;
    max-width: 78%;
}

.chat-msg-header {
    display: flex;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 2px;
    padding-left: 4px;
}

.chat-msg-name {
    font-size: 13px;
    font-weight: 600;
    color: #6ab7ff; /* Telegram-style blue */
    cursor: pointer;
}

.chat-msg-name:hover {
    text-decoration: underline;
}

.chat-msg-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

/* Убираем старый стиль .chat-msg-text — теперь стили задаются через .chat-message:not(.mine) .chat-msg-text */
.chat-msg-text {
    /* Стили переопределяются выше */
}

.chat-anon-toggle {
    text-align: center;
    padding: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}
.chat-anon-toggle:hover { background: var(--bg-card-hover); }
.chat-anon-toggle.active {
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
}
.chat-anon-toggle span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}
.chat-anon-toggle.active span {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.15);
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

#chat-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

#chat-input:focus { border-color: var(--accent-green); }

.chat-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    border: none;
    border-radius: 50%;
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.chat-send-btn:active { transform: scale(0.9); }
.chat-send-btn svg { width: 18px; height: 18px; }

/* ===== Profile Page ===== */
#page-profile { padding: 14px; }

.profile-header {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    background: var(--bg-card);
    border-radius: 18px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.3);
    overflow: hidden;
    position: relative;
}
.profile-avatar img,
#profile-avatar-icon img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}
#profile-avatar-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-info { flex: 1; }
#profile-name { font-size: 16px; font-weight: 900; margin-bottom: 6px; }

.profile-level {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.level-badge {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 900;
    border-radius: 10px;
    width: fit-content;
}

.level-progress {
    height: 4px;
    background: var(--bg-card-hover);
    border-radius: 2px;
    overflow: hidden;
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.level-text {
    font-size: 11px;
    color: var(--text-muted);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-green);
    text-shadow: none;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.interest-tag {
    padding: 5px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Ачивки — убираем неон с заблокированных ===== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.achievement {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 6px;
    text-align: center;
    transition: all var(--transition-fast);
}

/* Разблокированные — с неоном */
.achievement.unlocked {
    border-color: var(--accent-green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.15);
}

/* Заблокированные — бледные, без неона */
.achievement.locked {
    opacity: 0.35;
    border-color: transparent;
    box-shadow: none;
    filter: grayscale(0.8);
}

.achievement-icon { font-size: 24px; margin-bottom: 6px; }
.achievement-name { font-size: 9px; color: var(--text-secondary); line-height: 1.3; }

/* ===== Bottom Navigation — Improved ===== */
.bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--nav-height);
    /* Glassmorphism background */
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 10px;
    transition: all var(--transition-fast);
    min-width: 56px;
    position: relative;
    border-radius: 12px;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    transition: all var(--transition-fast);
    /* По умолчанию — контурные иконки */
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* Активная вкладка — залитая иконка + неоновый цвет */
.nav-btn.active {
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.06);
}

.nav-btn.active svg {
    fill: var(--accent-green);
    stroke: var(--accent-green);
    stroke-width: 1.5;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.4));
}

/* Hover эффект */
.nav-btn:not(.active):hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

/* Убираем гигантскую центральную кнопку — теперь все равные */
.nav-btn-center { margin-top: 0; }
.nav-center-btn { display: none; }


/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 20px;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 28px 22px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content { transform: scale(1); }

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 26px;
    cursor: pointer;
}

/* Modal backdrop */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.active {
    display: flex;
    opacity: 1;
}
#write-modal.active {
    align-items: flex-end;
    justify-content: stretch;
}

.modal-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 0 24px rgba(0, 255, 136, 0.3);
}

.modal-content h3 { font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.modal-distance { color: var(--accent-green); font-size: 13px; margin-bottom: 6px; }
.modal-status { color: var(--text-secondary); font-size: 13px; margin-bottom: 20px; font-style: italic; }

.modal-actions { display: flex; gap: 10px; }

.modal-btn {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
}

.modal-btn.secondary {
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-btn:active { transform: scale(0.95); }

/* ===== Settings Modal ===== */
.settings-section {
    text-align: left;
    margin-top: 20px;
}

.settings-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-switcher {
    display: flex;
    gap: 10px;
}

.theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.theme-btn:hover {
    border-color: var(--accent-green);
}

.theme-btn.active {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.2);
}

.theme-icon {
    font-size: 28px;
}

.theme-name {
    font-size: 12px;
    font-weight: 700;
}

/* Кнопка сброса данных */
.reset-data-btn {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    color: #ff4444;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
}
.reset-data-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.5);
}
.reset-data-btn:active {
    transform: scale(0.98);
}

.settings-hint {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

/* Кастомная аватарка */
.custom-avatar-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 12px 0;
    position: relative;
}
.custom-avatar-divider::before,
.custom-avatar-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border-color);
}
.custom-avatar-divider::before { left: 0; }
.custom-avatar-divider::after { right: 0; }

.custom-avatar-upload {
    text-align: center;
}
.custom-avatar-upload input[type="file"] {
    display: none;
}
.custom-avatar-btn {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
}
.custom-avatar-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.05);
}

.custom-avatar-preview {
    margin-top: 12px;
    position: relative;
    display: inline-block;
}
.custom-avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-green);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}
.custom-avatar-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #ff4444;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.custom-avatar-remove:hover {
    transform: scale(1.15);
}

/* ===== Модалка просмотра профиля (новая) ===== */
.view-profile-modal {
    padding: 0;
}

.view-profile-header-new {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 20px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid var(--border-color);
}

.view-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    position: relative;
}
.view-avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.view-header-info {
    flex: 1;
    min-width: 0;
}
.view-header-info h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-level-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
    font-size: 11px;
    font-weight: 800;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* XP Bar */
.view-xp-bar {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}
.view-xp-progress {
    height: 6px;
    background: var(--bg-card-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.view-xp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 3px;
    transition: width 0.5s ease;
}
.view-xp-text {
    font-size: 11px;
    color: var(--text-muted);
}

/* Статистика */
.view-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 20px;
}
.view-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
}
.view-stat-icon {
    font-size: 20px;
    margin-bottom: 6px;
}
.view-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-green);
}
.view-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Био */
.view-bio-section {
    padding: 0 20px 12px;
}
.view-bio-text {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Интересы */
.view-interests-section {
    padding: 0 20px 12px;
}
.view-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.view-interest-tag {
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Ачивки */
.view-achievements-section {
    padding: 0 20px 16px;
}
.view-achievements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.view-achievements-grid .achievement {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 4px;
    text-align: center;
}
.view-achievements-grid .achievement.locked {
    opacity: 0.35;
    filter: grayscale(1);
}
.view-achievements-grid .achievement-icon {
    font-size: 22px;
    margin-bottom: 4px;
}
.view-achievements-grid .achievement-name {
    font-size: 9px;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Кнопки действий */
.view-actions {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-wrap: wrap;
}
.view-action-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 8px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Onest', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.view-action-btn.primary {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
}
.view-action-btn.primary:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}
.view-action-btn.secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.view-action-btn:active {
    transform: scale(0.97);
}

/* Danger кнопка (заглушить/разблокировать) */
.view-action-btn.danger {
    background: rgba(255, 45, 123, 0.15);
    color: #ff2d7b;
    border: 1px solid rgba(255, 45, 123, 0.3);
}
.view-action-btn.danger:hover {
    background: rgba(255, 45, 123, 0.25);
    border-color: rgba(255, 45, 123, 0.6);
}

/* Кнопки на всю ширину */
.view-actions-fullwidth {
    padding: 0 !important;
    margin: 12px -16px -16px -16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.view-actions-fullwidth .view-action-btn {
    border-radius: 0 !important;
    width: 100%;
    padding: 14px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-actions-fullwidth .view-action-btn:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.view-actions-fullwidth .view-action-btn:last-child {
    border-radius: 0 0 12px 12px !important;
}

.view-actions-fullwidth .view-action-btn:only-child {
    border-radius: 12px !important;
}

.view-actions-fullwidth .view-action-btn:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* Кнопка "Написать" — крупная, сочная */
.view-actions-fullwidth .view-action-btn.primary {
    font-size: 16px !important;
    padding: 16px 20px !important;
    letter-spacing: 0.5px;
}

/* ===== User Modal - raise z-index above location badge ===== */
#user-modal {
    z-index: 20;
}

#view-profile-modal {
    z-index: 1100; /* Выше чата (tg-chat-modal z-index: 1002) */
}

#create-profile-modal {
    z-index: 1100;
}

#settings-modal {
    z-index: 1100;
}

/* ===== Profile Form Modal ===== */
.profile-modal h2 {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 6px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.profile-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(20, 20, 35, 0.6);
    border: none;
    border-bottom: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.15);
}

.form-group textarea:focus {
    border-bottom-color: var(--accent-green);
    box-shadow: 0 1px 0 rgba(0, 255, 136, 0.2);
}

/* ===== Модалка «Я ТУТ» — стекломорфизм ===== */
#event-modal .modal-content {
    background: rgba(28, 28, 45, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
}

/* Анимация схлопывания модалки */
#event-modal .modal-content.modal-publishing {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
    transition: all 0.25s ease-out;
}

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(5, 44px);
    justify-content: center;
    gap: 10px;
}

.avatar-option {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.avatar-option:hover {
    border-color: var(--accent-green);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--accent-green);
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.4), 0 0 4px rgba(0, 255, 136, 0.6);
    transform: scale(1.08);
}

/* ===== Чипсы времени ===== */
.duration-chips {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.time-chip {
    padding: 8px 18px;
    background: rgba(30, 30, 50, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.time-chip:hover {
    border-color: var(--accent-green);
    color: var(--text-primary);
}

.time-chip.active {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.time-chip:active {
    transform: scale(0.95);
}

.interests-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.interest-option {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.interest-option:hover {
    border-color: var(--accent-blue);
}

.interest-option.selected {
    border-color: var(--accent-blue);
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-blue);
}

/* ===== Кнопка "Опубликовать" — стиль как у "Я ТУТ" ===== */
.form-submit-btn {
    width: 100%;
    padding: 14px 32px;
    margin-top: 8px;
    appearance: none;
    border: none;
    outline: none;
    background: rgba(0, 255, 136, 0.08);
    cursor: pointer;
    border-radius: 70px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: inherit;
    color: rgba(0, 255, 136, 0.95);
    text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-top: 1px solid rgba(0, 255, 136, 0.5);
    border-bottom: 1px solid rgba(0, 150, 80, 0.2);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 12px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(0, 255, 136, 0.1),
        inset 0 1px 0 rgba(0, 255, 136, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-submit-btn:hover {
    background: rgba(0, 255, 136, 0.12);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 12px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(0, 255, 136, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.form-submit-btn:active {
    transform: scale(0.97);
}

.form-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== View Profile Modal ===== */
.view-profile-header {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
    text-align: left;
}

.view-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.3);
    flex-shrink: 0;
}

.view-profile-info { flex: 1; }
.view-profile-info h3 { font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.view-bio { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.view-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.view-stat {
    background: var(--bg-input);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
}

.view-stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--accent-green);
}

.view-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.view-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 16px;
    justify-content: center;
}

/* ===== Telegram-style Chat Modal ===== */
.tg-chat-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 85vh;
    background: #1a1a2e;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 1002;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Header - Flex layout с разделением */
.tg-chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #1e1e36;
    border-bottom: 1px solid #2a2a3e;
    flex-shrink: 0;
    min-height: 56px;
}

/* Кнопка закрытия — СПРАВА, в самом углу */
.tg-close-btn-right {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #aaa;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 8px;
    transition: all 0.2s;
}
.tg-close-btn-right:hover {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

/* Старый класс — для совместимости */
.tg-close-btn-left {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #aaa;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: static !important;
    top: auto !important;
    right: auto !important;
}
.tg-close-btn-left:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.tg-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.tg-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, #00d4ff, #7b2dff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    overflow: hidden;
}
.tg-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.tg-chat-avatar:hover {
    transform: scale(1.1);
}

/* Кнопка меню чата (три точки) — СПРАВА */
.tg-chat-menu-wrapper {
    position: relative;
    flex-shrink: 0;
    margin-left: auto; /* Прижимает вправо */
}
.tg-chat-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    border: none;
    background: transparent;
    color: #8b8b9e;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}
.tg-chat-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Выпадающее меню — z-index выше модалки */
.tg-chat-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary, #1e1e36);
    border: 1px solid var(--border-color, #2a2a3e);
    border-radius: 12px;
    padding: 6px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}
.tg-chat-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.tg-chat-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-primary, #fff);
    font-size: 14px;
}
.tg-chat-menu-item:hover {
    background: rgba(128, 128, 128, 0.15);
}
.tg-chat-menu-item.danger {
    color: #ff4444;
}
.tg-chat-menu-item.danger:hover {
    background: rgba(255, 68, 68, 0.15);
}
.tg-menu-icon {
    font-size: 16px;
}

/* Убираем старую кнопку удаления */
.tg-delete-chat-btn {
    display: none;
}
.tg-chat-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tg-chat-status {
    font-size: 12px;
    color: #8b8b9e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Body - сообщения */
.tg-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(180deg, #141428 0%, #1a1a2e 100%);
}
.tg-chat-body::-webkit-scrollbar { width: 4px; }
.tg-chat-body::-webkit-scrollbar-thumb { background: #2a2a3e; border-radius: 2px; }

/* Пузыри сообщений */
.tg-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 16px;
    position: relative;
    animation: msgIn 0.2s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.tg-msg.mine {
    align-self: flex-end;
    background: #0088cc;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.tg-msg.theirs {
    align-self: flex-start;
    background: #2a2a3e;
    color: #fff;
    border-bottom-left-radius: 4px;
}
.tg-msg-text {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}
.tg-msg-time {
    font-size: 10px;
    opacity: 0.6;
    text-align: right;
    margin-top: 2px;
}
.tg-msg.theirs .tg-msg-sender {
    font-size: 12px;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tg-msg.theirs .tg-msg-sender img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* Input area */
.tg-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #1e1e36;
    border-top: 1px solid #2a2a3e;
    align-items: flex-end;
    flex-shrink: 0;
}
.tg-chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    background: #2a2a3e;
    border: 1px solid transparent;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.tg-chat-input-area input:focus { border-color: #00d4ff; }
.tg-chat-input-area input::placeholder { color: #666; }

.tg-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 21px;
    border: none;
    background: #0088cc;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.tg-send-btn:hover { background: #0099e6; transform: scale(1.05); }
.tg-send-btn:active { transform: scale(0.95); }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }

/* ===== Дейлики (Daily Quests) ===== */
.daily-quests-section, .leaderboard-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Секция друзей — кнопка */
.friends-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: block;
    background: var(--bg-card);
    border: 2px solid var(--accent-blue);
    border-radius: 14px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}
.friends-section::after {
    content: '→';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-blue);
    transition: transform var(--transition-fast);
}
.friends-section:active {
    transform: scale(0.98);
    background: rgba(0, 212, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}
.friends-section:active::after {
    transform: translateY(-50%) translateX(3px);
}
.friends-section .section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 6px;
}
.friends-section #friends-count-display {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.daily-quests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.daily-quest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    transition: all var(--transition-fast);
}

.daily-quest-card.claimed {
    opacity: 0.6;
    border-color: var(--accent-green);
}

.quest-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.quest-icon { font-size: 20px; }
.quest-name { font-size: 14px; font-weight: 600; flex: 1; }

.quest-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.complete-badge {
    background: var(--accent-green);
    color: var(--bg-primary);
}

.claimed-badge {
    background: var(--border-color);
    color: var(--text-muted);
}

.quest-progress-bar {
    height: 6px;
    background: var(--bg-card-hover);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-blue));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.quest-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quest-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
}

.quest-reward {
    font-size: 12px;
    color: var(--accent-green);
    font-weight: 700;
    margin-left: auto;
}

.quest-claim-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quest-claim-btn:active { transform: scale(0.95); }

/* ===== Таблица лидеров ===== */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.leaderboard-item:active { transform: scale(0.98); }
.leaderboard-item.mine { border-color: var(--accent-green); background: rgba(0, 255, 136, 0.05); }

.lb-rank { font-size: 16px; min-width: 30px; text-align: center; }
.lb-avatar-emoji { font-size: 24px; }
.lb-avatar-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.lb-name { flex: 1; font-size: 14px; font-weight: 600; }
.lb-xp { font-size: 13px; color: var(--accent-green); font-weight: 700; }

/* ===== Друзья ===== */
.friends-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.friend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.friend-item:active { transform: scale(0.98); }

.friend-avatar { font-size: 24px; }
.friend-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.friend-name { flex: 1; font-size: 14px; font-weight: 600; }

.friend-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.friend-remove-btn:hover { background: #ff4444; color: #fff; }

/* ===== Модалка друзей (Telegram-style) ===== */
.friends-modal-content {
    max-width: 400px;
    max-height: 85vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.friends-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.friends-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow-x: auto;
}

.friends-tab {
    flex: 1;
    padding: 12px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.friends-tab:hover {
    color: var(--text-secondary);
    background: rgba(128, 128, 128, 0.05);
}

.friends-tab.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.tab-count {
    background: var(--bg-card-hover);
    color: var(--text-muted);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 18px;
    text-align: center;
}

.friends-tab.active .tab-count {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
}

.friends-tab-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.tab-pane {
    display: none;
    padding: 8px;
}

.tab-pane.active {
    display: block;
}

.friends-modal-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Элемент в списке друзей (модалка) */
.friends-modal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background 0.15s;
    cursor: pointer;
}

.friends-modal-item:hover {
    background: var(--bg-card-hover);
}

.friends-modal-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.friends-modal-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), #00cc70);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
}

.friends-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.friends-modal-info {
    flex: 1;
    min-width: 0;
}

.friends-modal-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friends-modal-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.friends-modal-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.friends-modal-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
}

.friends-modal-btn:hover {
    background: var(--border-color);
}

.friends-modal-btn.accept {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
}

.friends-modal-btn.accept:hover {
    background: rgba(0, 255, 136, 0.25);
}

.friends-modal-btn.reject {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.friends-modal-btn.reject:hover {
    background: rgba(255, 68, 68, 0.2);
}

.friends-modal-btn.chat-btn {
    background: rgba(0, 136, 204, 0.15);
    color: #3390ec;
}

.friends-modal-btn.chat-btn:hover {
    background: rgba(0, 136, 204, 0.25);
}

.friends-modal-btn.remove-btn {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.friends-modal-btn.remove-btn:hover {
    background: rgba(255, 68, 68, 0.2);
}

.friends-modal-btn.cancel-btn {
    font-size: 12px;
    width: auto;
    padding: 0 14px;
    border-radius: 18px;
}

/* Пустое состояние */
.friends-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.friends-empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.friends-empty-state .empty-text {
    font-size: 14px;
    margin-bottom: 4px;
}

.friends-empty-state .empty-hint {
    font-size: 12px;
    opacity: 0.7;
}

/* ===== Заявки в друзья ===== */
.friend-requests-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.requests-section {
    margin-bottom: 12px;
}

.requests-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.request-item.outgoing {
    opacity: 0.8;
}

.request-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), #00cc70);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.request-info {
    flex: 1;
    min-width: 0;
}

.request-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-time,
.request-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.request-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.request-accept-btn,
.request-reject-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.request-accept-btn {
    background: rgba(0, 255, 136, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.request-accept-btn:hover {
    background: rgba(0, 255, 136, 0.25);
}

.request-reject-btn {
    background: rgba(255, 45, 45, 0.1);
    color: #ff4444;
    border: 1px solid rgba(255, 45, 45, 0.2);
}

.request-reject-btn:hover {
    background: rgba(255, 45, 45, 0.2);
}

.request-cancel-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.request-cancel-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
}

/* --- Заявки в друзья (светлая тема) --- */
html.light-theme .friend-requests-section,
body.light-theme .friend-requests-section {
    border-top-color: #e0e0e0;
}

html.light-theme .request-item,
body.light-theme .request-item {
    background: #ffffff;
    border-color: #e0e0e0;
}

html.light-theme .request-avatar,
body.light-theme .request-avatar {
    background: linear-gradient(135deg, #00cc70, #00aa55);
}

html.light-theme .request-accept-btn,
body.light-theme .request-accept-btn {
    background: rgba(0, 200, 100, 0.12);
    border-color: rgba(0, 200, 100, 0.3);
    color: #00aa55;
}

html.light-theme .request-accept-btn:hover,
body.light-theme .request-accept-btn:hover {
    background: rgba(0, 200, 100, 0.2);
}

html.light-theme .request-reject-btn,
body.light-theme .request-reject-btn {
    background: rgba(255, 60, 60, 0.08);
    border-color: rgba(255, 60, 60, 0.2);
    color: #ff4444;
}

html.light-theme .request-reject-btn:hover,
body.light-theme .request-reject-btn:hover {
    background: rgba(255, 60, 60, 0.15);
}

html.light-theme .request-cancel-btn,
body.light-theme .request-cancel-btn {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #666;
}

html.light-theme .request-cancel-btn:hover,
body.light-theme .request-cancel-btn:hover {
    border-color: #ff4444;
    color: #ff4444;
}

/* --- Модалка друзей (светлая тема) --- */
body.light-theme .friends-modal-content {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .friends-modal-header {
    background: #ffffff;
    border-bottom-color: #e0e0e0;
}

body.light-theme .friends-tabs {
    border-bottom-color: #e0e0e0;
    background: #f8f9fa;
}

body.light-theme .friends-tab {
    color: #888;
}

body.light-theme .friends-tab:hover {
    color: #555;
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .friends-tab.active {
    color: #00aa55;
    border-bottom-color: #00aa55;
}

body.light-theme .friends-tab.active .tab-count {
    background: rgba(0, 200, 100, 0.12);
    color: #00aa55;
}

body.light-theme .tab-count {
    background: #f0f0f0;
    color: #888;
}

body.light-theme .friends-modal-item:hover {
    background: #f5f5f5;
}

body.light-theme .friends-modal-avatar {
    background: linear-gradient(135deg, #00cc70, #00aa55);
}

body.light-theme .friends-modal-btn {
    background: #f0f0f0;
    color: #666;
}

body.light-theme .friends-modal-btn:hover {
    background: #e0e0e0;
}

body.light-theme .friends-modal-btn.accept {
    background: rgba(0, 200, 100, 0.12);
    color: #00aa55;
}

body.light-theme .friends-modal-btn.accept:hover {
    background: rgba(0, 200, 100, 0.2);
}

body.light-theme .friends-modal-btn.reject {
    background: rgba(255, 60, 60, 0.08);
    color: #ff4444;
}

body.light-theme .friends-modal-btn.reject:hover {
    background: rgba(255, 60, 60, 0.15);
}

body.light-theme .friends-modal-btn.chat-btn {
    background: rgba(0, 136, 204, 0.1);
    color: #3390ec;
}

body.light-theme .friends-modal-btn.chat-btn:hover {
    background: rgba(0, 136, 204, 0.18);
}

body.light-theme .friends-modal-btn.remove-btn {
    background: rgba(255, 60, 60, 0.08);
    color: #ff4444;
}

body.light-theme .friends-modal-btn.remove-btn:hover {
    background: rgba(255, 60, 60, 0.15);
}

.friends-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--accent-green);
    color: var(--bg-primary);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== Реакции ===== */
.feed-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.reaction-btn {
    padding: 4px 10px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reaction-btn:active { transform: scale(0.95); }
.reaction-btn.active { border-color: var(--accent-green); background: rgba(0, 255, 136, 0.1); }

.reaction-picker {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.reaction-option {
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.reaction-option:active { transform: scale(1.2); background: var(--bg-card-hover); }

.feed-mood {
    font-size: 12px;
    color: var(--accent-blue);
}

/* ===== Настроение (Mood) ===== */
.mood-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mood-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.mood-option:active { transform: scale(0.98); border-color: var(--accent-green); }
.mood-option.mood-clear { border-color: #ff4444; }

.mood-emoji { font-size: 20px; }
.mood-text { flex: 1; text-align: left; }

/* ===== Адаптация для светлой темы ===== */
html.light-theme .daily-quest-card,
body.light-theme .daily-quest-card,
html.light-theme .leaderboard-item,
body.light-theme .leaderboard-item,
html.light-theme .friend-item,
body.light-theme .friend-item,
html.light-theme .mood-option,
body.light-theme .mood-option {
    background: #ffffff;
    border-color: #e0e0e0;
}

html.light-theme .reaction-btn,
body.light-theme .reaction-btn {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

/* --- Карточки "Рядом с тобой" --- */
body.light-theme .nearby-item {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}
body.light-theme .nearby-item::before {
    background: linear-gradient(90deg, transparent, rgba(0, 200, 100, 0.3), transparent);
}
body.light-theme .nearby-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 200, 100, 0.3);
}
body.light-theme .nearby-avatar {
    background: linear-gradient(135deg, #00cc70, #00aa55);
    box-shadow: 0 2px 8px rgba(0, 200, 100, 0.15);
}

/* --- Нижняя навигация --- */
body.light-theme .bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
body.light-theme .nav-btn {
    color: #999;
}
body.light-theme .nav-btn.active {
    color: #00aa55;
    background: rgba(0, 200, 100, 0.08);
}
body.light-theme .nav-btn:not(.active):hover {
    color: #666;
    background: rgba(0, 0, 0, 0.03);
}

/* --- Кнопка "Я ТУТ" (стеклянная) --- */
body.light-theme .im-here-btn {
    background: rgba(0, 200, 100, 0.1);
    border-color: rgba(0, 200, 100, 0.35);
    border-top-color: rgba(0, 200, 100, 0.5);
    border-bottom-color: rgba(0, 150, 70, 0.2);
    color: rgba(0, 170, 80, 0.95);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08),
        0 0 15px rgba(0, 200, 100, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    text-shadow: 0 0 10px rgba(0, 200, 100, 0.3);
}
body.light-theme .im-here-btn:hover {
    background: rgba(0, 200, 100, 0.18);
    border-color: rgba(0, 200, 100, 0.5);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.1),
        0 0 25px rgba(0, 200, 100, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
}
body.light-theme .im-here-btn:active {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(0, 200, 100, 0.15);
}
body.light-theme .im-here-btn.active {
    background: rgba(0, 200, 100, 0.22);
    border-color: rgba(0, 200, 100, 0.6);
    box-shadow:
        0 0 30px rgba(0, 200, 100, 0.25),
        0 8px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: #00aa55;
    text-shadow: 0 0 16px rgba(0, 200, 100, 0.5);
}

/* --- Кнопка обновления --- */
body.light-theme .glass-refresh-btn {
    background: rgba(0, 200, 100, 0.08);
    border-color: rgba(0, 200, 100, 0.3);
    border-top-color: rgba(0, 200, 100, 0.5);
    box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.08),
        0 0 10px rgba(0, 200, 100, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
body.light-theme .glass-refresh-btn:hover {
    background: rgba(0, 200, 100, 0.15);
    border-color: rgba(0, 200, 100, 0.5);
    box-shadow:
        0 10px 22px rgba(0, 0, 0, 0.1),
        0 0 18px rgba(0, 200, 100, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
body.light-theme .glass-refresh-btn:active {
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(0, 200, 100, 0.12);
}

/* --- Приватные чаты (карточки) --- */
body.light-theme .private-chat-item {
    background: #ffffff;
    border-color: #e0e0e0;
}
body.light-theme .private-chat-item:hover {
    background: #f8f9fa;
    border-color: rgba(0, 200, 100, 0.4);
}

/* --- Шапка профиля (тёмная) --- */
body.light-theme .view-profile-header-new {
    background: linear-gradient(135deg, #f0f4f0 0%, #e8f0e8 100%);
    border-bottom-color: #e0e0e0;
}
body.light-theme .view-profile-header-new .view-level-badge {
    background: linear-gradient(135deg, #00cc70, #00aa55);
    color: #fff;
}

body.light-theme .view-xp-bar {
    background: #f5f5f5;
    border-bottom-color: #e0e0e0;
}

body.light-theme .view-stat-card {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .view-bio-section {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

body.light-theme .view-interest-tag {
    background: rgba(0, 200, 100, 0.1);
    border-color: rgba(0, 200, 100, 0.25);
    color: #00aa55;
}

body.light-theme .view-achievements-grid {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

body.light-theme .view-actions {
    border-top-color: #e0e0e0;
    background: #f8f9fa;
}

body.light-theme .view-action-btn.secondary {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #666;
}

/* --- Приватный чат (модальный) --- */
body.light-theme .tg-chat-modal {
    background: #ffffff;
}

body.light-theme .tg-chat-header {
    background: #f8f9fa;
    border-bottom-color: #e0e0e0;
}

body.light-theme .tg-chat-name {
    color: #1a1a1a;
}

body.light-theme .tg-chat-status {
    color: #888;
}

body.light-theme .tg-chat-body {
    background: #f0f2f5;
}

body.light-theme .tg-msg.mine {
    background: #00cc70;
    color: #fff;
}

body.light-theme .tg-msg.mine .tg-msg-time {
    color: rgba(255, 255, 255, 0.7);
}

body.light-theme .tg-msg.theirs {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e8e8e8;
}

body.light-theme .tg-msg.theirs .tg-msg-time {
    color: #999;
}

body.light-theme .tg-chat-input-area {
    background: #f8f9fa;
    border-top-color: #e0e0e0;
}

body.light-theme .tg-chat-input-area input {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #1a1a1a;
}

body.light-theme .tg-chat-input-area input:focus {
    border-color: #00cc70;
}

body.light-theme .tg-chat-input-area input::placeholder {
    color: #aaa;
}

body.light-theme .tg-send-btn {
    background: #00cc70;
    color: #fff;
}

body.light-theme .tg-send-btn:hover {
    background: #00bb66;
}

/* --- Контекстное меню (светлая тема) --- */
body.light-theme .tg-chat-menu-dropdown {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.light-theme .tg-chat-menu-item {
    color: #1a1a1a;
}

body.light-theme .tg-chat-menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ===== Индикатор онлайн (зелёный кружок как в Telegram) ===== */
.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border: 2px solid var(--bg-card, #1a1a2e);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.4);
}

body.light-theme .online-indicator {
    border-color: #ffffff;
}

.nearby-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.lb-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.friend-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.request-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

/* --- Районный чат --- */
body.light-theme .chat-messages {
    background: #f0f2f5;
}

body.light-theme .chat-message:not(.mine) .chat-msg-text {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.light-theme .chat-message.mine .chat-msg-text {
    background: #eeffde;
    color: #1a1a1a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

body.light-theme .chat-message.mine .chat-msg-text .mine-time {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .chat-msg-name {
    color: #3390ec;
}

body.light-theme .chat-msg-time {
    color: rgba(0, 0, 0, 0.35);
}

body.light-theme .chat-msg-avatar {
    background: #f5f5f5;
}

body.light-theme .chat-input-area {
    background: #ffffff;
    border-top-color: #e0e0e0;
}

body.light-theme .chat-input-area input {
    background: #f0f2f5;
    border-color: #e0e0e0;
    color: #1a1a1a;
}

body.light-theme .chat-input-area input::placeholder {
    color: #aaa;
}

body.light-theme .chat-header {
    background: #ffffff;
    border-bottom-color: #e0e0e0;
}

/* --- Лента (фид) --- */
body.light-theme .feed-card {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .feed-card:hover {
    border-color: rgba(0, 200, 100, 0.3);
}

body.light-theme .feed-text {
    color: #333;
}

body.light-theme .feed-btn.secondary {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #666;
}

body.light-theme .feed-actions {
    border-top-color: #e8e8e8;
    background: #fafafa;
}

/* --- Модалки --- */
body.light-theme .modal-content {
    background: #ffffff;
    border-color: #e0e0e0;
}

body.light-theme .modal {
    background: rgba(0, 0, 0, 0.5);
}

body.light-theme .create-profile-modal .form-group label {
    color: #333;
}

body.light-theme .form-group input,
body.light-theme .form-group textarea,
body.light-theme .form-group select {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #1a1a1a;
}

body.light-theme .form-group input:focus,
body.light-theme .form-group textarea:focus,
body.light-theme .form-group select:focus {
    border-color: #00cc70;
}

body.light-theme .form-submit-btn {
    background: linear-gradient(135deg, #00cc70, #00aa55);
    color: #fff;
}

body.light-theme .form-submit-btn:hover {
    box-shadow: 0 4px 15px rgba(0, 200, 100, 0.25);
}

/* --- Бейджи уровней --- */
body.light-theme .level-badge {
    background: linear-gradient(135deg, #00cc70, #00aa55);
    color: #fff;
}

/* --- Шиммер на кнопках --- */
body.light-theme .im-here-btn::before {
    background: linear-gradient(95deg, transparent, rgba(0, 200, 100, 0.2), transparent);
}

body.light-theme .glass-refresh-btn::before {
    background: linear-gradient(90deg, transparent, rgba(0, 200, 100, 0.2), transparent);
}
