/* ===== ОСНОВНЫЕ СТИЛИ (Mobile-first) ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none !important;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: white !important;
    min-height: 100vh;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

/* Контейнер Bootstrap с правильными отступами */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    animation: fadeIn 0.5s ease;
}

.container, .container-fluid, .row, [class*="col-"] {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
}

/* ===== НАВБАР ===== */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    padding: 15px 0;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: white !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap !important;
}

.navbar-brand i {
    font-size: 2.2rem;
    color: #ffd700;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    text-shadow: 4px 4px 8px rgba(0,0,0,0.3);
}

.navbar-brand:hover i {
    filter: drop-shadow(0 0 10px #ffd700);
}

.navbar-toggler {
    border: 2px solid white !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-radius: 10px !important;
    padding: 8px 12px !important;
    margin-right: 10px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 25px !important;
    height: 25px !important;
}

/* Стили для всех кнопок навбара */
.navbar-nav .nav-link,
#logout-form button,
.btn-settings {
    position: relative;
    color: rgba(255,255,255,0.95) !important;
    font-weight: 500;
    padding: 10px 20px !important;
    border-radius: 30px;
    transition: all 0.3s ease;
    margin: 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    font-size: 1rem;
}

.navbar-nav .nav-link::before,
#logout-form button::before,
.btn-settings::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.navbar-nav .nav-link:hover::before,
#logout-form button:hover::before,
.btn-settings:hover::before {
    width: 300px;
    height: 300px;
}

.navbar-nav .nav-link:hover,
#logout-form button:hover,
.btn-settings:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.navbar-nav .nav-link i,
#logout-form button i,
.btn-settings i {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.25);
    color: white !important;
    font-weight: 600;
}

/* Стили для кнопки настроек */
.btn-settings {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3) !important;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
    margin: 0 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-settings:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.5) !important;
}

/* Кнопка поиска */
.btn-settings[onclick="openUserSearch()"] {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 107, 107, 0.6); }
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 5px rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 4px 10px rgba(255, 215, 0, 0.8); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes glow {
    0%, 100% { 
        opacity: 0.8; 
        text-shadow: 0 0 5px #00ff9d, 0 0 10px #00ff9d; 
    }
    50% { 
        opacity: 1; 
        text-shadow: 0 0 10px #00ff9d, 0 0 20px #00ff9d, 0 0 30px #00ff9d; 
    }
}

/* ===== КАРТОЧКИ ===== */
.card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 20px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    background: white !important;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.1) !important;
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 12px 20px;
    background: white !important;
}

.card-header.bg-primary,
.card-header.bg-danger {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.card-header h5, .card-header h4 {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: white;
    margin: 0;
}

.card-body {
    border-radius: 0 0 15px 15px;
    padding: 20px;
    overflow-x: hidden;
    background: white;
}

.card-footer {
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
}

/* ===== АЛЕРТЫ ===== */
.alert {
    border: none;
    border-radius: 15px;
    font-weight: 500;
    margin-bottom: 15px;
    animation: slideDown 0.5s ease;
}

.alert-success {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #155724;
}

.alert-error, .alert-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ===== ЛИСТЫ И ЭЛЕМЕНТЫ ===== */
.list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* ===== КНОПКИ ===== */
.btn:focus,
.btn:active,
.form-control:focus,
.form-control:active,
a:focus,
a:active,
button:focus,
button:active,
.list-group-item:focus,
.list-group-item:active,
.navbar-toggler:focus,
.navbar-toggler:active,
[class*="btn"]:focus,
[class*="btn"]:active {
    outline: none !important;
    box-shadow: none !important;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1) !important;
    border-color: #667eea !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border: none !important;
    border-radius: 30px;
    padding: 12px 30px !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    border: none !important;
    border-radius: 30px;
    padding: 12px 30px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.btn-outline-primary {
    border: 2px solid #667eea !important;
    color: #667eea !important;
    background: transparent !important;
    border-radius: 30px;
    padding: 10px 20px !important;
    font-weight: 500;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important;
}

.btn-outline-primary i {
    transition: transform 0.3s ease;
}

.btn-outline-primary:hover i {
    transform: scale(1.1);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    border: none !important;
    border-radius: 30px;
    padding: 10px 30px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.5) !important;
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838) !important;
    border: none !important;
    border-radius: 30px;
    padding: 10px 20px !important;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.btn-light {
    background: white !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    border-radius: 30px !important;
    padding: 8px 16px !important;
    font-weight: 500;
    transition: all 0.3s ease !important;
}

.btn-light:hover {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3) !important;
}

/* Красивые кнопки как в приложении */
.btn-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    padding: 10px 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-gradient:hover::before {
    width: 300px;
    height: 300px;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.btn-gradient span, .btn-gradient i {
    position: relative;
    z-index: 1;
}

.btn-outline-gradient {
    background: transparent !important;
    color: #667eea !important;
    border: 2px solid #667eea !important;
    border-radius: 25px !important;
    padding: 10px 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-outline-gradient:hover {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Кнопка-сообщение */
.btn-message {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-message::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
    text-decoration: none;
}

.btn-message:hover::before {
    width: 300px;
    height: 300px;
}

.btn-message i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.btn-message span {
    position: relative;
    z-index: 1;
}

.btn-message-secondary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    box-shadow: none;
}

.btn-message-secondary:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.btn-message:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Специальные кнопки для групп */
.btn-group-info, .btn-group-leave {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-decoration: none;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: white;
}

.btn-group-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.btn-group-info:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-group-leave {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.btn-group-leave:hover {
    background: linear-gradient(135deg, #ff5252, #ff3838);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* Кнопки действий для настроек */
.btn-action {
    padding: 10px 25px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    color: white;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-action:hover::before {
    width: 300px;
    height: 300px;
}

.btn-action span, .btn-action i {
    position: relative;
    z-index: 1;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.btn-action.btn-danger {
    background: linear-gradient(135deg, #f5515f, #e63946);
}

.btn-action.btn-danger:hover {
    background: linear-gradient(135deg, #e63946, #c82333);
}

.btn-action.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-action.btn-success:hover {
    background: linear-gradient(135deg, #27ae60, #219a52);
}

.btn-action.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.btn-action.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

.btn-outline-action {
    padding: 8px 20px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: 2px solid #667eea !important;
    background: transparent !important;
    color: #667eea !important;
    border-radius: 30px !important;
    transition: all 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-outline-action:hover {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-outline-action i {
    transition: transform 0.3s ease;
}

.btn-outline-action:hover i {
    transform: scale(1.1);
}

/* ===== ФОРМЫ И ИНПУТЫ ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    background: white !important;
}

.form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: none !important;
}

/* Современное поле ввода */
.modern-input {
    border: 2px solid #e0e0e0;
    border-radius: 50px !important;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.modern-input .input-group-text {
    background: white;
    border: none;
    padding: 0 15px;
    color: #667eea;
}

.modern-input .input-group-text:first-child {
    border-right: 1px solid #e0e0e0;
    border-radius: 50px 0 0 50px;
}

.modern-input .clear-btn {
    cursor: pointer;
    border-left: 1px solid #e0e0e0;
    border-radius: 0 50px 50px 0;
    transition: all 0.2s ease;
}

.modern-input .clear-btn:hover {
    background: #ff6b6b;
    color: white;
}

.modern-input .form-control {
    border: none !important;
    padding: 12px 15px;
    font-size: 0.95rem;
    height: 45px;
    box-shadow: none !important;
}

.modern-input:focus-within {
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.modern-input:focus-within .input-group-text i {
    color: #764ba2;
}

/* ===== МОДАЛЬНЫЕ ОКНА ===== */
.modal-content {
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: none;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white;
}

.modal-header .btn-close-white {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close-white:hover {
    opacity: 1;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
}

/* ===== БЭЙДЖИ ===== */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 30px !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745, #218838) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
    color: #212529;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
}

/* ===== СПИСКИ ЧАТОВ И ГРУПП ===== */
#chats-list, #groups-list {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

#chats-list::-webkit-scrollbar,
#groups-list::-webkit-scrollbar {
    width: 6px;
}

#chats-list::-webkit-scrollbar-track,
#groups-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#chats-list::-webkit-scrollbar-thumb,
#groups-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

#chats-list::-webkit-scrollbar-thumb:hover,
#groups-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Элементы списков */
.group-item, .chat-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-radius: 10px !important;
    margin-bottom: 4px;
    background-color: white;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #f0f0f0;
}

.group-item:hover, .chat-item:hover {
    border-left-color: #667eea;
    background: #f8f9fa;
    transform: translateX(2px);
}

.chat-item.active {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6e9ff 100%);
    border-left-color: #667eea;
}

/* Контейнер с аватаром и текстом */
.group-item .d-flex, .chat-item .d-flex {
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
}

/* Аватар */
.group-item .me-3, .chat-item .me-3 {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    margin-right: 8px;
}

.group-item .me-3 img, .chat-item .me-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.group-item .me-3 .bg-secondary {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.group-item .me-3 .bg-secondary i {
    font-size: 1.5rem;
    color: white;
}

/* Текстовая часть */
.group-item .flex-grow-1, .chat-item .flex-grow-1 {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

/* Обрезка текста */
.group-item strong, .chat-item strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    font-size: 1rem;
}

.group-item small, .chat-item small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    font-size: 0.8rem;
    color: #6c757d;
}

/* ===== КОНТЕЙНЕР СООБЩЕНИЙ ===== */
#chat-messages {
    min-height: 500px;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    background-color: #f8f9fa;
    background-image: radial-gradient(circle at 25% 25%, rgba(102,126,234,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 100%;
    display: block !important;
}

.message {
    animation: fadeInUp 0.3s ease;
    margin-bottom: 10px;
    max-width: 100%;
}

.message .bg-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    border-radius: 18px 18px 4px 18px !important;
    max-width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 10px;
    color: white;
}

.message .bg-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
    border-radius: 18px 18px 18px 4px !important;
    max-width: 85%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 10px;
    color: white;
}

.message small {
    opacity: 0.8;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
}

/* Неоновый замочек */
.lock-icon {
    display: inline-block;
    color: #00ff9d;
    text-shadow: 0 0 5px #00ff9d, 0 0 10px #00ff9d;
    font-size: 0.9em;
    margin-left: 4px;
    animation: glow 2s ease-in-out infinite;
}

/* ===== ФОРМА ВВОДА СООБЩЕНИЙ ===== */
#message-form {
    max-width: 100%;
    padding: 0;
}

#message-form .d-flex {
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    position: relative;
}

.message-input {
    border: 2px solid #e0e0e0 !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    background: white !important;
    border-radius: 20px !important;
    height: 38px !important;
    flex: 1 !important;
    min-width: 50px;
}

.message-input:focus {
    border-color: #667eea !important;
    background: white !important;
    box-shadow: none !important;
    outline: none !important;
}

#message-input {
    border-radius: 20px 0 0 20px;
    border: 2px solid #e0e0e0;
    padding: 8px 15px;
    font-size: 14px;
    height: 38px;
    flex: 1;
}

#message-input:focus {
    border-color: #667eea;
    outline: none;
}

#send-message-btn {
    border-radius: 0 20px 20px 0;
    border: 2px solid #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    height: 38px;
    padding: 0 15px;
}

/* Кнопки */
.emoji-btn, .attach-btn, .audio-record-btn {
    border: 2px solid #667eea !important;
    background: white !important;
    color: #667eea !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    border-radius: 20px !important;
    height: 38px !important;
    width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
}

.emoji-btn:hover, .attach-btn:hover, .audio-record-btn:hover {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
    transform: translateY(-1px);
}

.send-btn {
    border: 2px solid #667eea !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    padding: 0 12px !important;
    transition: all 0.3s ease !important;
    border-radius: 20px !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    flex-shrink: 0;
}

.send-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.send-btn .send-text {
    display: none;
}

/* Мобильная кнопка действий */
#mobile-actions-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#mobile-actions-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Мобильное меню */
.mobile-action-menu {
    position: absolute;
    bottom: 60px;
    left: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 8px 0;
    display: none;
    z-index: 10000;
    min-width: 200px;
}

.mobile-action-menu.show {
    display: block !important;
}

.mobile-action-menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #333;
}

.mobile-action-menu-item:hover {
    background: #f0f2f5;
}

.mobile-action-menu-item i {
    width: 20px;
    color: #667eea;
}

/* ===== АУДИО СТИЛИ ===== */
.audio-record-btn.recording {
    background: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
    animation: pulse 1.5s infinite;
}

.audio-recorder-panel {
    margin-top: 10px;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
    background: white;
    border: 2px solid #667eea;
    padding: 10px;
}

.audio-recording-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    font-weight: 500;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.audio-timer {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 500;
    color: #495057;
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    border: 2px solid #667eea;
}

.audio-preview-panel {
    margin-top: 10px;
    border-radius: 10px;
    animation: slideDown 0.3s ease;
    background: white;
    border: 2px solid #667eea;
    padding: 10px;
}

.audio-preview {
    height: 35px;
    border-radius: 20px;
    width: 150px;
}

.audio-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.audio-preview-duration {
    margin-left: 10px;
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    padding: 2px 8px;
    border-radius: 20px;
    border: 2px solid #667eea;
}

.audio-message {
    width: 100%;
    margin-top: 8px;
}

.audio-player {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 8px;
}

.audio-info i {
    font-size: 1.2rem;
    color: white;
}

.audio-details {
    flex: 1;
    min-width: 0;
}

.audio-details .file-name {
    display: block;
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.audio-details .file-size {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

.stop-recording-btn, .cancel-recording-btn,
.remove-audio-btn, .send-audio-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.stop-recording-btn {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    box-shadow: 0 4px 10px rgba(0, 176, 155, 0.3);
}

.cancel-recording-btn,
.remove-audio-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    box-shadow: 0 4px 10px rgba(245, 87, 108, 0.3);
}

.send-audio-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.stop-recording-btn:hover, .cancel-recording-btn:hover,
.remove-audio-btn:hover, .send-audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.stop-recording-btn:active, .cancel-recording-btn:active,
.remove-audio-btn:active, .send-audio-btn:active {
    transform: scale(0.95);
}

/* ===== ПРЕДПРОСМОТР ФАЙЛА ===== */
.file-preview {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #667eea;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== ДОКУМЕНТЫ В СООБЩЕНИЯХ ===== */
.document-message {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 15px;
    border-radius: 12px;
    margin-top: 8px;
}

.document-message i {
    font-size: 2.2rem;
    color: white;
    min-width: 40px;
    text-align: center;
}

.document-download {
    color: white;
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
}

.document-download:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* ===== ЭМОДЗИ-ПИКЕР ===== */
.emoji-picker-container {
    position: relative;
}

.emoji-picker {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 320px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border: 1px solid #e0e0e0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 10px;
}

.emoji-picker button {
    font-size: 1.5rem;
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-picker button:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* ===== МОБИЛЬНЫЕ СМАЙЛЫ ===== */
.mobile-emoji-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid #667eea;
    border-radius: 20px 20px 0 0;
    padding: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    z-index: 10001;
    max-height: 300px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.mobile-emoji-container button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-emoji-container button:active {
    background: #667eea !important;
    color: white !important;
    transform: scale(0.95) !important;
}

/* ===== ЗАГЛУШКА ===== */
#no-chat-selected {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    padding: 30px 15px;
    text-align: center;
    border-radius: 15px;
}

#no-chat-selected i {
    animation: bounce 2s infinite;
    color: #667eea;
}

/* ===== ПРОФИЛЬ ===== */
.profile-avatar {
    transition: transform 0.3s;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.profile-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.profile-bio {
    background-color: #f8f9fa;
    border-left: 3px solid #667eea;
    padding: 15px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.user-info-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: left;
}

.user-info-details p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.user-info-details i {
    width: 20px;
    text-align: center;
    color: #667eea;
}

/* ===== ЗАГРУЗКА ФАЙЛОВ ===== */
.custom-file-upload {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.custom-file-upload:hover {
    background-color: #f0f8ff;
    border-color: #0056b3;
}

.custom-file-upload i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.custom-file-upload span {
    display: block;
    font-size: 0.9rem;
    color: #666;
}

/* ===== ЛЕНДИНГ ===== */
.landing-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    margin: 10px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.landing-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

.logo-corner {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    pointer-events: none;
    animation: slideInLeft 0.8s ease-out;
}

.logo-corner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom left;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    pointer-events: auto;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.logo-corner:hover img {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6));
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 25px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 30px;
    margin: 15px auto;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    animation: float 4s ease-in-out infinite;
    max-width: 600px;
    width: 90%;
}

.landing-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
    letter-spacing: 1px;
    word-break: break-word;
    line-height: 1.2;
}

.landing-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    padding: 0 10px;
    line-height: 1.4;
}

.landing-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.landing-btn {
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 250px;
    transition: all 0.3s ease;
}

.landing-btn-primary {
    background: white;
    color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.landing-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.landing-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.landing-btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.welcome-message {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
    padding: 0 10px;
}

.welcome-name {
    font-weight: 800;
    color: #ffd700;
    text-transform: uppercase;
    display: inline-block;
}

/* ===== ЛОГИН КАРТОЧКИ ===== */
.login-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 15px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.login-icon i {
    color: white !important;
}

/* ===== НАСТРОЙКИ ===== */
.settings-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.settings-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.1);
}

.section-title {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.section-title i {
    margin-right: 10px;
}

/* ===== СПИСКИ ПОЛЬЗОВАТЕЛЕЙ ===== */
.user-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.user-item:last-child {
    border-bottom: none;
}

.user-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.user-info {
    flex: 1;
}

.user-info strong {
    display: block;
    color: #333;
}

.user-info small {
    color: #667eea;
    font-size: 0.85rem;
}

.user-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.deleted-chat-item .badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* ===== QR СТИЛИ ===== */
.qr-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 2px dashed #667eea;
}

.qr-placeholder {
    text-align: center;
    color: #6c757d;
}

#qr-image {
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
    max-width: 250px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#qr-image:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3) !important;
}

.qr-instructions {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    border-radius: 10px;
    padding: 15px;
}

/* ===== СПЕЦИАЛЬНЫЕ ЗВЕЗДОЧКИ ===== */
.special-star-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.5);
    border: 1.5px solid white;
    animation: starPulse 2s infinite;
    margin-left: 4px;
    flex-shrink: 0;
}

.special-star-name i {
    font-size: 8px;
}

.special-star-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.6);
    border: 2px solid white;
    animation: starPulse 2s infinite;
    margin-left: 10px;
}

/* ===== РЕЙТИНГ ===== */
.rating-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.rating-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
}

.rating-breakdown {
    animation: fadeIn 0.3s ease;
}

.rating-breakdown .badge {
    min-width: 40px;
    text-align: center;
}

.rating-badge {
    display: inline-block;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.rating-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ===== УВЕДОМЛЕНИЯ ===== */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

#notification-container .alert {
    margin-bottom: 10px;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    animation: slideIn 0.3s ease;
    z-index: 10000;
}

/* ===== ГЕНЕРАЦИОННЫЕ КАРТОЧКИ ===== */
.generation-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.generation-header {
    padding: 10px 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.generation-header h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.generation-header-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.generation-body {
    padding: 15px;
    background: #f8f9fa;
}

.generation-body p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #333;
}

.generation-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gen-tag {
    background: rgba(0,0,0,0.05);
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

.generation-silent-header { background: linear-gradient(135deg, #6B5B4D, #4A3F35); }
.generation-boomer-header { background: linear-gradient(135deg, #8B4513, #A0522D); }
.generation-x-header { background: linear-gradient(135deg, #4A6B8F, #2C3E50); }
.generation-millennial-header { background: linear-gradient(135deg, #4A90E2, #357ABD); }
.generation-z-header { background: linear-gradient(135deg, #FF6B6B, #FF8E8E); }
.generation-alpha-header { background: linear-gradient(135deg, #9B59B6, #8E44AD); }
.generation-beta-header { background: linear-gradient(135deg, #00B09B, #009688); }

/* ===== УДАЛЕНИЕ ПРОФИЛЯ ===== */
.delete-warning-container {
    background-color: #fff0f0;
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.1);
}

.warning-icon {
    font-size: 2rem;
    color: #dc3545;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.delete-warning {
    color: #000000 !important;
    font-weight: 700 !important;
    font-size: 1rem;
    margin: 0;
    text-align: left;
    flex: 1;
}

/* ===== КНОПКИ ПОКОЛЕНИЯ ===== */
.generation-btn {
    border: none;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}

.generation-silent { background: linear-gradient(135deg, #6B5B4D, #4A3F35); }
.generation-boomer { background: linear-gradient(135deg, #8B4513, #A0522D); }
.generation-x { background: linear-gradient(135deg, #4A6B8F, #2C3E50); }
.generation-millennial { background: linear-gradient(135deg, #4A90E2, #357ABD); }
.generation-z { background: linear-gradient(135deg, #FF6B6B, #FF8E8E); }
.generation-alpha { background: linear-gradient(135deg, #9B59B6, #8E44AD); }
.generation-beta { background: linear-gradient(135deg, #00B09B, #009688); }

/* ===== НАВИГАЦИОННЫЕ ВКЛАДКИ ===== */
.nav-tabs {
    border-bottom: 2px solid #e0e0e0;
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    padding: 10px 20px;
    margin-right: 5px;
    border-radius: 30px 30px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background: #f8f9fa;
    color: #667eea;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #667eea;
    font-weight: 600;
    background: transparent;
    border-bottom: 3px solid #667eea;
}

/* ===== ПРОГРЕСС-БАР ===== */
.progress {
    height: 8px;
    border-radius: 10px;
    background: #e0e0e0;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

/* ===== ПОИСК ===== */
#searchResultsContainer {
    max-height: 400px;
    overflow-y: auto;
}

#search-results {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 12px;
    margin-top: 10px;
}

#search-results .user-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    background: white;
}

#search-results .user-item:hover {
    transform: translateX(5px);
    border-color: #667eea;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.1);
}

#search-results .user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

#search-results .user-info {
    flex: 1;
    min-width: 0;
}

#search-results .user-info strong {
    display: block;
    font-size: 1.1rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#search-results .user-info small {
    color: #667eea;
    font-size: 0.85rem;
}

#search-results .btn-start-chat {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 6px 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

#search-results .btn-start-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

#no-user-found {
    animation: fadeIn 0.5s ease;
}

/* ===== МОБИЛЬНЫЕ СТИЛИ (до 768px) ===== */
@media (max-width: 767px) {
    /* Все колонки на всю ширину */
    [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

     #locationModal .modal-dialog {
        max-width: 95% !important;
        margin: 10px auto !important;
    }
    
    #locationModal .modal-content {
        border-radius: 16px !important;
        overflow: hidden !important;
    }
    
    #locationModal .modal-header {
        padding: 10px 12px !important;
    }
    
    #locationModal .modal-header h5 {
        font-size: 0.85rem !important;
    }
    
    #locationModal .modal-body {
        padding: 12px !important;
    }
    
    #locationModal .modal-footer {
        padding: 10px 12px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
        border-top: 1px solid #eef2f6 !important;
    }
    
    #locationModal .modal-footer .btn {
        flex: 1 !important;
        max-width: 120px !important;
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
        border-radius: 30px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        margin: 0 !important;
    }
    
    #locationModal .modal-footer .btn-secondary {
        background: #f0f2f5 !important;
        color: #4a5568 !important;
        border: 1px solid #e2e8f0 !important;
    }
    
    #locationModal .modal-footer .btn-primary {
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        color: white !important;
        border: none !important;
    }
    
    #locationModal .modal-footer .btn i {
        font-size: 0.65rem !important;
    }
    
    /* Уменьшаем карту */
    #location-map {
        height: 150px !important;
        margin-bottom: 10px !important;
    }
    
    /* Уменьшаем текст */
    #locationModal .alert {
        font-size: 0.7rem !important;
        padding: 6px 10px !important;
        margin-bottom: 10px !important;
    }
    
    /* Поле ввода */
    #location-name-input {
        font-size: 0.75rem !important;
        padding: 6px 10px !important;
        height: 32px !important;
    }
    
    .form-label.small {
        font-size: 0.65rem !important;
        margin-bottom: 2px !important;
    }
    
    .col-md-4, .col-md-8, .col-md-3, .col-md-9, .col-md-5, .col-md-7 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    #chats-list, #groups-list {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .chat-item, .group-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 5px 0 !important;
        padding: 10px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
    
    .chat-item strong, .group-item strong {
        font-size: 0.9rem !important;
    }
    
    .chat-item small, .group-item small {
        font-size: 0.7rem !important;
    }
    
    .chat-item .me-3, .group-item .me-3 {
        width: 35px !important;
        height: 35px !important;
        margin-right: 6px !important;
    }
    
    #chat-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #chat-messages {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 50vh !important;
        max-height: 50vh !important;
        padding: 8px !important;
        margin: 0 !important;
    }
    
    #chat-header {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        margin: 0 !important;
    }
    
    #chat-header h5 {
        font-size: 1rem !important;
    }
    
    #message-form {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        margin: 0 !important;
        position: relative !important;
    }
    
    /* Контейнер для кнопок - нужен для позиционирования меню */
    #message-form .d-flex {
        position: relative !important;
    }
    
    .message-input,
    #message-input {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.9rem !important;
        padding: 8px 15px !important;
        height: 40px !important;
        border-radius: 20px !important;
        border: 2px solid #e0e0e0 !important;
        background: white !important;
        flex: 1 !important;
    }
    
    .card-body#chat-messages {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .col-md-4 .card,
    .col-md-8 .card,
    .col-md-3 .card,
    .col-md-9 .card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-md-4 .card-body,
    .col-md-8 .card-body {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }
    
    .btn-group-info, .btn-group-leave {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        font-size: 0.9rem !important;
    }
    
    /* ===== МОБИЛЬНАЯ КНОПКА ПЛЮС ===== */
    #mobile-actions-btn {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: white !important;
        border: 2px solid #667eea !important;
        color: #667eea !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 101 !important;
    }
    
    #mobile-actions-btn:hover {
        background: #667eea !important;
        color: white !important;
    }
    
    /* Скрываем десктопные кнопки */
    .desktop-actions {
        display: none !important;
    }
    
    .emoji-btn, .audio-record-btn, .attach-btn, .location-btn {
        display: none !important;
    }
    
    /* ===== МОБИЛЬНОЕ МЕНЮ ===== */
    .mobile-action-menu {
        position: fixed !important;
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        padding: 8px 0 !important;
        display: none !important;
        z-index: 10000 !important;
        min-width: 180px !important;
        border: 1px solid rgba(102, 126, 234, 0.2) !important;
    }
    
    .mobile-action-menu.show {
        display: block !important;
        animation: menuFadeIn 0.2s ease !important;
    }
    
    @keyframes menuFadeIn {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-action-menu-item {
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        cursor: pointer !important;
        color: #2c3e50 !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        transition: background 0.2s ease !important;
    }
    
    .mobile-action-menu-item:active {
        background: #f5f7ff !important;
    }
    
    .mobile-action-menu-item i {
        width: 22px !important;
        color: #667eea !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    /* ===== КНОПКА ОТПРАВКИ - КРУГЛАЯ ===== */
    .send-btn,
    #send-message-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
        flex-shrink: 0 !important;
    }
    
    .send-btn i,
    #send-message-btn i {
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    .send-btn .send-text,
    #send-message-btn .send-text {
        display: none !important;
    }
    
    /* ===== НАВБАР - ВСЕ КНОПКИ В РЯДУ ===== */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-brand i {
        font-size: 1.4rem !important;
    }
    
    /* Сетка для кнопок навбара - 3 колонки для 6 кнопок */
    .navbar-nav {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Каждый пункт меню занимает свою ячейку */
    .navbar-nav .nav-item {
        width: 100% !important;
        margin: 0 !important;
        list-style: none !important;
    }
    
    /* Стили для всех кнопок навбара */
    .navbar-nav .nav-link,
    .btn-settings {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 10px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 30px !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        backdrop-filter: blur(5px) !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
    }
    
    .navbar-nav .nav-link i,
    .btn-settings i {
        font-size: 0.85rem !important;
        width: 16px !important;
    }
    
    /* Кнопка выхода */
    #logout-form {
        grid-column: span 1;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    #logout-form button {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 10px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 30px !important;
        background: linear-gradient(135deg, #dc3545, #c82333) !important;
        color: white !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        margin: 0 !important;
        box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3) !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        white-space: nowrap !important;
    }
    
    #logout-form button i {
        font-size: 0.85rem !important;
        margin: 0 !important;
        width: 16px !important;
    }
    
    #logout-form button:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4) !important;
        background: linear-gradient(135deg, #c82333, #b21f2d) !important;
    }
    
    /* Кнопка поиска остается в ряду */
    .btn-settings[onclick="openUserSearch()"] {
        background: linear-gradient(135deg, #ff6b6b, #ff8e8e) !important;
        animation: pulse 2s infinite !important;
    }
    
    /* ===== ВЫПАДАЮЩЕЕ МЕНЮ КНОПКИ "СОЗДАТЬ" (ИСПРАВЛЕНИЕ) ===== */
    .navbar .dropdown {
        position: relative !important;
    }
    
    .navbar .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        transform: translateY(5px) !important;
        margin-top: 0 !important;
        z-index: 1050 !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
        min-width: 200px !important;
        border: 1px solid #eef2f6 !important;
        display: none !important;
        backdrop-filter: none !important;
        background-color: white !important;
    }
    
    .navbar .dropdown-menu.show {
        display: block !important;
    }
    
    .navbar .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 15px;
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid white;
        z-index: 1051;
    }
    
    .navbar .dropdown-item {
        padding: 12px 16px !important;
        font-size: 0.85rem !important;
        color: #2c3e50 !important;
        background: white !important;
        transition: background 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .navbar .dropdown-item:hover {
        background: #f8f9ff !important;
        color: #667eea !important;
    }
    
    .navbar .dropdown-item i {
        width: 20px;
        color: #667eea;
        font-size: 0.9rem;
    }
    
    .dropdown-divider {
        margin: 8px 0 !important;
        background-color: #eef2f6 !important;
    }
    
    /* Убираем эффект размытия у кнопки Создать */
    .btn-settings {
        backdrop-filter: none !important;
    }
    
    /* Убираем конфликтующие стили */
    .navbar-nav .nav-item:last-child {
        all: unset;
    }
    
    button[type="submit"] {
        all: unset;
    }
    
    /* Карточки */
    .card {
        margin-bottom: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card-header {
        padding: 10px 15px !important;
    }
    
    .card-header h5 {
        font-size: 1rem !important;
    }
    
    .card-body {
        padding: 12px !important;
    }
    
    /* Чат */
    #chat-messages {
        min-height: 45vh !important;
        max-height: 45vh !important;
    }
    
    #no-chat-selected {
        display: none !important;
    }
    
    /* Аудио */
    .audio-preview {
        width: 100% !important;
        margin-bottom: 5px !important;
    }
    
    .audio-recorder-panel .d-flex,
    .audio-preview-panel .d-flex {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .audio-recorder-panel .d-flex > div:first-child,
    .audio-preview-panel .d-flex > div:first-child {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .audio-recorder-panel .d-flex > div:last-child,
    .audio-preview-panel .d-flex > div:last-child {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .audio-preview-panel .d-flex .gap-2 {
        justify-content: center !important;
        width: 100% !important;
    }
    
    /* Модальные окна */
    .modal-dialog {
        margin: 10px !important;
    }
    
    .modal-header h5 {
        font-size: 1.1rem !important;
    }
    
    /* Кнопки действий */
    .btn-action {
        min-width: 100px !important;
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
    }
    
    .btn-outline-action {
        width: 180px !important;
        margin: 0 auto !important;
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    /* Лендинг */
    .landing-title {
        font-size: 1.8rem !important;
    }
    
    .landing-subtitle {
        font-size: 1rem !important;
    }
    
    .logo-corner {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Настройки */
    .row.align-items-center {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .col-md-5, .col-md-7 {
        width: 100%;
        max-width: 400px;
    }
    
    .col-md-5 {
        margin-bottom: 15px;
    }
    
    .col-md-7 .d-flex {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    /* Сообщения */
    .message .bg-primary,
    .message .bg-secondary {
        max-width: 85% !important;
        padding: 6px 10px !important;
        font-size: 0.9rem !important;
    }
    
    .message small {
        font-size: 0.65rem !important;
    }
    
    /* ===== ПРОФИЛЬ - КНОПКИ В ОДИН РЯД ===== */
    /* Контейнер с кнопками Сохранить и Отмена */
    .text-center .d-flex.justify-content-center,
    .text-center .d-flex.gap-2 {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    /* Кнопки Сохранить и Отмена */
    .btn-primary,
    .btn-secondary {
        width: auto !important;
        min-width: 110px !important;
        max-width: 130px !important;
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        border-radius: 30px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        flex-direction: row !important;
        white-space: nowrap !important;
    }
    
    .btn-primary i,
    .btn-secondary i {
        font-size: 0.8rem !important;
        margin: 0 !important;
    }
    
    /* Кнопка "Пройти тест на тип личности" */
    .btn-outline-primary.btn-sm {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
        border-radius: 30px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    /* Кнопка удаления профиля */
    .btn-danger {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
        border-radius: 30px !important;
        width: auto !important;
        min-width: 130px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }
    
    /* Отступы в карточке профиля */
    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    
    .user-info-details p {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
    }
    
    .user-info-details i {
        font-size: 0.9rem !important;
    }
    
    /* Блок рейтинга */
    .rating-container {
        margin-top: 15px !important;
        padding: 12px !important;
    }
    
    /* Контейнер с возрастом и кнопкой поколения */
    .mb-1.d-flex {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    .generation-btn {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }
    
    /* Разделитель в профиле */
    hr {
        margin: 15px 0 !important;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 480px) ===== */
@media (max-width: 480px) {
    .chat-item .me-3, .group-item .me-3 {
        width: 32px !important;
        height: 32px !important;
    }
    
    .chat-item strong, .group-item strong {
        font-size: 0.85rem !important;
    }
    
    .chat-item small, .group-item small {
        font-size: 0.65rem !important;
    }
    
    .message .bg-primary,
    .message .bg-secondary {
        max-width: 90% !important;
        font-size: 0.85rem !important;
        padding: 5px 8px !important;
    }
    
    .special-star-name {
        width: 14px !important;
        height: 14px !important;
        font-size: 8px !important;
    }
    
    .special-star-name i {
        font-size: 6px !important;
    }
    
    .special-star-profile {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
    }
    
    #no-chat-selected i {
        font-size: 2.5rem !important;
    }
    
    #no-chat-selected h3 {
        font-size: 1rem !important;
    }
    
    .landing-title {
        font-size: 1.6rem !important;
    }
    
    .landing-subtitle {
        font-size: 0.9rem !important;
    }
    
    .landing-btn {
        padding: 8px 12px !important;
        font-size: 0.85rem !important;
        max-width: 180px !important;
    }
    
    .welcome-message {
        font-size: 1.2rem !important;
    }
    
    .logo-corner {
        width: 60px !important;
        height: 60px !important;
    }
    
    .btn-action {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        min-width: 90px !important;
    }
    
    .btn-outline-action {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
        width: 160px !important;
    }
    
    .modern-input .form-control {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
        height: 40px !important;
    }
    
    .navbar-nav .btn-settings:nth-child(2) {
        min-width: 120px !important;
        height: 40px !important;
        padding: 0 15px !important;
        font-size: 0.85rem !important;
    }
    
    .navbar-nav .btn-settings:nth-child(2) i {
        font-size: 0.9rem !important;
    }
}

/* ===== ЭКСТРА МАЛЕНЬКИЕ ЭКРАНЫ (до 380px) ===== */
@media (max-width: 380px) {
    .logo-corner {
        width: 50px !important;
        height: 50px !important;
    }
    
    .landing-title {
        font-size: 1.4rem !important;
    }
    
    .landing-subtitle {
        font-size: 0.85rem !important;
    }
    
    .landing-btn {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
        max-width: 160px !important;
    }
    
    .welcome-message {
        font-size: 1rem !important;
    }
    
    .navbar-nav .btn-settings:nth-child(2) {
        min-width: 110px !important;
        height: 38px !important;
        padding: 0 12px !important;
        font-size: 0.8rem !important;
    }
    
    .navbar-nav .btn-settings:nth-child(2) i {
        font-size: 0.85rem !important;
    }
}

/* ===== ПЛАНШЕТЫ (от 576px до 767px) ===== */
@media (min-width: 576px) and (max-width: 767px) {
    .send-btn .send-text {
        display: inline !important;
    }
    
    .send-btn {
        width: auto !important;
        padding: 0 15px !important;
    }
    
    .chat-item strong, .group-item strong {
        max-width: 180px;
        font-size: 0.95rem !important;
    }
    
    .chat-item small, .group-item small {
        max-width: 220px;
        font-size: 0.8rem !important;
    }
    
    .landing-title {
        font-size: 2.2rem !important;
    }
    
    .landing-subtitle {
        font-size: 1.1rem !important;
    }
    
    .logo-corner {
        width: 120px !important;
        height: 120px !important;
    }
}

/* ===== ДЕСКТОПЫ (от 768px) ===== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
    .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        position: relative;
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
    
    .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -15px;
        margin-left: -15px;
        justify-content: center;
    }
    
    body > .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .row {
        width: 100%;
    }
    
    #mobile-actions-btn {
        display: none !important;
    }
    
    .emoji-btn, .audio-record-btn, .attach-btn {
        display: flex !important;
    }
    
    .mobile-action-menu {
        display: none !important;
    }
    
    .btn-settings[onclick="openUserSearch()"] {
        position: static !important;
        width: auto !important;
        height: auto !important;
        border-radius: 30px !important;
        padding: 10px 20px !important;
        animation: none !important;
        box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3) !important;
        margin: 0 5px !important;
        transform: none !important;
        left: auto !important;
        bottom: auto !important;
    }
    
    .btn-settings[onclick="openUserSearch()"] i {
        font-size: 1.2rem !important;
    }
    
    .btn-settings[onclick="openUserSearch()"] span {
        display: inline !important;
    }
    
    .group-item .me-3, .chat-item .me-3 {
        width: 50px;
        height: 50px;
    }
    
    .group-item strong, .chat-item strong {
        max-width: 200px;
        font-size: 1rem;
    }
    
    .group-item small, .chat-item small {
        max-width: 250px;
        font-size: 0.85rem;
    }
    
    .message .bg-primary,
    .message .bg-secondary {
        max-width: 70%;
    }
    
    #chat-messages {
        min-height: 600px;
        max-height: 600px;
    }
    
    .landing-container {
        min-height: 70vh;
    }
    
    .logo-corner {
        width: 250px !important;
        height: 250px !important;
    }
    
    .landing-content {
        padding: 30px !important;
        max-width: 500px !important;
    }
    
    .landing-title {
        font-size: 2.5rem !important;
        margin-bottom: 10px !important;
    }
    
    .landing-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 25px !important;
    }
    
    .welcome-message {
        font-size: 1.5rem !important;
        margin-bottom: 15px !important;
    }
    
    .welcome-name {
        font-size: 1.5rem !important;
    }
    
    .landing-buttons {
        flex-direction: row;
        gap: 15px;
    }
    
    .landing-btn {
        min-width: 160px !important;
        padding: 12px 30px !important;
        font-size: 1rem !important;
    }
    
    .navbar-brand {
        font-size: 1.5rem !important;
    }
    
    .navbar-brand i {
        font-size: 1.8rem !important;
    }
    
    .navbar-nav .nav-link,
    #logout-form button,
    .btn-settings {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }
    
    .card-body {
        text-align: left;
    }
    
    .modal-dialog {
        margin: 1.75rem auto;
    }
}

/* ===== БОЛЬШИЕ ДЕСКТОПЫ (от 992px) ===== */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .chat-item strong, .group-item strong {
        max-width: 250px;
    }
    
    .chat-item small, .group-item small {
        max-width: 300px;
    }
    
    .message .bg-primary,
    .message .bg-secondary {
        max-width: 60%;
    }
    
    .emoji-btn, .attach-btn, .audio-record-btn {
        width: 42px;
        height: 42px;
    }
    
    .landing-title {
        font-size: 2.8rem !important;
    }
    
    .logo-corner {
        width: 300px !important;
        height: 300px !important;
    }
}

/* ===== ОЧЕНЬ БОЛЬШИЕ ДЕСКТОПЫ (от 1200px) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .chat-item strong, .group-item strong {
        max-width: 300px;
    }
    
    .message .bg-primary,
    .message .bg-secondary {
        max-width: 50%;
    }
    
    .logo-corner {
        width: 350px !important;
        height: 350px !important;
    }
    
    .landing-title {
        font-size: 3rem !important;
    }
}

/* ===== СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА НОВОГО ЧАТА ===== */
#newChatModal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

#newChatModal .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 12px 15px;
}

#newChatModal .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== Четкое отображение аватаров ===== */
.chat-item .me-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Групповые кнопки ===== */
.group-buttons-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.group-buttons-row .btn-group-action {
    flex: 1;
}

@media (max-width: 768px) {
    .group-buttons-row {
        flex-direction: column;
        gap: 8px;
    }
}

/* Фиксированные кнопки без динамики */
.btn-action {
    transform: none !important;
    transition: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

.btn-action:hover,
.btn-action:active,
.btn-action:focus {
    transform: none !important;
    transition: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

.btn-action::before {
    display: none !important;
}

.btn-action i {
    transition: none !important;
}

.btn-action:hover i {
    transform: none !important;
}

/* Специфические цвета кнопок */
.btn-action.btn-danger {
    background: linear-gradient(135deg, #f5515f, #e63946) !important;
}

.btn-action.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
}

.btn-action.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
}

/* Уменьшение текста в просмотрах профиля на мобильных */
@media (max-width: 767px) {
    #views .d-flex .text-muted {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    
    #profile-views-list .user-info strong {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
    }
    
    #profile-views-list .user-info small {
        font-size: 0.75rem !important;
    }
    
    #profile-views-list .user-date {
        font-size: 0.7rem !important;
    }
    
    #profile-views-list .user-item {
        padding: 8px 10px !important;
    }
}

@media (max-width: 480px) {
    #views .d-flex .text-muted {
        font-size: 0.75rem !important;
    }
    
    #profile-views-list .user-info strong {
        font-size: 0.8rem !important;
    }
    
    #profile-views-list .user-info small {
        font-size: 0.65rem !important;
    }
    
    #profile-views-list .user-date {
        font-size: 0.6rem !important;
    }
}

/* === ПЕРЕОПРЕДЕЛЕНИЕ СТИЛЕЙ ДЛЯ УДАЛЕННЫХ ЧАТОВ (МОБИЛЬНЫЕ) === */
#deleted-chats-list,
#deleted-chats-list *,
#deleted-chats-list *:hover,
#deleted-chats-list *:active,
#deleted-chats-list *:focus {
    transition: none !important;
    transform: none !important;
    animation: none !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    #deleted .d-flex .text-muted {
        font-size: 0.85rem !important;
    }

    #deleted-chats-list {
        max-height: none !important;
        overflow-y: visible !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #deleted-chats-list .user-item {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 0 0 10px 0 !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 10px !important;
        background-color: #ffffff !important;
        box-sizing: border-box !important;
        transform: none !important;
        transition: none !important;
    }

    #deleted-chats-list .user-info {
        display: block !important;
        width: 100% !important;
        margin-bottom: 10px !important;
        padding: 0 !important;
    }

    #deleted-chats-list .user-info strong {
        display: block !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #333 !important;
        margin-bottom: 3px !important;
        line-height: 1.3 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    #deleted-chats-list .user-info small {
        display: block !important;
        font-size: 0.85rem !important;
        color: #667eea !important;
    }

    #deleted-chats-list .deleted-info {
        display: block !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    #deleted-chats-list .badge.bg-danger {
        display: inline-block !important;
        width: auto !important;
        max-width: 100% !important;
        padding: 6px 12px !important;
        margin-bottom: 5px !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        color: #fff !important;
        background: linear-gradient(135deg, #dc3545, #c82333) !important;
        border-radius: 20px !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: left !important;
        box-shadow: none !important;
    }

    #deleted-chats-list .user-date {
        display: block !important;
        width: 100% !important;
        font-size: 0.75rem !important;
        color: #6c757d !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        text-align: left !important;
    }

    #deleted-chats-list .small.text-muted {
        display: block !important;
        width: 100% !important;
        margin-top: 10px !important;
        padding-top: 8px !important;
        border-top: 1px dashed #e0e0e0 !important;
        font-size: 0.75rem !important;
        color: #6c757d !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 480px) {
    #deleted .d-flex .text-muted {
        font-size: 0.75rem !important;
    }
    #deleted-chats-list .user-info strong {
        font-size: 0.95rem !important;
    }
    #deleted-chats-list .user-info small {
        font-size: 0.8rem !important;
    }
    #deleted-chats-list .badge.bg-danger {
        font-size: 0.75rem !important;
        padding: 5px 10px !important;
    }
    #deleted-chats-list .user-date {
        font-size: 0.7rem !important;
    }
    #deleted-chats-list .small.text-muted {
        font-size: 0.7rem !important;
    }
}

/* Стили для раздела Смена пароля на мобильных */
@media (max-width: 767px) {
    #password .modern-input .form-control {
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
    }
    
    #password .modern-input .form-control::placeholder {
        font-size: 0.8rem !important;
        color: #999 !important;
    }
    
    #password .modern-input .input-group-text i {
        font-size: 0.9rem !important;
    }
    
    #password .text-muted small,
    #password .text-muted {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    #password .btn-action {
        font-size: 0.85rem !important;
        padding: 10px 20px !important;
    }
    
    #password .btn-outline-action {
        font-size: 0.8rem !important;
        padding: 8px 18px !important;
    }
}

@media (max-width: 480px) {
    #password .modern-input .form-control {
        font-size: 0.8rem !important;
        padding: 8px 10px !important;
    }
    
    #password .modern-input .form-control::placeholder {
        font-size: 0.75rem !important;
    }
    
    #password .text-muted small,
    #password .text-muted {
        font-size: 0.7rem !important;
    }
    
    #password .btn-action {
        font-size: 0.8rem !important;
        padding: 8px 16px !important;
    }
}

/* Стили для результатов поиска на мобильных */
@media (max-width: 767px) {
    #searchResultsContainer {
        width: 100% !important;
        padding: 0 !important;
    }
    
    #searchResultsContainer .user-item {
        padding: 12px !important;
        margin-bottom: 8px !important;
        border-radius: 10px !important;
        border: 1px solid #e0e0e0 !important;
        background: white !important;
    }
    
    #searchResultsContainer .user-item .d-flex {
        display: flex !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 8px !important;
    }
    
    #searchResultsContainer .user-avatar {
        width: 45px !important;
        height: 45px !important;
        flex-shrink: 0 !important;
        font-size: 1.1rem !important;
    }
    
    #searchResultsContainer .user-info {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    #searchResultsContainer .user-info .d-flex:first-child {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        margin-bottom: 4px !important;
    }
    
    #searchResultsContainer .user-info strong {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #333 !important;
    }
    
    #searchResultsContainer .badge.ms-2 {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
        margin-left: 0 !important;
        white-space: nowrap !important;
    }
    
    #searchResultsContainer .badge.ms-1 {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
        margin-left: 0 !important;
        white-space: nowrap !important;
    }
    
    #searchResultsContainer .user-info small.text-muted {
        font-size: 0.75rem !important;
        color: #667eea !important;
        display: block !important;
        margin-bottom: 6px !important;
    }
    
    #searchResultsContainer .d-flex.flex-wrap {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin: 6px 0 8px 0 !important;
    }
    
    #searchResultsContainer .badge {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        border-radius: 15px !important;
    }
    
    #searchResultsContainer .badge i {
        font-size: 0.65rem !important;
        margin-right: 2px !important;
    }
    
    #searchResultsContainer .btn-start-chat {
        font-size: 0.8rem !important;
        padding: 5px 12px !important;
        margin-left: auto !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    #searchResultsContainer .user-info strong {
        font-size: 0.95rem !important;
    }
    
    #searchResultsContainer .badge.ms-2 {
        font-size: 0.6rem !important;
        padding: 2px 5px !important;
    }
    
    #searchResultsContainer .badge.ms-1 {
        font-size: 0.55rem !important;
        padding: 2px 4px !important;
    }
    
    #searchResultsContainer .user-info small.text-muted {
        font-size: 0.7rem !important;
    }
    
    #searchResultsContainer .badge {
        font-size: 0.65rem !important;
        padding: 3px 6px !important;
    }
    
    #searchResultsContainer .btn-start-chat {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
    }
}

@media (min-width: 768px) {
    #searchResultsContainer {
        width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
        padding: 0 !important;
    }
    
    #searchResultsContainer .user-item {
        padding: 15px !important;
        margin-bottom: 10px !important;
        border-radius: 12px !important;
        border: 1px solid #e0e0e0 !important;
        background: white !important;
        transition: all 0.2s ease !important;
    }
    
    #searchResultsContainer .d-flex.flex-wrap {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin: 8px 0 0 0 !important;
        overflow-y: visible !important;
        max-height: none !important;
    }
    
    #searchResultsContainer .badge {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        border-radius: 20px !important;
    }
}

#searchResultsContainer {
    max-height: none !important;
    overflow-y: visible !important;
}

#searchResultsContainer .d-flex.flex-wrap {
    flex-wrap: wrap !important;
    overflow-y: visible !important;
    max-height: none !important;
}

@media (max-width: 767px) {
    #no-chat-selected {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
        z-index: -9999 !important;
    }
    
    .col-md-8 #no-chat-selected {
        display: none !important;
    }
}

/* Мобильная кнопка действий */
#mobile-actions-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 2px solid #667eea;
    background: #f8f9fa;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#mobile-actions-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
}

.mobile-action-menu {
    position: absolute;
    bottom: 60px;
    left: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    padding: 8px 0;
    display: none;
    z-index: 10000;
    min-width: 200px;
}

.mobile-action-menu.show {
    display: block !important;
}

.mobile-action-menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #333;
}

.mobile-action-menu-item:hover {
    background: #f0f2f5;
}

.mobile-action-menu-item i {
    width: 20px;
    color: #667eea;
}

@media (max-width: 767px) {
    #mobile-actions-btn {
        display: flex !important;
    }
    
    .desktop-actions {
        display: none !important;
    }
    
    .emoji-btn, .audio-record-btn, .attach-btn {
        display: none !important;
    }
}

/* Уменьшение кнопок на мобильных устройствах */
@media (max-width: 767px) {
    .card-header .d-flex.justify-content-between.align-items-center div {
        display: flex !important;
        gap: 5px !important;
    }
    
    .card-header .btn-sm {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        border-radius: 15px !important;
    }
    
    .card-header .btn-sm i {
        font-size: 0.7rem !important;
        margin-right: 3px !important;
    }
    
    .btn-gradient {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .btn-success.w-100 {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .btn-outline-primary.w-100 {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .modal-footer .btn {
        padding: 6px 12px !important;
        font-size: 0.8rem !important;
    }
    
    .card-header {
        padding: 8px 12px !important;
    }
    
    .card-header h5 {
        font-size: 1rem !important;
    }
    
    .card-header i {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 480px) {
    .card-header .btn-sm {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }
    
    .card-header .btn-sm i {
        font-size: 0.65rem !important;
        margin-right: 2px !important;
    }
}

@media (max-width: 767px) {
    .d-flex.gap-2 {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    
    .btn-primary,
    .btn-secondary {
        width: auto !important;
        min-width: 100px !important;
        max-width: 130px !important;
        padding: 8px 10px !important;
        font-size: 0.8rem !important;
        border-radius: 20px !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.3 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn-primary i,
    .btn-secondary i {
        font-size: 1rem !important;
        margin-right: 0 !important;
        margin-bottom: 3px !important;
    }
    
    .btn-secondary {
        flex-direction: column !important;
    }
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary {
        min-width: 80px !important;
        font-size: 0.7rem !important;
        padding: 6px 5px !important;
    }
    
    .btn-primary i,
    .btn-secondary i {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
    }
}

@media (max-width: 767px) {
    .d-flex.gap-2.justify-content-center {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    
    .btn-secondary,
    .btn-danger {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 12px 20px !important;
        font-size: 1rem !important;
        border-radius: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
        border: none !important;
    }
    
    .btn-secondary {
        background: linear-gradient(135deg, #6c757d, #5a6268) !important;
        color: white !important;
        box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
    }
    
    .btn-danger {
        background: linear-gradient(135deg, #dc3545, #c82333) !important;
        color: white !important;
        box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
    }
    
    .btn-secondary:active,
    .btn-danger:active {
        transform: scale(0.98) !important;
    }
    
    .btn-secondary i,
    .btn-danger i {
        font-size: 1.1rem !important;
        transition: transform 0.3s ease !important;
    }
    
    .btn-secondary:hover i,
    .btn-danger:hover i {
        transform: scale(1.1) !important;
    }
    
    .btn-danger {
        animation: pulseDelete 2s infinite !important;
    }
    
    @keyframes pulseDelete {
        0%, 100% {
            box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
        }
        50% {
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.7);
        }
    }
    
    .btn-secondary {
        animation: none !important;
    }
    
    .card-body {
        padding: 20px 15px !important;
    }
    
    .card-header h5 {
        font-size: 1.1rem !important;
    }
    
    .fa-exclamation-triangle {
        font-size: 3rem !important;
    }
    
    h4.mb-3 {
        font-size: 1.2rem !important;
        line-height: 1.4 !important;
    }
    
    .text-muted.mb-4 {
        font-size: 0.9rem !important;
    }
    
    .alert-warning {
        padding: 10px !important;
        font-size: 0.85rem !important;
        margin-bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    .btn-secondary,
    .btn-danger {
        padding: 10px 15px !important;
        font-size: 0.9rem !important;
        max-width: 250px !important;
    }
    
    .btn-secondary i,
    .btn-danger i {
        font-size: 1rem !important;
    }
    
    h4.mb-3 {
        font-size: 1.1rem !important;
    }
    
    .fa-exclamation-triangle {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 767px) {
    .btn-secondary.alternative,
    .btn-danger.alternative {
        flex-direction: column !important;
        padding: 15px !important;
    }
    
    .btn-secondary.alternative i,
    .btn-danger.alternative i {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
        background: rgba(255,255,255,0.2) !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 767px) {
    #userProfileContent .card {
        width: 100% !important;
        margin: 0 !important;
    }
    
    #userProfileContent .card-body {
        width: 100% !important;
        padding: 15px !important;
        overflow-x: visible !important;
    }
    
    #userProfileContent .card-body p.mb-2 {
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
        font-size: 0.9rem !important;
    }
    
    #userProfileContent .card-body p.mb-2 i,
    #userProfileContent .card-body p.mb-2 strong,
    #userProfileContent .card-body p.mb-2 span {
        display: inline-block !important;
        white-space: nowrap !important;
    }
    
    #userProfileModal .modal-dialog {
        max-width: 95% !important;
        margin: 10px auto !important;
    }
    
    #userProfileModal .modal-content {
        width: 100% !important;
        border-radius: 20px !important;
    }
}

/* ОТКЛЮЧАЕМ ВСЕ АНИМАЦИИ ПРИ НАВЕДЕНИИ */
* {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

*:hover {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Отключаем конкретные элементы */
.calendar-card:hover,
.event-item:hover,
.btn:hover,
.calendar-day-cell:hover,
.event-badge:hover,
.btn-nav:hover,
.btn-create-calendar:hover,
.btn-back:hover,
.btn-edit:hover,
.add-event-link:hover,
.event-action-btn:hover {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    box-shadow: none !important;
}

/* Возвращаем только нужные цвета, без анимации */
.btn-create-calendar:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-nav:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.event-badge:hover {
    background: rgba(102, 126, 234, 0.2);
}

.calendar-day-cell:hover {
    background-color: #faf5ff;
}

.event-item:hover {
    background-color: #faf5ff;
}

/* Стили для выделения сообщения */
.message {
    cursor: pointer;
    transition: background 0.2s ease;
}

.message.selected {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.message:hover {
    background: rgba(102, 126, 234, 0.05);
}

.message .bg-primary.selected,
.message .bg-secondary.selected {
    opacity: 0.7;
}

.delete-mode-active .message {
    cursor: pointer;
}

.delete-mode-active .message:hover {
    background: rgba(220, 53, 69, 0.1);
}

.message-removing {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

/* Стили для изображений в сообщениях */
.message-image {
    transition: opacity 0.2s ease;
    border-radius: 8px;
    object-fit: cover;
}

.message-image:hover {
    opacity: 0.9;
}

.image-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.image-info i {
    font-size: 0.8rem;
}

.download-image {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.download-image:hover {
    color: white;
}

/* Документы */
.document-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 5px;
}

.document-message i {
    font-size: 1.5rem;
}

.document-details {
    flex: 1;
}

.document-details .file-name {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
}

.document-details .file-size {
    font-size: 0.65rem;
    opacity: 0.7;
}

.document-download {
    color: white;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.document-download:hover {
    transform: scale(1.1);
    color: white;
}

/* Аудио */
.audio-message {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 8px;
}

.audio-player {
    width: 100%;
    height: 36px;
    border-radius: 18px;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    margin-top: 5px;
}

/* Анимации отключены */
* {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

*:hover {
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* Отключаем прокрутку при открытии dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    max-height: none;
    overflow: visible;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        min-width: 180px;
        max-height: none;
        overflow: visible;
    }
    
    body.dropdown-open {
        overflow: auto !important;
        position: relative !important;
    }
}

.navbar {
    overflow: visible !important;
    position: relative;
}

.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: translateY(8px) !important;
    margin-top: 0 !important;
    z-index: 1050 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    min-width: 200px !important;
    border: none !important;
    overflow: visible !important;
}

.navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
    z-index: 1051;
}

.navbar .dropdown-item {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    color: #333 !important;
    transition: none !important;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.navbar .dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

.navbar .dropdown-menu,
.navbar .dropdown-item {
    transition: none !important;
    transform: none !important;
    animation: none !important;
}

.navbar,
.navbar .container,
.navbar .collapse,
.navbar .navbar-nav,
.navbar .dropdown {
    overflow: visible !important;
}

.navbar .container,
.navbar .container-fluid,
.navbar .navbar-collapse {
    overflow: visible !important;
}

.navbar .dropdown {
    position: relative !important;
}

.navbar .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    transform: translateY(8px) !important;
    margin-top: 0 !important;
    z-index: 9999 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    min-width: 200px !important;
    border: none !important;
    overflow: visible !important;
}

.navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.navbar .dropdown-item {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    color: #333 !important;
    white-space: nowrap !important;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.navbar .dropdown-item i {
    width: 20px;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        right: 20px !important;
        left: auto !important;
        transform: none !important;
    }
    
    .navbar .dropdown-menu::before {
        display: none;
    }
}

/* Стили для геолокации */
.location-message {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin-top: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-message:hover {
    background: rgba(255, 255, 255, 0.2);
}

.location-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-preview i {
    font-size: 1.5rem;
    color: #ff6b6b;
}

.location-info {
    flex: 1;
}

.location-address {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.location-coords {
    font-size: 0.65rem;
    opacity: 0.7;
}

.location-map-link {
    color: white;
    font-size: 0.8rem;
    text-decoration: none;
}

.location-map-link:hover {
    text-decoration: underline;
    color: white;
}

.location-modal-map {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.location-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

#locationModal .modal-dialog {
    max-width: 400px;
}

#locationModal .modal-content {
    border-radius: 16px;
    overflow: hidden;
}

#locationModal .modal-body {
    padding: 15px;
}

#locationModal .modal-footer {
    justify-content: flex-end;
    gap: 8px;
}

#locationModal .btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
}

#location-map {
    height: 180px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

#location-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 576px) {
    #locationModal .modal-dialog {
        max-width: 95%;
        margin: 10px;
    }
    
    #location-map {
        height: 150px;
    }
}

.location-message {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 5px;
    transition: background 0.2s ease;
}

.location-message:hover {
    background: rgba(255, 255, 255, 0.2);
}

.location-message .fa-map-marker-alt {
    color: #ff6b6b;
}

.message .bg-primary .location-message {
    background: rgba(255, 255, 255, 0.15);
}

.message .bg-secondary .location-message {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== АУДИО ЗАПИСЬ - ДИЗАЙН ДЛЯ ПК ========== */
.audio-recorder-panel {
    margin-top: 8px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 40px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.2s ease;
}

.audio-recording-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background-color: #ff4444;
    border-radius: 50%;
    animation: pulse 1s infinite;
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(255, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.audio-timer {
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3748;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
}

.audio-btn-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.audio-btn-circle:hover {
    transform: scale(1.05);
}

.audio-btn-circle:active {
    transform: scale(0.95);
}

.btn-stop-circle {
    background: linear-gradient(135deg, #f56565, #ed64a6);
    box-shadow: 0 2px 5px rgba(245, 101, 101, 0.3);
}

.btn-stop-circle:hover {
    background: linear-gradient(135deg, #ed64a6, #f56565);
    box-shadow: 0 3px 8px rgba(245, 101, 101, 0.4);
}

.btn-cancel-circle {
    background: linear-gradient(135deg, #a0aec0, #718096);
    box-shadow: 0 2px 5px rgba(160, 174, 192, 0.3);
}

.btn-cancel-circle:hover {
    background: linear-gradient(135deg, #718096, #4a5568);
    box-shadow: 0 3px 8px rgba(113, 128, 150, 0.4);
}

.btn-send-circle {
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 2px 5px rgba(72, 187, 120, 0.3);
}

.btn-send-circle:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    box-shadow: 0 3px 8px rgba(56, 161, 105, 0.4);
}

.btn-remove-circle {
    background: linear-gradient(135deg, #a0aec0, #718096);
    box-shadow: 0 2px 5px rgba(160, 174, 192, 0.3);
}

.btn-remove-circle:hover {
    background: linear-gradient(135deg, #718096, #4a5568);
    box-shadow: 0 3px 8px rgba(113, 128, 150, 0.4);
}

.audio-preview-panel {
    margin-top: 8px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 40px;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
}

.audio-icon-circle {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-icon-circle i {
    font-size: 0.9rem;
    color: white;
}

.audio-info-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: #667eea;
}

.audio-duration {
    font-family: monospace;
    font-size: 0.7rem;
    color: #718096;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 20px;
}

.audio-preview {
    width: 100px;
    height: 28px;
    border-radius: 20px;
}

/* Стили для списка устройств */
.devices-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
}

.device-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.device-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.device-item.current-device {
    border-left: 4px solid #48bb78;
    background: #f8fff8;
}

.device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.device-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 4px;
}

.device-details {
    font-size: 0.7rem;
    color: #718096;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.device-details span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.device-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 500;
}

.badge-current {
    background: #48bb78;
    color: white;
}

.badge-terminate {
    background: #dc3545;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-terminate:hover {
    background: #c82333;
    transform: scale(1.05);
}

.device-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.device-time {
    font-size: 0.65rem;
    color: #95a5a6;
}

.device-time i {
    margin-right: 4px;
}

.btn-terminate {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s;
}

.btn-terminate:hover {
    background: #dc3545;
    color: white;
}

@media (max-width: 768px) {
    .device-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .device-details {
        flex-direction: column;
        gap: 4px;
    }
    
    .device-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ФИКС ВЫПАДАЮЩЕГО МЕНЮ У КНОПКИ СОЗДАТЬ НА МОБИЛЬНЫХ ===== */
@media (max-width: 767px) {
    /* Контейнер для выпадающего меню */
    .navbar-nav .dropdown {
        position: relative !important;
    }
    
    /* Выпадающее меню */
    .navbar-nav .dropdown-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        margin-top: 5px !important;
        z-index: 9999 !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
        min-width: 180px !important;
        display: none !important;
        border: 1px solid #eef2f6 !important;
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block !important;
    }
    
    .navbar-nav .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 15px;
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid white;
        z-index: 1051;
    }
}

/* ===== МОБИЛЬНОЕ МЕНЮ ДЛЯ КНОПКИ +===== */
@media (max-width: 767px) {
    /* Контейнер формы ввода */
    #message-form {
        position: relative !important;
        z-index: 100 !important;
    }
    
    /* Контейнер с кнопками */
    #message-form .d-flex {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    /* Кнопка плюс */
    #mobile-actions-btn {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: white !important;
        border: 2px solid #667eea !important;
        color: #667eea !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 101 !important;
        transition: all 0.2s ease !important;
    }
    
    #mobile-actions-btn:active {
        background: #667eea !important;
        color: white !important;
        transform: scale(0.95) !important;
    }
    
    /* Скрываем десктопные кнопки */
    .desktop-actions {
        display: none !important;
    }
    
    .emoji-btn, .audio-record-btn, .attach-btn, .location-btn {
        display: none !important;
    }
    
    /* Мобильное меню */
    .mobile-action-menu {
        position: fixed !important;
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        padding: 8px 0 !important;
        display: none !important;
        z-index: 10000 !important;
        min-width: 180px !important;
        border: 1px solid rgba(102, 126, 234, 0.2) !important;
    }
    
    .mobile-action-menu.show {
        display: block !important;
        animation: menuFadeIn 0.2s ease !important;
    }
    
    @keyframes menuFadeIn {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-action-menu-item {
        padding: 12px 16px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        cursor: pointer !important;
        color: #2c3e50 !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        transition: background 0.2s ease !important;
    }
    
    .mobile-action-menu-item:active {
        background: #f5f7ff !important;
    }
    
    .mobile-action-menu-item i {
        width: 22px !important;
        color: #667eea !important;
        font-size: 1.1rem !important;
        text-align: center !important;
    }
    
    /* Поле ввода */
    .message-input,
    #message-input {
        flex: 1 !important;
        height: 40px !important;
        border-radius: 20px !important;
        font-size: 0.9rem !important;
        padding: 8px 15px !important;
        border: 2px solid #e2e8f0 !important;
        background: white !important;
    }
    
    /* Кнопка отправки */
    .send-btn,
    #send-message-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #667eea, #764ba2) !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3) !important;
    }
    
    .send-btn .send-text,
    #send-message-btn .send-text {
        display: none !important;
    }
    
    .send-btn i,
    #send-message-btn i {
        font-size: 1rem !important;
        margin: 0 !important;
        color: white !important;
    }
}

/* ===== ЭМОДЗИ-ПИКЕР ===== */
#emoji-picker-container {
    position: fixed;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #eef2f6;
    width: 280px;
    z-index: 10000;
    display: none;
}

#emoji-picker {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
}

#emoji-picker button {
    font-size: 1.5rem;
    padding: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#emoji-picker button:hover {
    background: #667eea;
    transform: scale(1.05);
    border-color: #667eea;
}

@media (max-width: 767px) {
    #emoji-picker-container {
        width: 260px;
        left: 10px !important;
        right: auto !important;
    }
}

/* ===== ЭМОДЗИ-ПИКЕР ===== */
#emoji-picker-container {
    position: fixed;
    bottom: 60px;
    left: 10px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #eef2f6;
    width: 280px;
    z-index: 10000;
    display: none;
}

#emoji-picker {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
}

#emoji-picker button {
    font-size: 1.5rem;
    padding: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#emoji-picker button:hover {
    background: #667eea;
    transform: scale(1.05);
    border-color: #667eea;
}

@media (max-width: 767px) {
    #emoji-picker-container {
        bottom: 70px;
        left: 10px;
        right: auto;
        width: 260px;
    }
}

/* ===== МОБИЛЬНЫЙ АУДИОПЛЕЕР (ТОЛЬКО ДЛЯ МОБИЛЬНЫХ) ===== */
@media (max-width: 767px) {
    /* Глобальный плеер */
    #globalPlayer {
        padding: 8px 12px !important;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
        backdrop-filter: blur(10px) !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    #globalPlayer > div {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    
    /* Информация о треке */
    #globalPlayer .d-flex:first-child {
        flex: 2 !important;
        min-width: 0 !important;
        gap: 8px !important;
    }
    
    #globalPlayer .d-flex:first-child > div:first-child {
        width: 32px !important;
        height: 32px !important;
        flex-shrink: 0 !important;
    }
    
    #globalPlayer .d-flex:first-child > div:first-child i {
        font-size: 1rem !important;
    }
    
    #globalPlayer .d-flex:first-child > div:last-child {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    #globalNowPlaying {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin-bottom: 2px !important;
    }
    
    #globalNowArtist {
        font-size: 0.55rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Кнопки управления */
    #globalPlayer .d-flex:nth-child(2) {
        gap: 6px !important;
        padding: 3px 10px !important;
        flex-shrink: 0 !important;
    }
    
    #globalPrevBtn, #globalNextBtn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
    }
    
    #globalPlayPauseBtn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
    
    /* Прогресс-бар */
    #globalPlayer .flex-grow-1 {
        flex: 3 !important;
        min-width: 80px !important;
    }
    
    #globalProgressBar {
        height: 3px !important;
    }
    
    #globalCurrentTime, #globalDuration {
        font-size: 0.55rem !important;
        font-family: monospace !important;
        min-width: 32px !important;
    }
    
    .d-flex.align-items-center.gap-2 {
        gap: 4px !important;
    }
    
    /* Громкость */
    #globalPlayer .d-flex:last-child {
        flex-shrink: 0 !important;
    }
    
    #globalPlayer .d-flex:last-child > div:first-child {
        display: none !important;
    }
    
    #globalPlayer .d-flex:last-child > div:last-child {
        width: 28px !important;
        height: 28px !important;
    }
    
    #globalPlayer .d-flex:last-child > div:last-child button {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
    }
    
    /* Скрываем громкость на мобильных */
    #globalVolumeBar {
        display: none !important;
    }
    
    #globalVolumeIcon {
        display: none !important;
    }
}

/* ===== КНОПКИ ЗАГОЛОВКА ЧАТА (ОБНОВИТЬ, УДАЛИТЬ, ЗАКРЫТЬ) ===== */
.chat-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.chat-header-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.chat-header-actions button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.chat-header-actions button:active {
    transform: scale(0.95);
}

.chat-header-actions button i {
    font-size: 0.8rem;
}

/* Для мобильных устройств */
@media (max-width: 767px) {
    .chat-header-actions {
        gap: 4px;
    }
    
    .chat-header-actions button {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .chat-header-actions button i {
        font-size: 0.7rem;
    }
}

/* ===== ГРУППОВЫЕ ЧАТЫ НА МОБИЛЬНЫХ ===== */
@media (max-width: 767px) {
    /* Аватар группы - круглый */
    .group-item .me-3 {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
    }
    
    .group-item .me-3 img,
    .group-item .me-3 .bg-secondary {
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        object-fit: cover !important;
    }
    
    /* Убираем аудиокнопку в групповых чатах */
    .group-chat .audio-record-btn {
        display: none !important;
    }
    
    /* Мобильное меню в групповых чатах - без аудио */
    .group-chat .mobile-action-menu .mobile-action-menu-item#mobile-audio-btn {
        display: none !important;
    }
}

