* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ CSS ПЕРЕМЕННЫЕ ДЛЯ ТЕМ ============ */

:root {
    /* Тёмная тема (по умолчанию) */
    --bg-primary: #0e1621;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #1e2533;
    --bg-input: #2d3748;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #8892a6;
    --border-color: #2d3748;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --message-bg: #2a3142;
    --message-own-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-other-bg: #2a3142;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Мягкая светлая тема (по мотивам скрина) */
body.soft-light-theme {
    --bg-primary: #f5f0eb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #ede8e3;
    --bg-input: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    --text-primary: #2d2d2d;
    --text-secondary: #8a8a8a;
    --border-color: #e8e3de;
    --gradient-start: #a8c5be;
    --gradient-end: #8db4a8;
    --message-bg: #f9f6f3;
    --message-own-bg: linear-gradient(135deg, #a8c5be 0%, #8db4a8 100%);
    --message-other-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.06);
}

/* Нейтральная светлая тема */
body.light-theme {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-input: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.05);
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --message-bg: #f7fafc;
    --message-own-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-other-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* AMOLED тёмная тема */
body.amoled-theme {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #151515;
    --bg-input: #1a1a1a;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --border-color: #1a1a1a;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --message-bg: #1a1a1a;
    --message-own-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --message-other-bg: #1a1a1a;
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    transition: background 0.3s, color 0.3s;
}

.leaflet-tile-pane {
    filter: none;
    transition: filter 0.3s;
}


body.dark-theme .leaflet-tile-pane {
    filter: brightness(1.1) contrast(1.05);
}

body.amoled-theme .leaflet-tile-pane {
    filter: brightness(0.95) contrast(1.1);
}



/* ============ ЭКРАНЫ ============ */

.screen {
    display: none;
    width: 100vw;
    height: 100vh;
}

.screen.active {
    display: flex;
}

/* ============ АВТОРИЗАЦИЯ ============ */

#auth-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #fff;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.auth-tab.active {
    background: rgba(255, 255, 255, 0.3);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 14px;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.auth-form button {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.auth-form button:hover {
    transform: scale(1.02);
}

.error-message {
    color: #ff6b6b;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

/* ============ ГЛАВНЫЙ ЭКРАН ============ */

.messenger-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Левая панель - чаты */
.chats-panel {
    width: 320px;
    min-width: 250px;
    max-width: 600px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
}

.resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    width: 8px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 100;
}

.resize-handle:hover {
    background: rgba(102, 126, 234, 0.5);
}

.resize-handle:active {
    background: rgba(102, 126, 234, 0.7);
}

.chats-header {
    padding: 15px 20px;
    background: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-tabs {
    display: flex;
    gap: 3px;
    width: 100%;
    align-items: center;
    overflow-x: auto;
}

.header-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-tab.active {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

/* Кнопки действий в заголовке */
.header-actions {
    display: flex;
    gap: 5px;
}

.header-actions button {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-actions button:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.search-bar {
    padding: 15px;
    background: var(--bg-tertiary);
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

/* Вкладки */
.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-content.active {
    display: flex;
}

/* Для "Нет звонков" */
.no-calls {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Список звонков */
.calls-list {
    flex: 1;
    overflow-y: auto;
}

.call-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.call-item:hover {
    background: var(--bg-hover);
}

.call-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.call-item-content {
    flex: 1;
    overflow: hidden;
}

.call-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.call-item-name {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.call-type-icon {
    font-size: 14px;
}

.call-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.call-item-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.call-item.missed .call-item-name {
    color: #ef4444;
}

.chats-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.chat-item:hover {
    background: var(--bg-hover);
}

.chat-item.active {
    background: rgba(102, 126, 234, 0.2);
}

.chat-item-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.chat-item-content {
    flex: 1;
    overflow: hidden;
}

.chat-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.chat-item-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.chat-item-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.chat-item-message {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Счётчик непрочитанных сообщений */
.unread-badge {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: #fff;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Центральная панель - сообщения */
.messages-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.messages-header {
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.chat-details h3 {
    font-size: 16px;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.chat-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.chat-status.online {
    color: #4ade80;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: var(--bg-hover);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-chat-selected {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--text-secondary);
}

.no-chat-selected h2 {
    font-size: 48px;
    margin-bottom: 10px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 70%;
}

.message.own {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content {
    background: var(--message-other-bg);
    padding: 10px 15px;
    border-radius: 15px;
    word-wrap: break-word;
    box-shadow: 0 2px 4px var(--shadow);
    border: 1px solid var(--border-color);
}

.message.own .message-content {
    background: var(--message-own-bg);
    color: #fff;
    border: none;
}

.message-sender {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
    color: var(--gradient-start);
}

.soft-light-theme .message-sender {
    color: #6b9a8f;
}

.message.own .message-sender {
    display: none;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 5px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Цвет времени для входящих сообщений в светлой теме */
.light-theme .message:not(.own) .message-time,
.soft-light-theme .message:not(.own) .message-time {
    color: rgba(0, 0, 0, 0.4);
}

/* Галочки прочтения (только для своих сообщений) */
.message-read-status {
    font-size: 14px;
    line-height: 1;
}

.message-read-status.sent {
    color: rgba(255, 255, 255, 0.5);
}

.message-read-status.read {
    color: #4ade80;
}

/* В светлой теме */
.light-theme .message-read-status.sent,
.soft-light-theme .message-read-status.sent {
    color: rgba(255, 255, 255, 0.7);
}

.light-theme .message-read-status.read,
.soft-light-theme .message-read-status.read {
    color: #22c55e;
}

.message-file {
    margin-top: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-file-icon {
    font-size: 24px;
}

.message-file-info {
    flex: 1;
}

.message-file-name {
    font-size: 13px;
    margin-bottom: 3px;
}

.message-file-size {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.message-input-container {
    padding: 15px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Preview прикреплённых файлов */
.file-preview-container {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: var(--bg-hover);
    border-radius: 10px;
    max-height: 150px;
    overflow-y: auto;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-width: 200px;
    max-width: 300px;
}

.file-preview-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
    overflow: hidden;
}

.file-preview-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.file-preview-size {
    font-size: 11px;
    color: var(--text-secondary);
}

.file-preview-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-preview-remove:hover {
    background: var(--bg-hover);
    color: #ef4444;
}

.input-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.input-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

#message-input {
    flex: 1;
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    resize: none;
    max-height: 120px;
    font-family: inherit;
}

.send-btn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: #fff;
}

.send-btn:hover {
    transform: scale(1.1);
}

/* Правая панель - пользователи */
.users-panel {
    width: 280px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: none;
    flex-direction: column;
}

.users-panel.active {
    display: flex;
}

.users-header {
    padding: 20px;
    background: var(--bg-tertiary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.users-header h3 {
    color: var(--text-primary);
}

#close-users-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s;
}

#close-users-btn:hover {
    background: var(--bg-hover);
}

.users-list {
    flex: 1;
    overflow-y: auto;
}

.user-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

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

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    position: relative;
}

.user-online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid var(--bg-secondary);
    border-radius: 50%;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.user-status {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============ МОДАЛЬНОЕ ОКНО ЗВОНКА ============ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.call-container {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.call-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin: 0 auto 20px;
}

#call-user-name {
    font-size: 24px;
    margin-bottom: 10px;
    color: #fff;
}

#call-status {
    font-size: 16px;
    color: #8892a6;
    margin-bottom: 40px;
}

.call-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.call-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.call-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.end-btn {
    background: #ef4444;
}

.end-btn:hover {
    background: #dc2626;
}

.accept-btn {
    background: #10b981 !important;
}

.accept-btn:hover {
    background: #059669 !important;
}

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

.theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.theme-modal.active {
    display: flex;
}

.theme-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px var(--shadow);
}

.theme-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.theme-modal-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.theme-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
}

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

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.theme-option {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.theme-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow);
}

.theme-option.active {
    border-color: var(--gradient-start);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.theme-option-preview {
    width: 100%;
    height: 60px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    gap: 5px;
    padding: 10px;
}

.theme-preview-color {
    flex: 1;
    border-radius: 5px;
}

/* Превью тёмной темы */
.theme-option[data-theme="dark"] .theme-preview-color:nth-child(1) {
    background: #0e1621;
}
.theme-option[data-theme="dark"] .theme-preview-color:nth-child(2) {
    background: #1a1f2e;
}
.theme-option[data-theme="dark"] .theme-preview-color:nth-child(3) {
    background: #667eea;
}

/* Превью мягкой светлой темы */
.theme-option[data-theme="soft-light"] .theme-preview-color:nth-child(1) {
    background: #f5f0eb;
}
.theme-option[data-theme="soft-light"] .theme-preview-color:nth-child(2) {
    background: #ffffff;
}
.theme-option[data-theme="soft-light"] .theme-preview-color:nth-child(3) {
    background: #a8c5be;
}

/* Превью нейтральной светлой темы */
.theme-option[data-theme="light"] .theme-preview-color:nth-child(1) {
    background: #f5f7fa;
}
.theme-option[data-theme="light"] .theme-preview-color:nth-child(2) {
    background: #ffffff;
}
.theme-option[data-theme="light"] .theme-preview-color:nth-child(3) {
    background: #667eea;
}

/* Превью AMOLED темы */
.theme-option[data-theme="amoled"] .theme-preview-color:nth-child(1) {
    background: #000000;
}
.theme-option[data-theme="amoled"] .theme-preview-color:nth-child(2) {
    background: #0a0a0a;
}
.theme-option[data-theme="amoled"] .theme-preview-color:nth-child(3) {
    background: #667eea;
}

.theme-option-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.theme-option-description {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============ СКРОЛЛБАРЫ ============ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ============ АНИМАЦИИ ============ */

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

.message {
    animation: fadeIn 0.3s ease;
}

/* ============ СТИЛИ ДЛЯ ГРУППОВЫХ ЧАТОВ ============ */
/* Добавь это в конец твоего styles.css файла */

/* Модальное окно создания группы */
.group-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.group-modal.active {
    display: flex;
}

.group-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--shadow);
}

.group-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.group-modal-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.group-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
}

.group-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.group-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gradient-start);
}

.group-users-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-tertiary);
}

.group-user-item {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.group-user-item:last-child {
    border-bottom: none;
}

.group-user-item:hover {
    background: var(--bg-hover);
}

.group-user-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.group-user-item.selected .group-user-checkbox {
    background: var(--gradient-start);
    border-color: var(--gradient-start);
}

.group-user-item.selected .group-user-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.group-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.group-user-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary,
.btn-secondary,
.btn-action,
.btn-danger {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.02);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* Модальное окно информации о группе */
.group-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.group-info-modal.active {
    display: flex;
}

.group-info-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--shadow);
}

.group-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.group-info-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.group-info-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.group-info-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.group-info-body h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.group-info-participants-count {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.group-info-section {
    width: 100%;
    margin-top: 20px;
}

.group-info-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.participant-item {
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.participant-item:hover {
    background: var(--bg-hover);
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.participant-info {
    flex: 1;
}

.participant-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.participant-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.participant-badge {
    background: rgba(102, 126, 234, 0.2);
    color: var(--gradient-start);
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
}

.remove-participant-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
}

.remove-participant-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.group-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    flex: none;
}

.btn-action:hover {
    background: var(--bg-hover);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    flex: none;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Иконка группы в списке чатов */
.chat-item.group .chat-item-avatar,
.group-avatar {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.chat-item.group .chat-item-avatar::before {
    content: '👥';
}

/* Индикатор группового чата в заголовке */
.messages-header.group-chat .chat-avatar {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.messages-header.group-chat .chat-avatar::after {
    content: '👥';
    font-size: 24px;
}

/* ============ ВКЛАДКА ПРОФИЛЬ ============ */
.profile-edit-container {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}

.profile-edit-container h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.profile-photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.change-photo-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.change-photo-btn:hover {
    transform: scale(1.1);
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-field input,
.profile-field textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.profile-field textarea {
    resize: vertical;
}

.interests-edit-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.interest-edit-tag {
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interest-edit-tag button {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.add-interest-section {
    display: flex;
    gap: 10px;
}

.add-interest-section input {
    flex: 1;
}

.add-interest-section button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.gallery-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-gallery-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-gallery-photo-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.add-gallery-photo-btn:hover {
    background: var(--bg-hover);
    border-color: var(--gradient-start);
}

/* ============ ВКЛАДКА ПРИГЛАСИТЬ ============ */
.invite-container {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}

.invite-container h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.invite-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.invite-link-section {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.invite-link-section input {
    flex: 1;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.invite-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.invite-btn {
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
}

.invite-btn span {
    font-size: 20px;
}

.invite-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.invite-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
}

.invite-btn.vk {
    background: linear-gradient(135deg, #4680C2 0%, #2C5F99 100%);
}

.invite-btn.ok {
    background: linear-gradient(135deg, #EE8208 0%, #C76200 100%);
}

.invite-btn.sms {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.invite-btn.email {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.invite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow);
}

/* ============ КНОПКИ В MESSAGES-HEADER ============ */
.header-right-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-right-actions button {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-right-actions button:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

/* ============ СЕКЦИЯ "ПРИГЛАСИТЬ ДРУЗЕЙ" ВНИЗУ ============ */
.invite-friends-section {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.invite-friends-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.invite-friends-btn span {
    font-size: 18px;
}

.invite-friends-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

/* ============ POPUP ПРИГЛАШЕНИЯ ============ */
.invite-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.invite-popup.active {
    display: flex;
}

.invite-popup-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--shadow);
}

.invite-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.invite-popup-header h3 {
    font-size: 22px;
    color: var(--text-primary);
}

.popup-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.2s;
}

.popup-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.invite-popup-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.invite-description {
    color: var(--text-secondary);
    text-align: center;
}

.invite-link-section {
    display: flex;
    gap: 10px;
}

.invite-link-section input {
    flex: 1;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
}

.invite-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.invite-btn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
}

.invite-btn span {
    font-size: 18px;
}

.invite-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.invite-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
}

.invite-btn.vk {
    background: linear-gradient(135deg, #4680C2 0%, #2C5F99 100%);
}

.invite-btn.ok {
    background: linear-gradient(135deg, #EE8208 0%, #C76200 100%);
}

.invite-btn.sms {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
}

.invite-btn.email {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.invite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
}

/* Скролл для вкладок если не влезают */
.header-tabs::-webkit-scrollbar {
    height: 0;
}

/* ============ ВКЛАДКА ПРОФИЛЬ ============ */
.profile-edit-container {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
}

.profile-edit-container h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.profile-photo-section {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.change-photo-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.change-photo-btn:hover {
    transform: scale(1.1);
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-field input,
.profile-field textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.profile-field textarea {
    resize: vertical;
}

.interests-edit-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 40px;
}

.interest-edit-tag {
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.interest-edit-tag button {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.add-interest-section {
    display: flex;
    gap: 10px;
}

.add-interest-section input {
    flex: 1;
}

.add-interest-section button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    min-height: 100px;
}

.gallery-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-gallery-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-gallery-photo-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.add-gallery-photo-btn:hover {
    background: var(--bg-hover);
    border-color: var(--gradient-start);
}

/* Скрываем форму профиля когда вкладка неактивна */
.tab-content:not(.active) {
    display: none !important;
}

.profile-setup {
    padding: 20px;
    overflow-y: auto;
}

.community-interface {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.tab-content {
    overflow-y: auto;
    height: calc(100% - 60px);
}

.tab-content {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

.chats-list, .calls-list {
    overflow-y: auto;
}

/* ============ ВЫПАДАЮЩЕЕ МЕНЮ ЧАТА ============ */

.dropdown-menu {
    position: absolute;
    top: 60px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-section {
    padding: 8px 0;
}

.dropdown-section-title {
    padding: 8px 16px 4px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item span:first-child {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-item-text {
    flex: 1;
}

.dropdown-toggle {
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.dropdown-toggle.active {
    color: #e74c3c;
}

.dropdown-item-danger {
    color: #e74c3c;
}

.dropdown-item-danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* ============ МОДАЛЬНОЕ ОКНО ЖАЛОБЫ ============ */

.modal-small {
    max-width: 350px;
}

.report-form {
    margin-top: 15px;
}

.report-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.report-reasons {
    margin-bottom: 20px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-option:hover,
.checkbox-option:hover {
    background: var(--bg-hover);
}

.radio-option input,
.checkbox-option input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.report-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
}

.report-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}

.btn-danger {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

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

.block-info-list {
    margin: 15px 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.block-info-list li {
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
}

.btn-danger {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #c0392b;
}