/**
 * Тёмная тема DumSound
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0C101E;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Основной контейнер - по умолчанию для гостей (центрирование) */
.app-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Стиль для авторизованных страниц (весь экран, без центрирования) */
.app-container.authorized {
    justify-content: flex-start;
    padding: 0;
}

/* Стиль для гостевых страниц (по центру) */
.app-container.guest {
    justify-content: center;
    padding: 32px 0 48px 0;
}

/* Заголовки страниц */
.registration-header,
.collection-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 10px 20px;
}

/* Специальный хедер для страницы профиля и коллекции — прилипает к верху */
.profile-header,
.collection-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px 20px;
}

/* Кнопка назад общая */
.back-button {
    position: absolute;
    left: 20px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1.8px solid #ffffff26;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:active {
    transform: scale(0.94);
    background: rgba(117, 125, 133, 0.15);
}

.back-button svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

/* Заголовки */
.registration-title,
.collection-title {
    color: white;
    font-size: 1.7rem;
    text-align: center;
    line-height: 0.9;
}

.profile-title {
    color: white;
    font-size: 1.9rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    white-space: normal;
    max-width: calc(100% - 60px);
    margin: 0 auto;
}

/* ========== СТРАНИЦА ЧАТОВ ========== */

/* Шапка чатов */
.chat-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px 20px;
    margin-bottom: 0;
}

.chat-header-title {
    color: white;
    font-size: 1.9rem;
    font-weight: 500;
}

.chat-header-buttons {
    display: flex;
    gap: 12px;
}

.header-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
}

.header-icon-btn.outline {
    border: 1.8px solid #ffffff26;
    background: transparent;
}

.header-icon-btn.outline svg {
    stroke: #757D85;
    width: 22px;
    height: 22px;
}

.header-icon-btn.filled {
    background-color: #676ED5;
    border: none;
}

.header-icon-btn.filled svg {
    stroke: white;
    width: 22px;
    height: 22px;
}

.header-icon-btn:active {
    transform: scale(0.94);
}

/* Табы навигации по чатам */
.chat-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
    margin-bottom: 16px;
}

.chat-tabs::-webkit-scrollbar {
    display: none;
}

.tab-item {
    padding: 6px 10px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-item {
    color: #757D85;
}

.tab-item.active {
    color: white;
}

.tab-item:active {
    transform: scale(0.96);
}

/* Список чатов */
.chat-list {
    flex: 1;
}

.list {
    padding: 0 20px;
}

/* Пустое состояние */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    stroke: #2a3139;
    margin-bottom: 20px;
}

.empty-state p {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state span {
    color: #757D85;
    font-size: 0.9rem;
}

/* ========== НИЖНЕЕ МЕНЮ ========== */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 28, 38, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    gap: 5px;
    z-index: 1000;
}

.nav-item {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #0C101E;
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke: #757D85;
    transition: all 0.2s ease;
}

.nav-item.active {
    background-color: #676ED5;
}

.nav-item.active svg {
    stroke: white;
}

.nav-item:active {
    transform: scale(0.94);
}

/* Остальные стили */
.title-wrapper {
    padding: 0 20px;
}

.app-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 500;
    color: #676ED5;
    text-shadow: 0 0 4px rgba(103, 110, 213, 0.3);
}

.waves-container {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    background: transparent;
    height: 150px;
    display: block;
    overflow: hidden;
}

.waves-wrapper {
    width: 100%;
    height: 220px;
    position: relative;
    margin: 0;
    padding: 0;
}

canvas.waves-canvas {
    display: block;
    width: 100%;
    height: 220px;
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

.content-wrapper {
    padding: 0 10px;
}

.welcome-text {
    text-align: center;
    color: white;
    font-size: 1.7rem;
    font-weight: 500;
    margin: 28px 0;
}

.buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.btn {
    border-radius: 60px;
    padding: 16px 20px;
    font-size: 1.1rem;
    text-align: center;
    cursor: pointer;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    border: 2px solid #676ED5;
    color: white;
    backdrop-filter: blur(2px);
}

.btn-outline:active {
    background: rgba(103, 110, 213, 0.15);
    transform: scale(0.98);
}

.register-slider {
    background-color: #676ED5;
    border-radius: 60px;
    position: relative;
    height: 64px;
    width: 100%;
    cursor: grab;
    transition: opacity 0.2s;
    overflow: hidden;
}

.register-slider:active {
    cursor: grabbing;
}

.register-slider.dimmed {
    opacity: 0.65;
}

.slider-bg-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.slider-thumb {
    position: absolute;
    left: 5px;
    top: 6px;
    width: 52px;
    height: 52px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 5;
    touch-action: none;
}

.register-slider.dragging .slider-thumb {
    transition: none;
}

.slider-thumb svg {
    width: 26px;
    height: 26px;
    color: #676ED5;
}

.field-label {
    display: block;
    color: #F2F2F2;
    font-size: 0.8rem;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.text-input {
    width: 100%;
    background: transparent;
    border: 1.8px solid #2a3139;
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 1rem;
    color: white;
    font-family: inherit;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    margin-bottom: 24px;
}

.text-input:focus {
    border-color: #676ED5;
    box-shadow: 0 0 0 2px rgba(103, 110, 213, 0.3);
}

.text-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.password-wrapper .text-input {
    margin-bottom: 0;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.toggle-password:active {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-password svg {
    width: 22px;
    height: 22px;
    stroke: #757D85;
    display: block;
    transition: stroke 0.2s ease;
}

.toggle-password.active svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

.error-message {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: -18px;
    margin-bottom: 12px;
    padding-left: 8px;
}

.next-button, .complete-button {
    width: 100%;
    background-color: #676ED5;
    border: none;
    border-radius: 60px;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-button:active, .complete-button:active {
    transform: scale(0.98);
    background-color: #565dc2;
}

.complete-button {
    width: calc(100% - 40px);
    position: fixed;
    bottom: 20px;
    left: 20px;
}

.avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
}

.avatar-button {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #2a3139;
    border: 2px solid #676ED5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.avatar-button:active {
    transform: scale(0.96);
}

.avatar-button svg {
    width: 36px;
    height: 36px;
    stroke: white;
}

.avatar-menu {
    position: absolute;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #121C26;
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.avatar-menu.active {
    opacity: 1;
    visibility: visible;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.menu-item svg {
    width: 20px;
    height: 20px;
    stroke: #9ba5b0;
}

.menu-divider {
    height: 1px;
    background: rgba(117, 125, 133, 0.2);
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 20px;
}

.avatar-option {
    aspect-ratio: 1 / 1;
    border-radius: 100%;
    overflow: hidden;
    background-color: #1a2532;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.avatar-option.selected {
    border: 2px solid #676ED5;
    box-shadow: 0 0 0 2px rgba(103, 110, 213, 0.3);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay-check {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.avatar-option.selected .overlay-check {
    display: flex;
}

.check-svg {
    width: 40px;
    height: 40px;
    stroke: white;
}

.done-button {
    width: calc(100% - 40px);
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #676ED5;
    border: none;
    border-radius: 60px;
    padding: 16px 20px;
    font-size: 1.1rem;
    color: white;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.done-button:active {
    transform: scale(0.98);
    background-color: #565dc2;
}

.custom-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23757D85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    color: white;
    cursor: pointer;
}

.custom-select option {
    background-color: #1a2532;
    color: white;
    padding: 12px;
}

.custom-select:focus {
    border-color: #676ED5;
    outline: none;
}

select.custom-select option {
    background-color: #1a2532 !important;
    color: white !important;
}

@-moz-document url-prefix() {
    .custom-select {
        background-color: #0C101E;
    }
    .custom-select option {
        background-color: #1a2532;
        color: white;
    }
}

select.custom-select::-ms-expand {
    display: none;
}

/* ========== СТРАНИЦА ПРОФИЛЯ ========== */

/* Шапка профиля */
.profile-page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.profile-page-title {
    color: white;
    font-size: 1.9rem;
    font-weight: 500;
    margin-left: 48px;
    flex: 1;
}

/* Контент профиля */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
}

/* Аватар */
.profile-avatar-wrapper {
    margin-bottom: 3px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #2a3139;
    border: 3px solid #676ED5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar svg {
    width: 45px;
    height: 45px;
    stroke: #757D85;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    text-align: center;
    margin-bottom: 0;
}

/* Реферальный блок */
.referral-section {
    margin-top: 24px;
    padding: 16px;
    background: rgba(103, 110, 213, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(103, 110, 213, 0.2);
    width: 100%;
}

.referral-title {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 12px;
    opacity: 0.8;
}

.referral-code-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.referral-code {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #676ED5;
    letter-spacing: 1px;
}

.copy-code-btn {
    background: #676ED5;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:active {
    transform: scale(0.94);
}

.referral-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.referral-stat {
    text-align: center;
    flex: 1;
}

.referral-stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #676ED5;
}

.referral-stat-label {
    font-size: 0.7rem;
    color: #757D85;
}

.share-referral-btn {
    width: 100%;
    margin-top: 12px;
    background: transparent;
    border: 1px solid #676ED5;
    border-radius: 10px;
    padding: 10px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-referral-btn:active {
    background: rgba(103, 110, 213, 0.2);
    transform: scale(0.98);
}

/* Реферальный список */
.referrals-list {
    margin-top: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    width: 100%;
}

.referrals-list-title {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(103, 110, 213, 0.3);
}

.referrals-items {
    max-height: 300px;
    overflow-y: auto;
}

.referral-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.referral-item-name {
    color: white;
    font-size: 0.9rem;
}

.referral-item-date {
    color: #757D85;
    font-size: 0.75rem;
}

.referral-item:last-child {
    border-bottom: none;
}

/* Онлайн статус пользователя */
.user-status {
    position: relative;
    display: inline-block;
}

.user-status .status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #6c757d;
    border: 2px solid #0C101E;
    transition: all 0.2s ease;
}

.user-status .status-indicator.online {
    background-color: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.user-status .status-indicator.offline {
    background-color: #6c757d;
}

/* Для аватара с индикатором статуса */
.avatar-with-status {
    position: relative;
    display: inline-block;
}

.avatar-with-status .status-dot {
    position: absolute;
    top: 2px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 4px solid #0c101e;
}

.avatar-with-status .status-dot.online {
    background-color: #22c55e;
}

.avatar-with-status .status-dot.offline {
    background-color: #6c757d;
}

/* Для списка чатов */
.chat-item-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 6px;
}

.chat-item-status.online {
    background-color: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.chat-item-status.offline {
    background-color: #6c757d;
}

/* ========== СТРАНИЦА ДИАЛОГА ========== */

.dialog-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #0C101E;
}

.dialog-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dialog-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    justify-content: flex-start;
    margin-left: 52px;
}

.dialog-avatar-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.dialog-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a2532;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dialog-avatar img,
.dialog-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dialog-avatar svg {
    stroke: #757D85;
    padding: 10px;
}

.user-status-dot {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #0C101E;
}

.user-status-dot.online {
    background-color: #22c55e;
}

.user-status-dot.offline {
    background-color: #6c757d;
}

.dialog-user-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Кнопка меню (три точки) */
.dialog-menu-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dialog-menu-button:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.94);
}

.dialog-menu-button svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

/* Оверлей меню */
.dialog-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.dialog-menu-panel {
    background: #1a2532;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 10px 0px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.dialog-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.dialog-menu-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.dialog-menu-item svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.dialog-menu-item.cancel {
    color: #ff6b6b;
}

.dialog-menu-item.cancel svg {
    stroke: #ff6b6b;
}

.dialog-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* Контейнер сообщений */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Разделитель дат */
.message-date-divider {
    font-size: 0.9rem;
    color: #757D85;
}

/* Сообщения */
.message-item {
    display: flex;
    margin-bottom: 4px;
}

.message-in {
    justify-content: flex-start;
}

.message-out {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.message-in .message-bubble {
    background: #1a2532;
    color: white;
    border-bottom-left-radius: 4px;
}

.message-out .message-bubble {
    background: #676ED5;
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-left: 8px;
    white-space: nowrap;
}

.message-out .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-read {
    margin-left: 4px;
}

.message-read svg {
    width: 12px;
    height: 12px;
    stroke: white;
}

/* Поле ввода - ОБНОВЛЁННОЕ */
.message-input-container {
    padding: 12px 16px;
    background: #0C101E;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.message-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    border-radius: 24px;
}

/* Новые кнопки в поле ввода */
.input-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.input-action-btn:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.94);
}

.input-action-btn svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    font-size: 0.95rem;
    color: white;
    font-family: inherit;
    resize: none;
    outline: none;
    max-height: 120px;
    line-height: 1.4;
}

.message-input::placeholder {
    color: #757D85;
}

.send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #676ED5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-button:active {
    transform: scale(0.94);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.send-button .mic-icon {
    stroke: white;
}

.loading-messages {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: #757D85;
    font-size: 0.8rem;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #2a3139;
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Дополнительный отступ для bottom-nav */
.bottom-nav-spacer {
    height: 90px;
    flex-shrink: 0;
}

/* ========== НОВЫЙ ЧАТ - ТЁМНАЯ ТЕМА ========== */

/* Страница нового чата */
.new-chat-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0C101E;
}

/* Заголовок */
.new-chat-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.new-chat-title {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 500;
    margin-left: 48px;
}

/* Контейнер поиска */
.search-container {
    padding: 16px 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    stroke: #757D85;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: none;
    border: 1.8px solid #ffffff26;
    border-radius: 10px;
    padding: 14px 20px 14px 48px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #676ED5;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clear-search {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-search svg {
    width: 18px;
    height: 18px;
    stroke: #757D85;
}

.clear-search:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Результаты поиска */
.search-results {
    flex: 1;
    padding: 0 20px;
    padding-bottom: 80px;
}

/* Секции результатов */
.results-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h3 {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.section-count {
    color: #676ED5;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(103, 110, 213, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Список контактов */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Элемент контакта */
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #0C101E;
}

.contact-item:active {
    background: #1a2532;
    transform: scale(0.98);
}

.contact-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #1a2532;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.contact-avatar svg {
    width: 28px;
    height: 28px;
    stroke: #757D85;
}

.contact-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-phone {
    color: #757D85;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Начальное и пустое состояние */
.initial-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.initial-state svg,
.empty-state svg {
    width: 80px;
    height: 80px;
    stroke: #2a3139;
    margin-bottom: 20px;
}

.initial-state p,
.empty-state p {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.initial-state span,
.empty-state span {
    color: #757D85;
    font-size: 0.85rem;
}

/* Состояние загрузки */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2a3139;
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #757D85;
    font-size: 0.9rem;
}

/* Toast уведомление */
.invite-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transition: transform 0.3s ease;
    border: 1px solid rgba(103, 110, 213, 0.3);
}

.invite-toast.show {
    transform: translateX(-50%) translateY(0);
}

.invite-toast svg {
    width: 20px;
    height: 20px;
}

.invite-toast span {
    color: #FFFFFF;
    font-size: 0.9rem;
}

.invite-toast-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #2a3139;
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Кнопка приглашения */
.invite-item {
    position: relative;
    flex-wrap: wrap;
}

.invite-avatar {
    background-color: rgba(103, 110, 213, 0.1);
}

.invite-avatar svg {
    stroke: #676ED5;
}

.invite-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(103, 110, 213, 0.15);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    color: #676ED5;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.invite-btn:active {
    transform: scale(0.96);
    background: rgba(103, 110, 213, 0.25);
}

/* ========== СТИЛИ ДЛЯ СПИСКА ЧАТОВ (ТЁМНАЯ ТЕМА) ========== */

.chat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    margin-bottom: 8px;
}

.chat-item:active {
    background: #1a2532;
    transform: scale(0.98);
    border-radius: 16px;
}

/* Обёртка аватара с индикатором поверх */
.chat-item-avatar-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.chat-item-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a2532;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-item-avatar img,
.chat-item-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-item-avatar svg {
    stroke: #757D85;
    padding: 14px;
}

/* Индикатор статуса поверх аватара (правый верхний угол) */
.chat-item-avatar-wrapper .status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #0C101E;
    z-index: 2;
}

.chat-item-avatar-wrapper .status-indicator.online {
    background-color: #22c55e;
}

.chat-item-avatar-wrapper .status-indicator.offline {
    background-color: #6c757d;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-name {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-message {
    color: #757D85;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item.unread .chat-item-name {
    font-weight: 600;
    color: #FFFFFF;
}

.chat-item.unread .chat-item-message {
    color: #9ba5b0;
}

.chat-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* Галочки прочтения */
.read-status-icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
}

.read-status-icon svg {
    width: 14px;
    height: 14px;
}

.read-status-icon.read-pending svg {
    stroke: #757D85;
}

.read-status-icon.read-done svg {
    stroke: #757D85;
}

/* Анимация печатает */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-text {
    color: #676ED5;
    font-size: 0.85rem;
}

.typing-dots {
    display: inline-flex;
    gap: 2px;
}

.typing-dots .dot {
    width: 4px;
    height: 4px;
    background: #676ED5;
    border-radius: 50%;
    animation: typingWave 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) { animation-delay: 0s; }
.typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingWave {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.chat-item-time {
    color: #757D85;
    font-size: 0.7rem;
}

.loading-chats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 12px;
    color: #757D85;
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 2px solid #2a3139;
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Иконка плюса для кнопки нового чата */
.header-icon-btn.filled svg {
    stroke: white;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ========== ИНДИКАТОР ПЕЧАТАЕТ ВНИЗУ ДИАЛОГА ========== */
.typing-indicator-bottom {
    position: fixed;
    bottom: 157px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    z-index: 15;
}

.typing-text-bottom {
    color: #676ED5;
    font-size: 0.75rem;
    font-weight: 500;
}

.typing-dots-bottom {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.typing-dots-bottom .dot {
    width: 4px;
    height: 4px;
    background: #676ED5;
    border-radius: 50%;
    animation: typingWaveBottom 1.4s infinite ease-in-out;
}

.typing-dots-bottom .dot:nth-child(1) { animation-delay: 0s; }
.typing-dots-bottom .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots-bottom .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingWaveBottom {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-3px); opacity: 1; }
}

/* ========== КАМЕРА OVERLAY ========== */
.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transform: scaleX(-1);
}

.camera-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 24px 20px 40px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 3001;
}

.camera-cancel-btn,
.camera-switch-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-cancel-btn:active,
.camera-switch-btn:active {
    transform: scale(0.94);
    background: rgba(255,255,255,0.3);
}

.camera-cancel-btn svg,
.camera-switch-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.camera-capture-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.camera-capture-btn:active {
    transform: scale(0.94);
}

.camera-capture-btn svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

/* ========== ПРОГРЕСС ЗАГРУЗКИ ФАЙЛОВ ========== */
.upload-progress {
    justify-content: flex-end;
}

.upload-progress .message-bubble {
    background: #1a2532;
    color: white;
    border-bottom-right-radius: 4px;
    padding: 12px 16px;
    min-width: 200px;
    position: relative;
}

.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.upload-icon {
    width: 32px;
    height: 32px;
    stroke: #676ED5;
}

.upload-info {
    flex: 1;
}

.upload-filename {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-status {
    font-size: 0.7rem;
    color: #757D85;
    margin-top: 2px;
}

.upload-progress-bar {
    height: 3px;
    background: #2a3139;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.upload-progress-fill {
    height: 100%;
    background: #676ED5;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.upload-cancel-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-cancel-btn:active {
    transform: scale(0.94);
    background: rgba(0,0,0,0.2);
}

.upload-cancel-btn svg {
    width: 14px;
    height: 14px;
    stroke: #757D85;
}

/* ========== СООБЩЕНИЯ С ФАЙЛАМИ ========== */
.message-image {
    padding: 0 !important;
    overflow: hidden;
    max-width: 250px;
}

.message-image-preview {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.message-image .message-time {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.65rem;
    color: white;
}

.message-video {
    padding: 0 !important;
    overflow: hidden;
    max-width: 250px;
}

.message-video-preview {
    width: 100%;
    max-height: 250px;
    display: block;
}

.message-video .message-time {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.65rem;
    color: white;
}

/* Круговой индикатор загрузки */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-fill {
    transition: stroke-dashoffset 0.3s ease;
}

.upload-cancel-circle {
    transition: transform 0.2s ease, background 0.2s ease;
}

.upload-cancel-circle:active {
    transform: translate(-50%, -50%) scale(0.94);
    background: rgba(0,0,0,0.8);
}

/* ========== ПАКЕТНАЯ ЗАГРУЗКА ФОТО ========== */

.batch-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background-color: #1a2532;
    border-radius: 16px;
    overflow: hidden;
}

.batch-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #2a3139;
}

.batch-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.batch-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.batch-file-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.batch-file-checkmark svg,
.batch-file-error svg {
    width: 20px;
    height: 20px;
}

.batch-extra-count {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 0;
}

.batch-extra-count span:first-child {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.batch-extra-count span:last-child {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.batch-progress-container {
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
}

.batch-progress-text {
    font-size: 0.75rem;
    color: white;
    margin-bottom: 8px;
}

.batch-progress-bar {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.batch-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #676ED5;
    transition: width 0.3s ease;
}

.message-out .batch-bubble {
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    max-width: 280px;
    padding: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== КОЛЛАЖ ДЛЯ НЕСКОЛЬКИХ ФОТО ========== */

.message-collage {
    padding: 0 !important;
    overflow: hidden;
    max-width: 280px;
    border-radius: 16px;
    position: relative;
}

.batch-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: #2a3139;
}

.batch-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.batch-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.batch-file-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.batch-file-checkmark svg,
.batch-file-error svg {
    width: 20px;
    height: 20px;
}

.batch-progress-container {
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
}

.batch-progress-text {
    font-size: 0.75rem;
    color: white;
    margin-bottom: 8px;
}

.batch-progress-bar {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.batch-progress-fill {
    width: 0%;
    height: 100%;
    background-color: #676ED5;
    transition: width 0.3s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Круговой индикатор для пакетной загрузки */
.batch-file-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 0;
}

.batch-cancel-btn {
    transition: transform 0.2s ease, background 0.2s ease;
}

.batch-cancel-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.9);
}

.batch-percent {
    font-family: monospace;
}

/* ========== ПРОСМОТРЩИК ИЗОБРАЖЕНИЙ ========== */

.image-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: imageViewerFadeIn 0.2s ease;
}

@keyframes imageViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: 10;
    pointer-events: none;
}

.image-viewer-header button,
.image-viewer-footer button {
    pointer-events: auto;
}

.image-viewer-spacer {
    width: 40px;
}

.image-viewer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-viewer-close:active {
    transform: scale(0.94);
    background: rgba(255,255,255,0.2);
}

.image-viewer-close svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.image-viewer-counter {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    background: rgba(0,0,0,0.5);
    padding: 6px 16px;
    border-radius: 30px;
}

.image-viewer-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    touch-action: pan-x pan-y;
}

.image-viewer-slider {
    display: flex;
    height: 100%;
    will-change: transform;
    touch-action: pan-y;
}

.image-viewer-slide {
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y;
}

.image-viewer-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    will-change: transform;
    touch-action: none;
}

.image-viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    touch-action: none;
}

.image-viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    z-index: 10;
    pointer-events: none;
}

.image-viewer-download,
.image-viewer-share {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.image-viewer-download:active,
.image-viewer-share:active {
    transform: scale(0.94);
    background: rgba(255,255,255,0.2);
}

.image-viewer-download svg,
.image-viewer-share svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.image-viewer-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.image-viewer-toast.show {
    transform: translateX(-50%) translateY(0);
}

.image-viewer-toast svg {
    width: 18px;
    height: 18px;
}

.image-viewer-toast span {
    color: white;
    font-size: 0.85rem;
}

/* ========== ВИДЕО СООБЩЕНИЯ ========== */

.message-video {
    padding: 0 !important;
    overflow: hidden;
    max-width: 250px;
    border-radius: 16px;
    position: relative;
}

.message-video video {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.message-video .message-time {
    position: absolute;
    bottom: 8px;
    left: 12px;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.65rem;
    color: white;
}

.video-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 16px;
}

/* ========== ВИДЕО ПРОСМОТРЩИК НА ВЕСЬ ЭКРАН ========== */

.video-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    --video-brightness: 1;
    animation: videoViewerFadeIn 0.2s ease;
}

@keyframes videoViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    z-index: 20;
    transition: opacity 0.3s ease;
}

.video-viewer-header.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-viewer-controls-left,
.video-viewer-controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-viewer-title {
    color: white;
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-viewer-close,
.video-viewer-fullscreen,
.video-viewer-download,
.video-viewer-share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-viewer-close:active,
.video-viewer-fullscreen:active,
.video-viewer-download:active,
.video-viewer-share:active {
    transform: scale(0.94);
    background: rgba(0,0,0,0.7);
}

.video-viewer-close svg,
.video-viewer-fullscreen svg,
.video-viewer-download svg,
.video-viewer-share svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.video-viewer-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.video-viewer-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-viewer-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: brightness(var(--video-brightness));
}

.video-viewer-controls-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 20px;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.video-viewer-controls-bottom.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Прогресс бар */
.video-progress-container {
    padding: 8px 0;
    cursor: pointer;
}

.video-progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    cursor: pointer;
}

.video-progress-buffer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,0.5);
    border-radius: 2px;
    width: 0%;
}

.video-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #676ED5;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.video-progress-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-progress-bar:hover .video-progress-handle {
    opacity: 1;
}

/* Панель управления */
.video-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.video-controls-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.video-play-pause {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-play-pause:active {
    transform: scale(0.94);
    background: rgba(255,255,255,0.3);
}

.video-play-pause svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: white;
}

.video-time-display {
    color: white;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
}

/* Индикатор жеста */
.video-gesture-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 30;
    min-width: 120px;
}

.gesture-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.gesture-value {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.video-viewer-gesture-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    background: transparent;
}

/* Индикатор буферизации */
.video-buffering {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 25;
}

.video-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #676ED5;
    border-radius: 50%;
    animation: videoSpinnerSpin 0.8s linear infinite;
}

@keyframes videoSpinnerSpin {
    to { transform: rotate(360deg); }
}

/* Toast для видео просмотрщика */
.video-viewer-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.video-viewer-toast.show {
    transform: translateX(-50%) translateY(0);
}

.video-viewer-toast svg {
    width: 18px;
    height: 18px;
}

.video-viewer-toast span {
    color: white;
    font-size: 0.85rem;
}

/* Полноэкранный режим */
.video-viewer-overlay:fullscreen {
    background: #000;
}

.video-viewer-overlay:fullscreen .video-viewer-video {
    max-width: 100vw;
    max-height: 100vh;
}

.video-viewer-overlay:-webkit-full-screen {
    background: #000;
}

.video-viewer-rotate svg {
    width: 20px;
    height: 20px;
}

/* Единый стиль для всех кнопок в шапке видео просмотрщика */
.video-viewer-close,
.video-viewer-rotate,
.video-viewer-fullscreen,
.video-viewer-download,
.video-viewer-share {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-viewer-close:active,
.video-viewer-rotate:active,
.video-viewer-fullscreen:active,
.video-viewer-download:active,
.video-viewer-share:active {
    transform: scale(0.94);
    background: rgba(0, 0, 0, 0.7);
}

.video-viewer-close svg,
.video-viewer-rotate svg,
.video-viewer-fullscreen svg,
.video-viewer-download svg,
.video-viewer-share svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

/* Активное состояние для кнопки поворота (когда экран повернут) */
.video-viewer-rotate.active {
    background: #676ED5;
}

/* Toast для ShareHelper */
.share-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
}

.share-toast svg {
    width: 18px;
    height: 18px;
}

.share-toast span {
    color: white;
    font-size: 0.85rem;
}

/* ========== ФАЙЛЫ В СООБЩЕНИЯХ ========== */

.message-file {
    padding: 12px !important;
    background: var(--bg-secondary) !important;
    border-radius: 16px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.message-file:active {
    transform: scale(0.98);
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-icon svg {
    width: 32px;
    height: 32px;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.file-download-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(103, 110, 213, 0.1);
    border-radius: 50%;
}

.file-download-icon svg {
    width: 16px;
    height: 16px;
    stroke: #676ED5;
}

.file-upload-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-progress-circle {
    position: relative;
    width: 40px;
    height: 40px;
}

.progress-ring-svg {
    width: 40px;
    height: 40px;
}

.progress-ring-fill-file {
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    fill: white;
    font-size: 10px;
    font-weight: bold;
}

.file-cancel-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-cancel-btn:active {
    transform: scale(0.94);
}

.temp-file .message-bubble {
    background: var(--bg-secondary) !important;
}

/* ========== ПРОСМОТРЩИК ДОКУМЕНТОВ ========== */

.document-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: documentViewerFadeIn 0.2s ease;
}

@keyframes documentViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.document-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: 10;
}

.document-viewer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-viewer-close:active {
    transform: scale(0.94);
    background: rgba(0, 0, 0, 0.7);
}

.document-viewer-close svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.document-viewer-title {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.document-viewer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.document-preview {
    text-align: center;
    margin-bottom: 40px;
}

.document-icon svg {
    width: 80px;
    height: 80px;
    stroke: #676ED5;
}

.document-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 20px;
    word-break: break-all;
    max-width: 280px;
}

.document-type {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 8px;
}

.document-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
}

.document-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-action-btn:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.2);
}

.document-action-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.document-viewer-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.document-viewer-toast.show {
    transform: translateX(-50%) translateY(0);
}

.document-viewer-toast svg {
    width: 18px;
    height: 18px;
}

.document-viewer-toast span {
    color: white;
    font-size: 0.85rem;
}

/* ========== ГОЛОСОВЫЕ СООБЩЕНИЯ - ОРИГИНАЛЬНЫЕ ЦВЕТА ========== */

.voice-progress-ring-container {
    transition: all 0.2s ease;
}

.voice-play-overlay {
    transition: all 0.2s ease;
}

.voice-play-overlay:active {
    transform: translate(-50%, -50%) scale(0.92);
}

.voice-progress-ring {
    transition: stroke-dashoffset 0.05s linear;
}

.voice-duration-modern {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.voice-time-modern {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.voice-error-toast {
    animation: voiceToastSlideUp 0.3s ease;
}

@keyframes voiceToastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (hover: hover) {
    .voice-play-overlay:hover {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* ========== ОЧИСТКА ИСТОРИИ - ДИАЛОГ ПОДТВЕРЖДЕНИЯ (ТЁМНАЯ ТЕМА) ========== */

.clear-history-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.clear-history-confirm-panel {
    background: #1a2532;
    border-radius: 28px;
    width: 90%;
    max-width: 320px;
    padding: 24px 20px 20px;
    text-align: center;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(103, 110, 213, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.clear-history-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(255, 107, 107, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-history-confirm-icon svg {
    width: 32px;
    height: 32px;
    stroke: #ff6b6b;
}

.clear-history-confirm-panel h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.clear-history-confirm-panel p {
    color: #9ba5b0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.clear-history-warning {
    color: #ff6b6b !important;
    font-weight: 500;
    margin-top: 12px;
}

.clear-history-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.clear-history-cancel-btn,
.clear-history-confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: 60px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.clear-history-cancel-btn {
    background: #2a3139;
    color: #ffffff;
}

.clear-history-cancel-btn:active {
    background: #3a4350;
    transform: scale(0.97);
}

.clear-history-confirm-btn {
    background: #ff6b6b;
    color: white;
}

.clear-history-confirm-btn:active {
    background: #ff5252;
    transform: scale(0.97);
}

/* ========== БЛОКИРОВКА - ДИАЛОГ ПОДТВЕРЖДЕНИЯ (ТЁМНАЯ ТЕМА) ========== */

.block-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.block-confirm-panel {
    background: #1a2532;
    border-radius: 28px;
    width: 90%;
    max-width: 320px;
    padding: 24px 20px 20px;
    text-align: center;
    animation: slideUp 0.3s ease;
    border: 1px solid rgba(103, 110, 213, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.block-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-confirm-icon svg {
    width: 32px;
    height: 32px;
}

.block-icon-danger {
    background: rgba(255, 107, 107, 0.15);
}

.block-icon-danger svg {
    stroke: #ff6b6b;
}

.block-icon-success {
    background: rgba(34, 197, 94, 0.15);
}

.block-icon-success svg {
    stroke: #22c55e;
}

.block-confirm-panel h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.block-confirm-panel p {
    color: #9ba5b0;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.block-confirm-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.block-confirm-cancel-btn,
.block-confirm-btn {
    flex: 1;
    padding: 12px;
    border-radius: 60px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.block-confirm-cancel-btn {
    background: #2a3139;
    color: #ffffff;
}

.block-confirm-cancel-btn:active {
    background: #3a4350;
    transform: scale(0.97);
}

.block-confirm-btn-danger {
    background: #ff6b6b;
    color: white;
}

.block-confirm-btn-danger:active {
    background: #ff5252;
    transform: scale(0.97);
}

.block-confirm-btn-success {
    background: #22c55e;
    color: white;
}

.block-confirm-btn-success:active {
    background: #16a34a;
    transform: scale(0.97);
}

/* ========== TOAST УВЕДОМЛЕНИЯ (ТЁМНАЯ ТЕМА) ========== */

.clear-history-toast,
.block-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
    backdrop-filter: blur(10px);
}

.clear-history-toast.show,
.block-toast.show {
    transform: translateX(-50%) translateY(0);
}

.clear-history-toast svg,
.block-toast svg {
    width: 18px;
    height: 18px;
}

.clear-history-toast span,
.block-toast span {
    color: #ffffff;
    font-size: 0.85rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ========== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ЗАБЛОКИРОВАННОГО СОСТОЯНИЯ ========== */

.message-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button:disabled,
.input-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.send-button:disabled:active,
.input-action-btn:disabled:active {
    transform: none;
}

/* Стиль для заблокированного сообщения в чате */
.message-blocked-info {
    text-align: center;
    padding: 20px;
    color: #9ba5b0;
    font-size: 0.85rem;
    background: rgba(103, 110, 213, 0.05);
    border-radius: 16px;
    margin: 20px;
}

.message-blocked-info svg {
    width: 32px;
    height: 32px;
    stroke: #ff6b6b;
    margin-bottom: 8px;
}


/* Выпадающее меню действий */
.message-actions-dropdown {
    position: absolute;
    bottom: 100%;
    margin-bottom: 8px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.message-actions-list {
    display: flex;
    flex-direction: column;
}

.message-actions-list button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.message-actions-list button:hover {
    background: var(--bg-secondary);
}

.message-actions-list button svg {
    flex-shrink: 0;
}

/* Индикатор ответа в поле ввода */
.reply-indicator {
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-left: 3px solid var(--accent-color);
}

.reply-indicator-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reply-indicator-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.reply-indicator-info svg {
    flex-shrink: 0;
}

.reply-indicator-info strong {
    color: var(--accent-color);
}

.reply-indicator-preview {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 8px;
}

.reply-indicator-cancel {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.reply-indicator-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--error-color);
}

/* Сообщение с ответом */
.message-with-reply {
    position: relative;
}

.reply-preview {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent-color);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reply-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: var(--accent-color);
    font-weight: 500;
}

.reply-preview-header svg {
    width: 12px;
    height: 12px;
}

.reply-preview-text {
    color: var(--text-secondary);
    word-break: break-word;
}

.reply-preview-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

/* Индикатор "изменено" */
.message-edited {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-left: 4px;
    font-style: italic;
}

/* Сообщение "переслано" */
.message-forwarded {
    position: relative;
}

.forward-preview {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.forward-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: #22c55e;
    font-weight: 500;
}

.forward-preview-text {
    color: var(--text-secondary);
    word-break: break-word;
}

.forward-preview-image {
    margin-top: 8px;
}

.forward-preview-image img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 8px;
}

/* ========== МОДАЛЬНОЕ ОКНО РЕДАКТИРОВАНИЯ ========== */
.edit-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.edit-message-panel {
    background: var(--bg-primary);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.edit-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.edit-message-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0;
}

.edit-message-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.edit-message-close:hover {
    background: var(--bg-secondary);
}

.edit-message-textarea {
    width: 100%;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    outline: none;
}

.edit-message-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 107, 107, 0.1);
    font-size: 0.7rem;
    color: #ff6b6b;
}

.edit-message-buttons {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.edit-message-cancel,
.edit-message-save {
    flex: 1;
    padding: 12px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.edit-message-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.edit-message-save {
    background: var(--accent-color);
    color: white;
}

.edit-message-cancel:hover,
.edit-message-save:hover {
    transform: scale(0.98);
}

/* ========== МОДАЛЬНОЕ ОКНО ПЕРЕСЫЛКИ ========== */
.forward-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.forward-message-panel {
    background: var(--bg-primary);
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.forward-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.forward-message-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0;
}

.forward-message-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.forward-message-preview {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.forward-preview-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #22c55e;
    font-size: 0.75rem;
}

.forward-preview-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    word-break: break-word;
}

.forward-preview-image img {
    max-width: 100%;
    max-height: 80px;
    border-radius: 8px;
    margin-top: 8px;
}

.forward-preview-video,
.forward-preview-voice,
.forward-preview-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.forward-message-input {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.forward-message-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.2s ease;
}

.forward-message-textarea:focus {
    border-color: var(--accent-color);
}

.forward-message-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.forward-message-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.forward-message-contacts {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.forward-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.forward-contact-item:hover {
    background: var(--bg-secondary);
}

.forward-contact-item.selected {
    background: var(--accent-color);
}

.forward-contact-item.selected .forward-contact-name,
.forward-contact-item.selected .forward-contact-message {
    color: white;
}

.forward-contact-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.forward-contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forward-contact-avatar svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-secondary);
}

.forward-contact-info {
    flex: 1;
    min-width: 0;
}

.forward-contact-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.forward-contact-message {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forward-message-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.forward-message-empty svg {
    margin-bottom: 12px;
    stroke: var(--text-secondary);
}

.forward-message-buttons {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.forward-message-cancel,
.forward-message-send {
    flex: 1;
    padding: 12px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.forward-message-cancel {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.forward-message-send {
    background: var(--accent-color);
    color: white;
}

.forward-message-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Toast уведомления */
.message-actions-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-primary);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.message-actions-toast.show {
    transform: translateX(-50%) translateY(0);
}

.message-actions-toast svg {
    width: 18px;
    height: 18px;
}

.message-actions-toast span {
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toast для контекстного меню */
.context-menu-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-primary);
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.context-menu-toast.show {
    transform: translateX(-50%) translateY(0);
}

.context-menu-toast svg {
    width: 18px;
    height: 18px;
}

.context-menu-toast span {
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* ========== ВЫДВИЖНОЕ МЕНЮ ========== */

.slide-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
}

.slide-menu-panel {
    width: 100%;
    max-width: 320px;
    background: #0C101E;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px var(--shadow-color);
}

.slide-menu-panel.open {
    transform: translateX(0);
}

.slide-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    background: var(--bg-header);
}

.slide-menu-title {
    color: white;
    font-size: 1.9rem;
    font-weight: 600;
    margin: 0;
}

.slide-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1.8px solid #ffffff26;
    background: transparent;
}

.slide-menu-close:active {
    border: 1.8px solid #ffffff26;
    background: transparent;
}

.slide-menu-close svg {
    width: 24px;
    height: 24px;
    stroke: #757D85;
}

.slide-menu-items {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
}

.slide-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    margin: 0 16px 8px;
    padding: 16px 20px;
    background: transparent;
    border: 1.8px solid #ffffff26;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 1rem;
    color: white;
}

.slide-menu-item:active {
    transform: scale(0.98);
    background: var(--bg-secondary);
}

.slide-menu-item span {
    font-weight: 500;
}

.slide-menu-item svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
    transition: transform 0.2s ease;
}

.slide-menu-item:active svg {
    transform: translateX(4px);
}

/* Адаптация для мобильных устройств */
@media (max-width: 480px) {
    .slide-menu-panel {
        max-width: 100%;
    }
    
    .slide-menu-item {
        padding: 18px 18px;
        margin: 0 12px 10px;
        width: calc(100% - 24px);
    }
}

.unread-badge {
    background: #676ed5;
    width: 20px;
    height: 20px;
    display: flex;
    color: white;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

/* ========== СТРАНИЦА ПОИСКА ========== */

.search-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0C101E;
}

.search-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 8px 20px;
    margin-bottom: 0;
}

.search-title {
    color: var(--text-primary);
    font-size: 1.9rem;
    font-weight: 500;
    margin-left: 48px;
}

.search-input-container {
    padding: 2px 20px 2px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: none;
    border-radius: 10px;
    padding: 0 16px;
    border: 1.8px solid #ffffff26;
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: #676ED5;
    box-shadow: 0 0 0 2px rgba(103, 110, 213, 0.3);
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: #757D85;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-query-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    font-size: 1rem;
    color: #FFFFFF;
    font-family: inherit;
    outline: none;
}

.search-query-input::placeholder {
    color: #757D85;
}

.search-microphone-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background-color: #676ED5;
    border: none;
}

.search-microphone-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

.search-microphone-btn.recording {
    background: rgba(255, 68, 68, 0.2);
}

.search-microphone-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.search-microphone-btn.recording svg {
    stroke: red;
}

/* Фильтры */
.search-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
    margin-bottom: 16px;
}

.search-filters::-webkit-scrollbar {
    display: none;
}

.filter-item.active {
    color: #FFFFFF;
}

.filter-item:active {
    transform: scale(0.96);
}

.search-results {
    min-height: 200px;
    padding-top: 10px;
}

.search-initial svg,
.search-empty svg {
    width: 80px;
    height: 80px;
    stroke: #2a3139;
    margin-bottom: 20px;
}

.search-initial p,
.search-empty p {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.search-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #757D85;
}

.search-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 5px 4px;
}

.search-section-header h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.search-section-count {
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 500;
    background: rgb(103 110 213);
    padding: 2px 8px;
    border-radius: 20px;
    color: white;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-header h3 {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.section-count {
    color: #676ED5;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(103, 110, 213, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Сообщения */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-message-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 3px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.search-message-item:active {
    background: #1a2532;
    transform: scale(0.98);
}

.search-message-avatar-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.search-message-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a2532;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-message-avatar img,
.search-message-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-message-avatar svg {
    stroke: #757D85;
    padding: 12px;
}

.search-message-avatar-wrapper .status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #0C101E;
}

.search-message-avatar-wrapper .status-indicator.online {
    background-color: #22c55e;
}

.search-message-avatar-wrapper .status-indicator.offline {
    background-color: #6c757d;
}

.search-message-info {
    flex: 1;
    min-width: 0;
}

.search-message-name {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.search-message-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #9ba5b0;
    margin-bottom: 4px;
}

.search-message-highlight {
    color: #676ED5;
    font-weight: 500;
}

.search-message-separator {
    color: #2a3139;
}

.search-message-date {
    color: #9ba5b0;
}

.message-preview {
    font-size: 0.7rem;
    color: #757D85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-message-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.search-message-time {
    font-size: 0.7rem;
    color: #757D85;
}

.empty-messages {
    text-align: center;
    padding: 40px;
    color: #757D85;
    font-size: 0.9rem;
}

/* Треки (заглушка) */
.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: #1a2532;
    border-radius: 20px;
    margin-top: 20px;
}

.coming-soon svg {
    width: 60px;
    height: 60px;
    stroke: #676ED5;
    margin-bottom: 16px;
}

.coming-soon p {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.coming-soon span {
    color: #757D85;
    font-size: 0.85rem;
}

/* Toast */
.search-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
    backdrop-filter: blur(10px);
}

.search-toast.show {
    transform: translateX(-50%) translateY(0);
}

.search-toast svg {
    width: 18px;
    height: 18px;
}

.search-toast span {
    color: #ffffff;
    font-size: 0.85rem;
}

/* ========== СТРАНИЦА ПОИСКА ========== */

.search-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0C101E;
}

.search-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.search-title {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 500;
    margin-left: 48px;
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: #757D85;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-query-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    font-size: 1rem;
    color: #FFFFFF;
    font-family: inherit;
    outline: none;
}

.search-query-input::placeholder {
    color: #757D85;
}

.filter-item {
    padding: 8px 10px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    background: transparent;
    border: none;
    color: #757D85;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-item.active {
    color: #FFFFFF;
}

.filter-item:active {
    transform: scale(0.96);
}

.search-results-container {
    flex: 1;
    padding-bottom: 80px;
}

.search-results {
    min-height: 200px;
}

.search-initial,
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    float: left;
}
.search-initial svg,
.search-empty svg {
    width: 80px;
    height: 80px;
    stroke: #2a3139;
    margin-bottom: 20px;
}

.search-initial p,
.search-empty p {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.search-initial span,
.search-empty span {
    color: #757D85;
    font-size: 1.1rem;
}

.search-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #757D85;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-header h3 {
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.section-count {
    color: #676ED5;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(103, 110, 213, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-message-avatar-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.search-message-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1a2532;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.search-message-avatar img,
.search-message-avatar svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-message-avatar svg {
    stroke: #757D85;
    padding: 12px;
}

.search-message-avatar-wrapper .status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #0C101E;
}

.search-message-avatar-wrapper .status-indicator.online {
    background-color: #22c55e;
}

.search-message-avatar-wrapper .status-indicator.offline {
    background-color: #6c757d;
}

.search-message-info {
    flex: 1;
    min-width: 0;
}

.search-message-name {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.search-message-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #9ba5b0;
    margin-bottom: 4px;
}

.search-message-highlight {
    color: #676ED5;
    font-weight: 500;
}

.search-message-separator {
    color: #2a3139;
}

.search-message-date {
    color: #9ba5b0;
}

.message-preview {
    font-size: 0.7rem;
    color: #757D85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-message-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.search-message-time {
    font-size: 0.7rem;
    color: #757D85;
}

.empty-messages {
    text-align: center;
    padding: 40px;
    color: #757D85;
    font-size: 0.9rem;
}

.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: 20px;
}

.coming-soon svg {
    width: 60px;
    height: 60px;
    stroke: #676ED5;
    margin-bottom: 16px;
}

.coming-soon p {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.coming-soon span {
    color: #757D85;
    font-size: 0.85rem;
}

.search-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
    backdrop-filter: blur(10px);
}

.search-toast.show {
    transform: translateX(-50%) translateY(0);
}

.search-toast svg {
    width: 18px;
    height: 18px;
}

.search-toast span {
    color: #ffffff;
    font-size: 0.85rem;
}

.search-highlight {
    color: #FFFFFF;
    font-weight: 500;
    background: transparent;
}

/**
 * Стили для страницы "Моя музыка" - ТЁМНАЯ ТЕМА
 */

/* ========== ЗАГОЛОВОК ========== */
.music-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #0C101E;
}

.music-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #0C101E;
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.back-button-music {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1.8px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button-music:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

.back-button-music svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

.music-title {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 600;
    margin-left: 16px;
}

/* ========== ПАНЕЛЬ УПРАВЛЕНИЯ ========== */
.music-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 12px;
}

.music-control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #757D85;
    font-size: 0.9rem;
}

.music-control-btn svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

.music-control-btn:active {
    transform: scale(0.96);
    background: #1a2532;
}

.play-all-btn svg {
    stroke: #757D85;
}

.add-btn svg {
    stroke: #757D85;
}

.music-view-buttons {
    display: flex;
    gap: 8px;
}

.music-view-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.music-view-btn svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

.music-view-btn.active svg {
    stroke: white;
}

.music-view-btn:active {
    transform: scale(0.94);
}

/* ========== ПОИСК ========== */
.music-search-container {
    padding: 12px 20px;
}

.music-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: none;
    border-radius: 12px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.music-search-box:focus-within {
    border-color: #676ED5;
    box-shadow: 0 0 0 2px rgba(103, 110, 213, 0.3);
}

.music-search-icon {
    width: 20px;
    height: 20px;
    stroke: #757D85;
    margin-right: 12px;
    flex-shrink: 0;
}

.music-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    font-size: 1rem;
    color: #FFFFFF;
    font-family: inherit;
    outline: none;
}

.music-search-input::placeholder {
    color: #757D85;
}

.music-search-clear {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.music-search-clear svg {
    width: 18px;
    height: 18px;
    stroke: #757D85;
}

.music-search-clear:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== КОНТЕЙНЕР ТРЕКОВ ========== */
.music-tracks-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px;
    padding-bottom: 80px;
    max-height: calc(100vh - 180px);
    /* Плавный скролл */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Для страницы музыки */
.music-page {
    display: flex;
    flex-direction: column;
    height: 100;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Убираем лишние паддинги */
.music-page .music-tracks-container {
    flex: 1;
    overflow-y: auto;
}

.loading-tracks {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 40px;
    color: #757D85;
}

.empty-tracks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-tracks svg {
    width: 80px;
    height: 80px;
    stroke: #2a3139;
    margin-bottom: 20px;
}

.empty-tracks p {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-tracks span {
    color: #757D85;
    font-size: 0.9rem;
}

/* ========== СПИСОК ТРЕКОВ (ОДИН СТОЛБЕЦ) ========== */
.track-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.track-list-item:active {
    background: #1a2532;
}

.track-list-item.playing {
    background: rgba(103, 110, 213, 0.15);
}

/* Обложка в списке */
.track-list-cover {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #2a3139;
}

.track-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-list-cover .track-cover-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-list-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 12px;
    cursor: pointer;
}

.track-list-item:hover .track-list-play-overlay,
.track-list-item:active .track-list-play-overlay {
    opacity: 1;
}

.track-list-play-overlay svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.track-list-info {
    flex: 1;
    min-width: 0;
}

.track-list-title {
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-list-artist {
    color: #9ba5b0;
    font-size: 0.75rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-list-duration {
    color: #757D85;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.track-list-menu {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.track-list-menu svg {
    width: 18px;
    height: 18px;
    stroke: #757D85;
}

.track-list-menu:active {
    background: #1a2532;
}

/* ========== ДВУХКОЛОНОЧНЫЙ СПИСОК ТРЕКОВ (ТЁМНАЯ ТЕМА) - ИСПРАВЛЕННЫЙ ========== */

/* Основной контейнер страницы музыки */
.music-page {
    overflow-x: hidden;
}

/* Контейнер для списков треков */
.music-tracks-container {
    overflow-x: hidden;
    padding-left: 16px;
    padding-right: 16px;
}

/* Двухколоночная布局 */
.two-columns-layout {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    overflow-x: hidden;
}

/* Каждая колонка */
.track-column {
    flex: 1;
    min-width: 0; /* Важно! Позволяет колонке сжиматься */
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-x: hidden;
}

/* Элемент трека в двух колонках */
.track-two-col-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.track-two-col-item:active {
    transform: scale(0.98);
    background: #1a2532;
}

.track-two-col-item.playing {
    background: rgba(103, 110, 213, 0.2);
}

/* Обложка */
.track-two-col-cover {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #2a3139;
}

.track-two-col-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-two-col-cover .track-cover-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.track-two-col-cover .track-cover-gradient svg {
    stroke: #9ba5b0;
    width: 24px;
    height: 24px;
}

/* Оверлей воспроизведения */
.track-two-col-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 10px;
    cursor: pointer;
}

.track-two-col-item:hover .track-two-col-play-overlay,
.track-two-col-item:active .track-two-col-play-overlay {
    opacity: 1;
}

.track-two-col-play-overlay svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

/* Информация о треке - ОБРЕЗАЕМ ТЕКСТ */
.track-two-col-info {
    flex: 1;
    min-width: 0; /* Важно для обрезания текста */
    overflow: hidden;
}

.track-two-col-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-two-col-artist {
    font-size: 0.7rem;
    color: #9ba5b0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.track-two-col-duration {
    font-size: 0.65rem;
    color: #757D85;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* Кнопка меню (три точки) */
.track-two-col-menu {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.track-two-col-menu svg {
    width: 16px;
    height: 16px;
    stroke: #757D85;
}

.track-two-col-menu:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.94);
}

/* Медиа-запрос для очень маленьких экранов */
@media (max-width: 400px) {
    .two-columns-layout {
        gap: 8px;
    }
    
    .track-two-col-item {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .track-two-col-cover {
        width: 38px;
        height: 38px;
    }
    
    .track-two-col-title {
        font-size: 0.75rem;
    }
    
    .track-two-col-artist {
        font-size: 0.65rem;
    }
    
    .track-two-col-duration {
        font-size: 0.6rem;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ========== */
.add-track-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #1a2532;
    border-radius: 24px;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
    border: 1px solid rgba(103, 110, 213, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #FFFFFF;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #757D85;
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.file-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed rgba(103, 110, 213, 0.4);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-area:active {
    background: rgba(103, 110, 213, 0.1);
}

.upload-icon svg {
    width: 48px;
    height: 48px;
    stroke: #676ED5;
}

.file-upload-area p {
    color: #FFFFFF;
    font-size: 1rem;
    margin-top: 12px;
}

.file-upload-area span {
    color: #757D85;
    font-size: 0.7rem;
}

.selected-file-name {
    background: #2a3139;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #FFFFFF;
    margin-bottom: 16px;
    word-break: break-all;
}

.track-info-form {
    margin-top: 8px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-cancel-btn,
.modal-submit-btn {
    flex: 1;
    padding: 12px;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.modal-cancel-btn {
    background: #2a3139;
    color: #FFFFFF;
}

.modal-cancel-btn:active {
    background: #3a4350;
    transform: scale(0.97);
}

.modal-submit-btn {
    background: #676ED5;
    color: white;
}

.modal-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-submit-btn:active {
    background: #565dc2;
    transform: scale(0.97);
}

/* ========== ПРОГРЕСС ЗАГРУЗКИ ========== */
.upload-progress-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a2532;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
}

.upload-progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

.upload-progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.upload-progress-ring {
    transition: stroke-dashoffset 0.3s ease;
}

.upload-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
}

.upload-progress-modal p {
    color: #757D85;
    font-size: 0.9rem;
}

/* ========== МЕНЮ ТРЕКА ========== */
.track-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.track-menu-panel {
    background: #1a2532;
    border-radius: 12px;
    min-width: 160px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 1px solid rgba(103, 110, 213, 0.2);
    animation: menuFadeIn 0.2s ease;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.track-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.track-menu-item svg {
    width: 18px;
    height: 18px;
    stroke: #9ba5b0;
}

.track-menu-item:active {
    background: #2a3139;
}

.track-menu-item.cancel {
    color: #ff6b6b;
}

.track-menu-item.cancel svg {
    stroke: #ff6b6b;
}

.track-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ========== TOAST ========== */
.music-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
}

.music-toast.show {
    transform: translateX(-50%) translateY(0);
}

.music-toast svg {
    width: 18px;
    height: 18px;
}

.music-toast span {
    color: #FFFFFF;
    font-size: 0.85rem;
}

.name-track-menu {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;  
}

.info-track-menu {
    color: white;
    font-size: 0.8rem;
    margin-top: 2px;
}

/* ========== ЭКВАЛАЙЗЕР НА ОБЛОЖКЕ ========== */
.track-equalizer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(1px);
    border-radius: 0 0 10px 10px;
    z-index: 5;
}

.track-equalizer .eq-bar {
    width: 3px;
    background: #22c55e;
    border-radius: 2px;
    transition: height 0.1s ease;
}

/* Анимация для воспроизведения */
.track-equalizer.playing .eq-bar {
    animation: equalizerAnimation 0.8s ease-in-out infinite;
}

.track-equalizer.playing .eq-bar:nth-child(1) {
    animation-delay: 0s;
}

.track-equalizer.playing .eq-bar:nth-child(2) {
    animation-delay: 0.2s;
}

.track-equalizer.playing .eq-bar:nth-child(3) {
    animation-delay: 0.1s;
}

.track-equalizer.playing .eq-bar:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes equalizerAnimation {
    0%, 100% {
        height: 6px;
    }
    50% {
        height: 18px;
    }
}

/* Для обложки в списке (один столбец) */
.track-list-cover {
    position: relative;
}

/* Для обложки в двух колонках */
.track-two-col-cover {
    position: relative;
}

/**
 * Стили для музыкального плеера (мини-плеер и полноэкранный)
 */

/* ========== МИНИ-ПЛЕЕР В НИЖНЕЙ НАВИГАЦИИ ========== */
.nav-item[data-page="music"] {
    position: relative;
    transition: all 0.2s ease;
}

.mini-player-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.mini-player-cover-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.mini-player-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-player-cover-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Эквалайзер на мини-плеере */
.mini-player-equalizer {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 0;
}

.mini-player-container.playing .mini-player-equalizer {
    opacity: 1;
    opacity: 1;
    height: 100%;
    top: 0;
}

.mini-player-equalizer .eq-bar {
    width: 2px;
    background: white;
    border-radius: 1px;
    transition: height 0.1s ease;
}

.mini-player-container.playing .mini-player-equalizer .eq-bar {
    animation: miniEqualizer 0.8s ease-in-out infinite;
}

.mini-player-container.playing .mini-player-equalizer .eq-bar:nth-child(1) {
    animation-delay: 0s;
    height: 6px;
}

.mini-player-container.playing .mini-player-equalizer .eq-bar:nth-child(2) {
    animation-delay: 0.2s;
    height: 10px;
}

.mini-player-container.playing .mini-player-equalizer .eq-bar:nth-child(3) {
    animation-delay: 0.1s;
    height: 8px;
}

.mini-player-container.playing .mini-player-equalizer .eq-bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 12px;
}

@keyframes miniEqualizer {
    0%, 100% {
        height: 4px;
    }
    50% {
        height: 14px;
    }
}

/* ========== ПОЛНОЭКРАННЫЙ ПЛЕЕР - КАРУСЕЛЬ КАК В ПРОСМОТРЩИКЕ ФОТО ========== */

.full-player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0C101E;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    animation: fullPlayerFadeIn 0.3s ease;
}

@keyframes fullPlayerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Заголовок плеера */
.full-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 10px;
    background: transparent;
}

.full-player-close,
.full-player-menu {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.full-player-close svg,
.full-player-menu svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.full-player-close:active,
.full-player-menu:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.2);
}

.full-player-title {
    color: white;
    font-size: 1.9rem;
    font-weight: 500;
    text-align: left;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

/* КОНТЕЙНЕР КАРУСЕЛИ */
.full-player-carousel-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* КАРУСЕЛЬ - 3 СЛАЙДА В РЯДУ */
.full-player-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* ВСЕ СЛАЙДЫ ВИДИМЫ В РЯДУ */
.carousel-slide {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ПРЕДЫДУЩИЙ СЛАЙД - СЛЕВА */
.prev-slide {
    width: 280px;
    height: 280px;
    opacity: 0.5;
    transform: scale(0.85);
    margin-right: -60px;
    z-index: 1;
}

/* ЦЕНТРАЛЬНЫЙ СЛАЙД */
.current-slide {
    width: 360px;
    height: 360px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

/* СЛЕДУЮЩИЙ СЛАЙД - СПРАВА */
.next-slide {
    width: 280px;
    height: 280px;
    opacity: 0.5;
    transform: scale(0.85);
    margin-left: -60px;
    z-index: 1;
}

/* Адаптация под большие экраны */
@media (min-width: 600px) {
    .prev-slide {
        width: 320px;
        height: 320px;
        margin-right: -80px;
    }
    .current-slide {
        width: 440px;
        height: 440px;
    }
    .next-slide {
        width: 320px;
        height: 320px;
        margin-left: -80px;
    }
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-placeholder,
.carousel-placeholder-gradient {
    width: 100%;
    height: 100%;
    background: #F5F5F5;
}

.carousel-placeholder-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Информация о треке */
.full-player-info {
    text-align: center;
    padding: 20px 20px 10px;
}

.full-player-track-title {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.full-player-track-artist {
    color: #9ba5b0;
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Прогресс бар */
.full-player-progress-container {
    padding: 20px 30px;
}

.full-player-progress-bar {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.full-player-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #676ED5, #c47eff);
    border-radius: 2px;
    width: 0%;
    transition: width 0.05s linear;
}

.full-player-progress-handle {
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: transparent;
    cursor: pointer;
    z-index: 10;
}

.full-player-progress-handle-inner {
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
}

.full-player-progress-handle:active .full-player-progress-handle-inner {
    transform: scale(1.3);
}

.full-player-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 4px;
    font-size: 0.7rem;
    color: #9ba5b0;
}

/* Основные кнопки управления */
.full-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.full-player-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.full-player-control-btn svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

.full-player-control-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

.full-player-control-btn.active svg {
    stroke: #676ED5;
}

.full-player-control-btn.active-one svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

.full-player-control-btn.active-all svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

/* Кнопка play/pause */
.full-player-play-pause {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #676ED5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.full-player-play-pause svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.full-player-play-pause:active {
    transform: scale(0.94);
    background: #565dc2;
}

/* Нижние кнопки (лайк) */
.full-player-bottom-controls {
    display: flex;
    justify-content: center;
    padding: 10px 20px 30px;
}

.full-player-like-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.full-player-like-btn svg {
    width: 24px;
    height: 24px;
    stroke: #9ba5b0;
    transition: all 0.2s ease;
}

.full-player-like-btn.active svg {
    fill: #ff4444;
    stroke: #ff4444;
}

.full-player-like-btn:active {
    transform: scale(0.94);
}

/* Toast уведомления */
.full-player-toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 11001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
}

.full-player-toast.show {
    transform: translateX(-50%) translateY(0);
}

.full-player-toast svg {
    width: 18px;
    height: 18px;
}

.full-player-toast span {
    color: white;
    font-size: 0.85rem;
}

/* ========== НИЖНЯЯ ПАНЕЛЬ С КНОПКАМИ ========== */

.full-player-bottom-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px 30px;
    gap: 30px;
}

.full-player-bottom-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.full-player-bottom-btn svg {
    width: 24px;
    height: 24px;
    stroke: #757D85;
    transition: all 0.2s ease;
}

.full-player-bottom-btn.active svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

.full-player-bottom-btn.active-one svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

.full-player-bottom-btn.active-all svg {
    stroke: #676ED5;
    filter: drop-shadow(0 0 4px rgba(103, 110, 213, 0.5));
}

.full-player-bottom-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

/* Для кнопки лайка */
.full-player-bottom-btn#fullPlayerLike.active svg {
    fill: #ff4444;
    stroke: #ff4444;
}

/* Для кнопок управления */
.full-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 10px 20px;
}

.full-player-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.full-player-control-btn svg {
    width: 22px;
    height: 22px;
    stroke: #757D85;
}

.full-player-control-btn:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

/* ========== ПАГИНАЦИЯ И ЗАГРУЗКА ========== */

.music-loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.music-loading-spinner {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.music-spinner-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #676ED5;
    animation: bounce 0.6s ease-in-out infinite;
}

.music-spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.music-spinner-ring:nth-child(2) {
    animation-delay: 0.15s;
}

.music-spinner-ring:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.music-loading-more span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.music-end-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    opacity: 0.6;
}

.music-end-message svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-secondary);
}

.music-end-message span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Сентинел для наблюдения */
.music-sentinel {
    height: 20px;
    width: 100%;
    visibility: hidden;
}

/* Анимация появления новых треков */
.track-list-item.new-track,
.track-two-col-item.new-track {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dialog-menu-item.active svg {
    stroke: #ff4444 !important;
}

.dialog-menu-item.active svg path {
    fill: #ff4444 !important;
}

/* ========== ЧИСТЫЙ НЕОНОВЫЙ МУЗЫКАЛЬНЫЙ СТАТУС - ОТ КРАЯ ДО КРАЯ ========== */

.music-status-container-clean {
    margin: 0 -20px !important;
    padding: 0 20px !important;
    background: transparent !important;
    border: none !important;
    width: calc(100% + 40px);
}

.music-status-header-clean {
    text-align: center;
    margin-bottom: 1px;
    margin-top: 10px;
}

.music-status-label-clean {
    font-size: 1.1rem;
    color: #9ba5b0;
    font-weight: 400;
    letter-spacing: 0.3px;
    background: transparent;
    padding: 0;
}

.music-status-track-full-clean {
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 12px;
}

/* ВОЛНЫ ОТ КРАЯ ДО КРАЯ */
.neon-waves-fullwidth {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    position: relative;
    overflow: hidden;
}

.neon-waves-canvas-full {
    width: 100%;
    height: 85px;
    display: block;
    background: transparent;
}

/* ВРЕМЯ ПОД ВОЛНАМИ ПО КРАЯМ */
.neon-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    padding: 0;
}

.neon-time-current,
.neon-time-total {
    font-size: 1rem;
    font-family: monospace;
    font-weight: 500;
    color: #9ba5b0;
}

/* Светлая тема */
.theme-light .music-status-label-clean {
    color: #999999;
}

.theme-light .music-status-track-full-clean {
    color: #1A1A1A;
}

.theme-light .neon-time-current,
.theme-light .neon-time-total {
    color: #999999;
}

/* Обрезка длинного текста в музыкальном статусе */
.music-status-track-full-clean {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Для светлой темы */
.theme-light .music-status-track-full-clean {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Tooltip при наведении на обрезанный текст */
.music-status-track-full-clean {
    cursor: pointer;
}

.call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: callFadeIn 0.3s ease;
}

@keyframes callFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.call-container {
    text-align: center;
    padding: 20px;
}

.call-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #1a2532;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #676ED5;
}

.call-avatar svg {
    width: 60px;
    height: 60px;
    stroke: #676ED5;
}

.call-name {
    color: white;
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.call-status {
    color: #9ba5b0;
    font-size: 1rem;
    margin-bottom: 40px;
}

.call-timer {
    color: #22c55e;
    font-size: 2rem;
    font-family: monospace;
    margin-bottom: 40px;
}

.call-actions {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.call-accept-btn,
.call-decline-btn,
.call-end-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.call-accept-btn {
    background: #22c55e;
}

.call-accept-btn:active {
    transform: scale(0.94);
    background: #16a34a;
}

.call-decline-btn,
.call-end-btn {
    background: #ff6b6b;
}

.call-decline-btn:active,
.call-end-btn:active {
    transform: scale(0.94);
    background: #ff5252;
}

.call-accept-btn svg,
.call-decline-btn svg,
.call-end-btn svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

/* Кнопка звонка в диалоге */
.call-button {
    margin-right: 8px;
}

.call-button svg {
    stroke: #22c55e;
}

.call-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a2532;
    border-radius: 60px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 20001;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(103, 110, 213, 0.3);
}

.call-toast.show {
    transform: translateX(-50%) translateY(0);
}

.call-toast svg {
    width: 20px;
    height: 20px;
}

.call-toast span {
    color: white;
    font-size: 0.9rem;
}

/* Стили для статуса соединения */
.call-status-connecting {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mic-warning {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}