.notification-item.read .notification-title {
    font-weight: 500;
    color: var(--text-secondary);
}

.notification-item.read .notification-message {
    opacity: 0.8;
}

/* Иконки в прочитанных уведомлениях */
.notification-item.read .notification-type-icon {
    opacity: 0.6;
}

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

.notification-type-icon {
    flex-shrink: 0;
    color: var(--accent-color);
    transition: all 0.2s ease;
}

.notification-item:hover .notification-type-icon {
    transform: scale(1.1);
}

/* Специальные цвета для разных типов иконок */
.notification-item[data-type="group_call"] .notification-type-icon,
.notification-item[data-type="call_ended"] .notification-type-icon {
    color: var(--success-color);
}

.notification-item[data-type="friend_request"] .notification-type-icon,
.notification-item[data-type="friend_accepted"] .notification-type-icon,
.notification-item[data-type="friend_request_accepted"] .notification-type-icon,
.notification-item[data-type="new_follower"] .notification-type-icon {
    color: var(--accent-color);
}

.notification-item[data-type="post_like"] .notification-type-icon,
.notification-item[data-type="post_liked"] .notification-type-icon {
    color: var(--error-color);
}

.notification-item[data-type="post_comment"] .notification-type-icon {
    color: var(--warning-color);
}

.notification-item[data-type="post_shared"] .notification-type-icon {
    color: var(--success-color);
}

.notification-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notification-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    white-space: nowrap;
}

/* Действия уведомления */
.notification-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding-left: 1rem;
    flex-shrink: 0;
}

/* Точка непрочитанного уведомления */
.notification-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 2px var(--post-bg);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(23, 162, 184, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(23, 162, 184, 0);
    }
}

.notification-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-item:hover .notification-delete-btn {
    opacity: 1;
}

.notification-delete-btn:hover {
    background: var(--sidebar-bg);
    color: var(--error-color);
}

/* Кнопка удаления для прочитанных */
.notification-item.read .notification-delete-btn {
    opacity: 0.3;
}

.notification-item.read:hover .notification-delete-btn {
    opacity: 0.7;
}

.notification-item.read .notification-delete-btn:hover {
    opacity: 1;
    background: var(--sidebar-bg);
    color: var(--error-color);
}

/* Линия разделения перед первым прочитанным уведомлением */
.notification-item.unread + .notification-item.read::before {
    content: '';
    position: absolute;
    top: -0.625rem;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--post-border), transparent);
}

/* Улучшенная анимация появления */
.notification-item {
    animation: slideInRight 0.3s ease forwards;
}

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

/* Задержка анимации для каждого элемента */
.notification-item:nth-child(1) { animation-delay: 0.05s; }
.notification-item:nth-child(2) { animation-delay: 0.1s; }
.notification-item:nth-child(3) { animation-delay: 0.15s; }
.notification-item:nth-child(4) { animation-delay: 0.2s; }
.notification-item:nth-child(5) { animation-delay: 0.25s; }
.notification-item:nth-child(n+6) { animation-delay: 0.3s; }

/* Пустые уведомления */
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.notifications-empty svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.notifications-empty p {
    margin: 0;
    color: var(--text-secondary);
}

/* Загрузка */
.notifications-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
}

/* Ошибка */
.notification-error {
    padding: 1rem;
    text-align: center;
    color: var(--error-color);
    font-size: 0.875rem;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--button-primary-bg), var(--accent-color));
    color: var(--button-primary-text);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.4);
}

.btn-secondary {
    background: var(--post-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
}

.btn-secondary:hover {
    background: var(--sidebar-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: var(--error-color);
    color: var(--button-primary-text);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(220, 53, 69, 0.4);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Кнопки авторизации в header */
.header-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.altn-header-login-icon-btn,
.altn-header-register-icon-btn,
.altn-mobile-login-auth-btn,
.altn-mobile-register-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.altn-header-login-icon-btn::before,
.altn-header-register-icon-btn::before,
.altn-mobile-login-auth-btn::before,
.altn-mobile-register-auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.altn-header-login-icon-btn:active::before,
.altn-header-register-icon-btn:active::before,
.altn-mobile-login-auth-btn:active::before,
.altn-mobile-register-auth-btn:active::before {
    width: 300px;
    height: 300px;
}

.altn-header-login-icon-btn,
.altn-mobile-login-auth-btn {
    background: var(--post-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
}

.altn-header-login-icon-btn:hover,
.altn-mobile-login-auth-btn:hover {
    background: var(--sidebar-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.altn-header-register-icon-btn,
.altn-mobile-register-auth-btn {
    background: linear-gradient(135deg, var(--button-primary-bg), var(--accent-color));
    color: var(--button-primary-text);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

.altn-header-register-icon-btn:hover,
.altn-mobile-register-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.4);
}

.altn-header-login-icon-btn,
.altn-header-register-icon-btn {
    padding: 0.625rem;
    min-width: 42px;
    height: 42px;
    gap: 0;
}

.altn-mobile-login-auth-btn,
.altn-mobile-register-auth-btn {
    width: 100%;
    display: flex;
    gap: 0.5rem;
}

.altn-header-login-icon-btn svg,
.altn-header-register-icon-btn svg,
.altn-mobile-login-auth-btn svg,
.altn-mobile-register-auth-btn svg {
    flex-shrink: 0;
}

.altn-header-login-icon-btn svg,
.altn-header-register-icon-btn svg {
    transition: transform 0.2s ease;
}

.altn-header-login-icon-btn:hover svg,
.altn-header-register-icon-btn:hover svg {
    transform: scale(1.1);
}

/* User menu */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--post-bg);
    border: 1px solid var(--post-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-toggle:hover {
    background: var(--sidebar-bg);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* Кнопка мобильного меню */
.nav-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.nav-mobile-toggle:hover {
    background: var(--sidebar-bg);
}

.nav-mobile-toggle span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-mobile-toggle span:nth-child(1) {
    top: 13px;
}

.nav-mobile-toggle span:nth-child(2) {
    top: 20px;
}

.nav-mobile-toggle span:nth-child(3) {
    top: 27px;
}

.nav-mobile-toggle.active span:nth-child(1) {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--body-bg);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 997;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-inner {
    padding: 2rem 1.5rem;
    min-height: 100%;
    background: var(--body-bg);
}

.mobile-menu-section {
    margin-bottom: 1.3rem;
}

.mobile-menu-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--post-bg);
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid var(--post-border);
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-menu-item > span:not(.chat-badge):not(.notification-badge) {
    min-width: 0;
    flex: 1 1 auto;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background: var(--sidebar-bg);
    transform: translateX(8px);
    border-color: var(--accent-color);
}

.mobile-menu-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--post-border);
}

/* Карточка профиля в мобильном меню */
.mobile-menu-section.mobile-user-profile {
    padding: 0;
    margin-bottom: 1rem;
}

.mobile-user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--button-primary-bg));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.mobile-user-avatar.user-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 1.125rem;
}

.mobile-user-info {
    flex: 1;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.125rem;
}

.mobile-user-username {
    font-size: 0.8125rem;
    opacity: 0.9;
}

.mobile-user-arrow {
    color: white;
    opacity: 0.7;
}

/* Выбор темы в мобильном меню */
.theme-select {
    justify-content: flex-start;
}

/* ========================================
   МОДАЛЬНОЕ ОКНО ВЫБОРА ТЕМЫ (МОБИЛЬНЫЕ)
   ======================================== */

.theme-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.theme-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.theme-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.theme-modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 70vh;
    max-height: 70dvh;
    background: var(--post-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-modal.active .theme-modal-content {
    transform: scale(1);
}

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

.theme-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.theme-modal-close:hover {
    background: var(--sidebar-bg);
    color: var(--text-primary);
}

.theme-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background: var(--post-bg);
}
