/* 🔒 ТОЛЬКО ДЛЯ МОДАЛКИ ВЫБОРА ПРИЧИНЫ (не ломает основной дизайн) */
#closeReasonModal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px); z-index: 10000; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
}
#closeReasonModal.show { display: flex; opacity: 1; }

.cr-modal-box {
  background: #1e1f22; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  padding: 24px; width: 90%; max-width: 480px; box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transform: scale(0.95); transition: transform 0.2s ease;
}
#closeReasonModal.show .cr-modal-box { transform: scale(1); }
#incomingRing.show { display: flex !important; }
.cr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cr-header h3 { margin: 0; font-size: 18px; color: #fff; }
.cr-close-btn { background: none; border: none; color: #72767d; cursor: pointer; font-size: 20px; padding: 4px; }
.cr-close-btn:hover { color: #fff; }

/* 🔥 Горизонтальные кнопки причин */
.cr-options { display: flex; gap: 12px; margin-bottom: 16px; }
.cr-option { flex: 1; position: relative; cursor: pointer; }
.cr-option input { position: absolute; opacity: 0; width: 100%; height: 100%; z-index: 2; cursor: pointer; }

.cr-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 10px; border-radius: 12px; font-size: 13px; font-weight: 700;
  border: 2px solid transparent; background: rgba(255,255,255,0.05); color: #949ba4;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1); user-select: none;
}
/* Hover */
.cr-btn:hover { background: rgba(255,255,255,0.08); color: #fff; transform: translateY(-2px); }

/* Активные состояния */
.cr-option input:checked + .cr-btn.resolved {
  background: rgba(35,165,90,0.15); border-color: #23a55a; color: #23a55a;
  box-shadow: 0 0 12px rgba(35,165,90,0.25);
}
.cr-option input:checked + .cr-btn.irrelevant {
  background: rgba(240,177,50,0.15); border-color: #f0b132; color: #f0b132;
  box-shadow: 0 0 12px rgba(240,177,50,0.25);
}
.cr-option input:checked + .cr-btn.duplicate {
  background: rgba(237,66,69,0.15); border-color: #ed4245; color: #ed4245;
  box-shadow: 0 0 12px rgba(237,66,69,0.25);
}

.cr-comment {
  width: 100%; padding: 10px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: #dbdee1; resize: none; height: 60px; outline: none;
  font-family: inherit; margin-bottom: 16px; box-sizing: border-box;
}
.cr-footer { display: flex; justify-content: flex-end; gap: 10px; }
.cr-btn-cancel {
  padding: 8px 16px; background: transparent; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #b5bac1; cursor: pointer; transition: 0.2s;
}
.cr-btn-cancel:hover { background: rgba(255,255,255,0.05); color: #fff; }
.cr-btn-confirm {
  padding: 8px 16px; background: #ed4245; border: none; border-radius: 8px;
  color: #fff; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.cr-btn-confirm:hover { background: #c03537; }
#page-support .page-header-tabs {
    gap: 8px;
}

#page-support .tab-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: #b5bac1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#page-support .tab-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#page-support .tab-pill.active {
    background: linear-gradient(135deg, #5865f2 0%, #a020f0 100%);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

/* --- Карточки действий --- */
.support-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.support-card {
    background: rgba(30, 31, 34, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.support-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.support-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5), 0 0 20px rgba(88, 101, 242, 0.2);
}

.support-card-icon {
    font-size: 32px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.support-card h3 {
    color: #fff;
    font-size: 18px;
    margin: 0 0 8px 0;
}

.support-card p {
    color: #949ba4;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.support-card-btn {
    font-size: 13px;
    font-weight: 700;
    color: #5865f2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Списки заявок --- */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    background: rgba(30, 31, 34, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.ticket-card:hover {
    background: rgba(40, 42, 46, 0.6);
    border-color: rgba(255,255,255,0.15);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-title {
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-priority {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.ticket-priority.high { background: rgba(237, 66, 69, 0.2); color: #ed4245; }
.ticket-priority.medium { background: rgba(240, 177, 50, 0.2); color: #f0b132; }
.ticket-priority.low { background: rgba(35, 165, 90, 0.2); color: #23a55a; }

.ticket-text {
    color: #dbdee1;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
    color: #72767d;
}

.ticket-close-btn {
    background: rgba(237, 66, 69, 0.1);
    color: #ed4245;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.ticket-close-btn:hover { background: rgba(237, 66, 69, 0.2); }

/* --- МОДАЛЬНОЕ ОКНО СОЗДАНИЯ (FIXED) --- */
.support-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9001; /* Выше всего */
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none; /* Скрыто по умолчанию */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.support-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.support-modal {
    background: #1e1f22;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    width: 90%;
    max-width: 500px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.support-modal-overlay.open .support-modal {
    transform: scale(1) translateY(0);
}

.support-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.support-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.support-modal-close {
    background: none;
    border: none;
    color: #72767d;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    border-radius: 50%;
    transition: 0.2s;
}
.support-modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.support-modal-body {
    padding: 24px;
}

.support-form-group {
    margin-bottom: 20px;
}

.support-form-group label {
    display: block;
    color: #b5bac1;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.support-form-group select, 
.support-form-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.support-form-group select:focus, 
.support-form-group textarea:focus {
    border-color: #5865f2;
    background: rgba(0,0,0,0.3);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

/* --- SUPPORT PRIORITY BUTTONS (HORIZONTAL) --- */
.priority-select {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}


.priority-option {
    flex: 1; /* Растягиваем кнопки на всю ширину */
    position: relative;
    cursor: pointer;
}

.priority-option:hover { background: rgba(255,255,255,0.05); }
.priority-option:has(input:checked) {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}

.priority-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}
.priority-dot.low { background: #23a55a; color: #23a55a; }
.priority-dot.medium { background: #f0b132; color: #f0b132; }
.priority-dot.high { background: #ed4245; color: #ed4245; }

.support-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0,0,0,0.1);
}

.support-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.support-btn.secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #b5bac1;
}
.support-btn.secondary:hover { background: rgba(255,255,255,0.05); color: #fff; }

.support-btn.primary {
    background: linear-gradient(135deg, #5865f2 0%, #a020f0 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}
.support-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.5);
    transform: translateY(-1px);
}

/* --- CHAT OVERLAY (FIXED & PREMIUM) --- */
.support-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    display: none; /* Скрыто */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.support-chat-overlay[style*="display: flex"] {
    opacity: 1;
}

.support-chat-panel {
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background: rgba(22, 23, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.support-chat-overlay[style*="display: flex"] .support-chat-panel {
    transform: scale(1) translateY(0);
}

.support-chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
}

/* Скроллбар чата */
.support-chat-messages::-webkit-scrollbar { width: 6px; }
.support-chat-messages::-webkit-scrollbar-track { background: transparent; }
.support-chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.1);
    border-radius: 20px;
}

.support-chat-input {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    background: rgba(0,0,0,0.1);
}

.support-chat-input textarea {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    color: #dbdee1;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.support-chat-input textarea:focus {
    border-color: #5865f2;
    background: rgba(0, 0, 0, 0.3);
}

/* Пузыри сообщений */
.msg-row {
    animation: msgPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

@keyframes msgPopIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.msg-bubble-user {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px 18px 4px 18px;
    padding: 12px 16px;
    color: #fff;
    max-width: 75%;
    align-self: flex-end;
    word-wrap: break-word;
}

.msg-bubble-admin {
    background: rgba(40, 42, 46, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    color: #dbdee1;
    max-width: 75%;
    align-self: flex-start;
    word-wrap: break-word;
}

.msg-sender-name {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    padding: 0 8px;
}

.msg-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 6px;
    text-align: right;
    font-weight: 500;
}




































/* --- SUPPORT PRIORITY BUTTONS --- */
.priority-select {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.priority-option {
    flex: 1;
    position: relative;
}

.priority-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
}

/* Визуальная часть кнопки */
.priority-btn-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    color: #949ba4;
    user-select: none;
}

/* Цвета при выборе */
.priority-option:hover .priority-btn-visual {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.priority-option input:checked + .priority-btn-visual.low {
    background: rgba(35, 165, 90, 0.15);
    border-color: #23a55a;
    color: #23a55a;
    box-shadow: 0 0 15px rgba(35, 165, 90, 0.2);
}


/* Средний (Желтый) */
.priority-option input:checked + .priority-btn-visual.medium {
    background: rgba(240, 177, 50, 0.15);
    border-color: #f0b132;
    color: #f0b132;
    box-shadow: 0 0 15px rgba(240, 177, 50, 0.2);
}
/* Высокий (Красный) */
.priority-option input:checked + .priority-btn-visual.high {
    background: rgba(237, 66, 69, 0.15);
    border-color: #ed4245;
    color: #ed4245;
    box-shadow: 0 0 15px rgba(237, 66, 69, 0.2);
}
/* --- FIX TABS SWITCHING --- */
.support-section {
    display: none; /* Скрываем все секции по умолчанию */
    animation: fadeIn 0.3s ease;
}

.support-section.active {
    display: block; /* Показываем активную */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}






/* ─────────────────────────────────────────────────────────────
МОДАЛ ПРЕДУПРЕЖДЕНИЯ (стиль Заметок)
───────────────────────────────────────────────────────────── */
#linkWarningModal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; transition: opacity 0.3s ease;
}

#linkWarningModal.open {
  display: flex; opacity: 1;
}

.lw-card {
  position: relative;
  width: 92%; max-width: 440px;
  background: linear-gradient(180deg, #1e1f22 0%, #151619 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(88, 101, 242, 0.4);
  border-radius: 16px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(88, 101, 242, 0.1);
  padding: 24px 28px 28px;
  text-align: center;
  opacity: 0; transform: scale(0.96) translateY(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

#linkWarningModal.open .lw-card {
  opacity: 1; transform: scale(1) translateY(0);
}

/* Шиммер-полоса сверху */
.lw-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.6), transparent);
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 0.7; transform: translateX(100%); }
}

/* Эффект свечения при наведении */
.lw-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), 
              rgba(88, 101, 242, 0.12) 0%, transparent 60%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.lw-card:hover::after { opacity: 1; }

/* Заголовок */
.lw-header {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 14px; position: relative;
}
.lw-icon {
  font-size: 36px; filter: drop-shadow(0 4px 12px rgba(237, 66, 69, 0.4));
  animation: pulseIcon 2s infinite ease-in-out;
}
@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.lw-title {
  font-size: 18px; font-weight: 700; color: #fff; margin: 0;
}

/* Текст */
.lw-text {
  font-size: 14px; color: rgba(255, 255, 255, 0.85);
  line-height: 1.6; margin: 0 0 18px;
}

/* Превью ссылки */
#lw-url-preview {
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: #5865f2; word-break: break-all;
  margin: 0 0 22px; max-height: 64px; overflow-y: auto;
  transition: background 0.2s, border-color 0.2s;
}
#lw-url-preview:hover {
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.4);
}

/* Кнопки */
.lw-buttons {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.lw-btn {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(88, 101, 242, 0.1) 100%);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 10px; padding: 10px 18px;
  color: #5865f2; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1; min-width: 90px; max-width: 140px;
}
.lw-btn::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(88, 101, 242, 0.35);
  transform: translate(-50%, -50%); transition: width 0.5s, height 0.5s;
}
.lw-btn:hover::before { width: 280px; height: 280px; }
.lw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35);
  border-color: rgba(88, 101, 242, 0.5);
}
.lw-btn:active { transform: translateY(0); }

/* Красная кнопка удаления */
#lw-delete {
  background: linear-gradient(135deg, rgba(237, 66, 69, 0.2) 0%, rgba(237, 66, 69, 0.1) 100%);
  border-color: rgba(237, 66, 69, 0.3); color: #ed4245;
}
#lw-delete::before { background: rgba(237, 66, 69, 0.35); }
#lw-delete:hover {
  box-shadow: 0 6px 20px rgba(237, 66, 69, 0.35);
  border-color: rgba(237, 66, 69, 0.5);
}

/* Кнопка отмены (нейтральная) */
#lw-cancel {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.85);
}
#lw-cancel::before { background: rgba(255, 255, 255, 0.15); }
#lw-cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Скроллбар для превью */
#lw-url-preview::-webkit-scrollbar { width: 6px; }
#lw-url-preview::-webkit-scrollbar-track { background: transparent; }
#lw-url-preview::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5865f2, #4752c4);
  border-radius: 3px;
}

.nav-icon-btn {
  background: none;
  border: none;
  color: #b9bbbe;
  cursor: pointer;
  font-size: 17px;
  padding: 6px;
  border-radius: 6px;
  transition: all .15s;
  margin-left: 4px;
}

.nav-icon-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* Сдвиг чата при открытой панели */
.gallery-open #voicepanel,
.gallery-open .chat-container {
  margin-right: 420px;
  transition: margin-right .3s cubic-bezier(.4,0,.2,1);
}



















.media-panel {
  position: fixed; top: 0; right: -450px; width: 450px; height: 100vh;
  background: linear-gradient(180deg, #1e1f22 0%, #151619 100%);
  border-left: 2px solid rgba(88, 101, 242, 0.3);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6), inset 1px 0 0 rgba(255, 255, 255, 0.05);
  z-index: 1000; display: flex; flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden;
}
.media-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.5), transparent);
  animation: shimmer 3s infinite;
}
.media-panel.open { right: 0; animation: panelSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.media-panel.open::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(88, 101, 242, 0.1) 0%, transparent 50%);
  pointer-events: none; opacity: 0; animation: fadeIn 0.5s forwards;
}

.media-header {
  padding: 20px; background: rgba(30, 31, 36, 0.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex;
  align-items: center; justify-content: space-between; font-weight: 700;
  font-size: 16px; color: #fff; position: relative; overflow: hidden;
}
.media-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, transparent 50%); pointer-events: none;
}
.media-header span { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.media-header button {
  background: rgba(237, 66, 69, 0.15); border: 1px solid rgba(237, 66, 69, 0.3);
  border-radius: 8px; width: 36px; height: 36px; color: rgba(255, 255, 255, 0.7);
  cursor: pointer; font-size: 20px; display: flex; align-items: center;
  justify-content: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; z-index: 1;
}
.media-header button:hover {
  background: rgba(237, 66, 69, 0.3); border-color: rgba(237, 66, 69, 0.5);
  color: #fff; transform: rotate(90deg) scale(1.1); box-shadow: 0 0 20px rgba(237, 66, 69, 0.4);
}

.media-tabs {
  display: flex; padding: 12px 16px; gap: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap; background: rgba(0,0,0,0.15);
}
.media-tabs .tab {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(88, 101, 242, 0.1) 100%);
  border: 1px solid rgba(88, 101, 242, 0.3); border-radius: 8px;
  padding: 10px 16px; color: #5865f2; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden; flex: 1; min-width: 70px;
}
.media-tabs .tab::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  border-radius: 50%; background: rgba(88, 101, 242, 0.3);
  transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s;
}
.media-tabs .tab:hover::before { width: 300px; height: 300px; }
.media-tabs .tab:hover {
  transform: translateY(-2px); box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
  border-color: rgba(88, 101, 242, 0.5);
}
.media-tabs .tab:active { transform: translateY(0); }
.media-tabs .tab.active {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.4) 0%, rgba(88, 101, 242, 0.2) 100%);
  color: #fff; border-color: rgba(88, 101, 242, 0.6); box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}

.media-content {
  flex: 1; padding: 20px; overflow-y: auto; outline: none;
  color: rgba(255, 255, 255, 0.9); background: transparent; scroll-behavior: smooth;
}
.media-content::-webkit-scrollbar { width: 8px; }
.media-content::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
.media-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5865f2 0%, #4752c4 100%); border-radius: 4px; transition: background 0.3s;
}
.media-content::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #6b77ff 0%, #5865f2 100%); }

/* Медиа-элементы (в стиле todo-item) */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 15px; }
.media-grid img {
  width: 100%; height: 100px; object-fit: cover; border-radius: 10px; cursor: pointer;
  transition: all 0.3s; border: 1px solid rgba(255,255,255,0.05);
}
.media-grid img:hover {
  transform: scale(1.05); border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.2);
}
.media-item {
  display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 14px;
  background: rgba(255, 255, 255, 0.04); border-radius: 10px; border-left: 3px solid #5865f2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); animation: slideIn 0.3s ease-out;
  position: relative; overflow: hidden; cursor: pointer;
}
.media-item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
}
.media-item:hover {
  background: rgba(255, 255, 255, 0.06); transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.media-item:hover::before { opacity: 1; }
.media-icon { font-size: 24px; flex-shrink: 0; position: relative; z-index: 1; }
.media-info { flex: 1; overflow: hidden; position: relative; z-index: 1; }
.media-name {
  font-size: 13px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,0.9);
}
.media-meta { font-size: 11px; opacity: 0.5; margin-top: 2px; }
.media-link { color: #5865f2; text-decoration: none; word-break: break-all; font-size: 13px; }
.media-link:hover { text-decoration: underline; }
.empty-state {
  text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.3);
  font-size: 14px; animation: pulse 2s infinite;
}
.chat-container.media-open #messagesArea,
.chat-container.media-open .message-input-wrap { margin-right: 450px; transition: margin-right 0.4s cubic-bezier(0.4, 0, 0.2, 1); }


























.chat-header { position: relative; z-index: 50; }

/* Выпадающая панель поиска */
.av-search-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  width: 380px;
  background: #1e1f22;
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 811px;
}

.av-search-popover.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Одна строка */
.av-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background 0.15s;
}

.av-search-row:focus-within {
  background: rgba(255,255,255,0.04);
}

/* Иконка */
.av-search-icon {
  color: #b5bac1;
  flex-shrink: 0;
  margin-left: 2px;
}

/* Поле ввода */
#avSearchInput {
  flex: 1;
  background: none;
  border: none;
  color: #dbdee1;
  font-size: 14px;
  outline: none;
  padding: 4px 2px;
  min-width: 0;
}
#avSearchInput::placeholder { color: #6d6f78; }

/* Кнопка очистки */
.av-search-clear {
  background: none;
  border: none;
  color: #b5bac1;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  border-radius: 4px;
}
.av-search-clear:hover {
  color: #f23f43;
  background: rgba(242,63,67,0.12);
}

/* Разделитель */
.av-search-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Счётчик */
.av-search-counter {
  font-size: 12px;
  color: #949ba4;
  font-weight: 500;
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
  padding: 4px 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
}

/* Кнопки навигации ↑ ↓ */
.av-search-nav-btn {
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  color: #b5bac1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.av-search-nav-btn:hover:not(:disabled) {
  background: rgba(88,101,242,0.25);
  color: #dbdee1;
}

.av-search-nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.av-search-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Подсветка совпадений в сообщениях */
.av-highlight {
  background: rgba(250,176,50,0.35);
  color: #fff;
  border-radius: 2px;
  padding: 1px 2px;
  box-shadow: 0 0 0 1px rgba(250,176,50,0.5);
}
.av-highlight.active {
  background: rgba(88,101,242,0.5);
  box-shadow: 0 0 0 2px rgba(88,101,242,0.7);
}

/* Скрытие сообщений при поиске */
.msg-group.av-hidden,
.msg-cont.av-hidden {
  display: none;
}


















.notes-panel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: linear-gradient(180deg, #1e1f22 0%, #151619 100%);
  border-left: 2px solid rgba(88, 101, 242, 0.3);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6), 
              inset 1px 0 0 rgba(255, 255, 255, 0.05);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.notes-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.5), transparent);
  animation: shimmer 3s infinite;
}

.notes-panel.open {
  right: 0;
}

.notes-panel.open::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              rgba(88, 101, 242, 0.1) 0%, 
              transparent 50%);
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
}

/* Анимация мерцания */
@keyframes shimmer {
  0%, 100% { opacity: 0.3; transform: translateX(-100%); }
  50% { opacity: 0.6; transform: translateX(100%); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Шапка с эффектом стекла */
.notes-header {
  padding: 20px;
  background: rgba(30, 31, 36, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.notes-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.notes-header span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-header button {
  background: rgba(237, 66, 69, 0.15);
  border: 1px solid rgba(237, 66, 69, 0.3);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.notes-header button:hover {
  background: rgba(237, 66, 69, 0.3);
  border-color: rgba(237, 66, 69, 0.5);
  color: #fff;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(237, 66, 69, 0.4);
}





.notes-toolbar button {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(88, 101, 242, 0.1) 100%);
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 8px;
  padding: 10px 16px;
  color: #5865f2;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 100px;
}

.notes-toolbar button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.notes-toolbar button:hover::before {
  width: 300px;
  height: 300px;
}

.notes-toolbar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
  border-color: rgba(88, 101, 242, 0.5);
}

.notes-toolbar button:active {
  transform: translateY(0);
}

/* Контент с плавной прокруткой */
#notesContent {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  scroll-behavior: smooth;
}

#notesContent::-webkit-scrollbar {
  width: 8px;
}

#notesContent::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

#notesContent::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #5865f2 0%, #4752c4 100%);
  border-radius: 4px;
  transition: background 0.3s;
}

#notesContent::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6b77ff 0%, #5865f2 100%);
}

#notesContent:empty::before {
  content: attr(placeholder);
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  display: block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Задачи с анимацией */
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border-left: 3px solid #5865f2;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.todo-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.todo-item:hover::before {
  opacity: 1;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.todo-check {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #5865f2;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}

.todo-check:hover {
  transform: scale(1.2);
}

.todo-check:checked + .todo-text {
  animation: strike 0.3s ease-out;
}

@keyframes strike {
  0% { transform: scaleX(1); }
  50% { transform: scaleX(1.05); }
  100% { transform: scaleX(1); }
}

.todo-text {
  flex: 1;
  outline: none;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.todo-text.done {
  text-decoration: line-through;
  opacity: 0.5;
  animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0.5; }
}

/* Разделители с анимацией */
.notes-line {
  border-bottom: 2px dashed rgba(88, 101, 242, 0.3);
  margin: 20px 0;
  padding-bottom: 20px;
  position: relative;
  animation: dashDraw 1s ease-out;
}

@keyframes dashDraw {
  from {
    border-bottom-width: 0;
    opacity: 0;
  }
  to {
    border-bottom-width: 2px;
    opacity: 1;
  }
}

/* Статус сохранения */
#notesStatus {
  font-size: 11px;
  opacity: 0.6;
  transition: all 0.3s;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

#notesStatus:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* Адаптив */
@media (max-width: 1200px) {
  .notes-panel {
    width: 380px;
    right: -380px;
  }
  
  .chat-container.notes-open #messagesArea,
  .chat-container.notes-open .message-input-wrap {
    margin-right: 0;
  }
}

/* Эффект свечения при фокусе */
.notes-panel:focus-within {
  box-shadow: -8px 0 50px rgba(88, 101, 242, 0.2);
}

/* Анимация появления панели */
.notes-panel.open {
  animation: panelSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelSlide {
  from {
    right: -450px;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}


.search-result-row {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #2b2d31;
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-row:hover { background: #2b2d31; }
.search-result-row:last-child { border-bottom: none; }

.search-row-avatar {
  position: relative;
  width: 40px; height: 40px;
  margin-right: 12px;
  flex-shrink: 0;
}
.search-row-avatar img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.search-row-status {
  position: absolute;
  bottom: 0; right: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #1e1f22;
}
.search-row-status.online { background: var(--online, #00b894); }
.search-row-status.offline { background: var(--text-muted, #636e72); }
.search-row-status.idle { background: var(--idle, #fdcb6e); }

.search-row-info {
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}
.search-row-name {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-row-state {
  font-size: 12px;
  color: var(--text-muted, #949ba4);
  margin-top: 2px;
}
.search-row-id {
  font-size: 11px;
  color: #6C5CE7;
  font-family: monospace;
  margin-top: 2px;
}

.search-row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.search-action-btn {
  width: 28px; height: 28px;
  border: none;
  border-radius: 6px;
  background: #2b2d31;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.search-action-btn:hover { background: #6C5CE7; }
.search-action-btn.call { background: #00b894; }
.search-action-btn.call:hover { background: #00a383; }

.search-empty {
  padding: 16px 12px;
  color: var(--text-muted, #949ba4);
  text-align: center;
  font-size: 13px;
}




/* ── CSS VARIABLES ── */
:root {
  --bg-dark:          #0d0e12;
  --sidebar-bg:       #111318;
  --sidebar-secondary:#16181f;
  --channel-bg:       #1a1d27;
  --hover:            #1e2130;
  --active:           #252a3a;
  --border:           rgba(255,255,255,0.06);
  --text-primary:     #e8eaf0;
  --text-secondary:   #8b90a0;
  --text-muted:       #585e73;
  --accent:           #6C5CE7;
  --accent2:          #00CEC9;
  --accent-glow:      rgba(108,92,231,0.3);
  --online:           #43b581;
  --idle:             #faa61a;
  --dnd:              #f04747;
  --unread:           #f04747;
  --pill:             #e8eaf0;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  display: flex;
  height: 100vh;
}

img { display: block; }
button { font-family: inherit; }
a { text-decoration: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }


/* ============================================================
   SERVER BAR (far left)
   ============================================================ */

.server-bar {
  width: 72px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  z-index: 10;
}
.server-bar::-webkit-scrollbar { display: none; }

.server-sep {
  width: 32px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin: 4px 0;
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: border-radius .2s, transform .15s;
  flex-shrink: 0;
  user-select: none;
}
.server-icon:hover          { border-radius: 14px; transform: scale(1.05); }
.server-icon.active         { border-radius: 14px; }

/* Active pill on the left */
.server-icon.active::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 40px;
  background: var(--pill);
  border-radius: 0 4px 4px 0;
  top: 50%;
  transform: translateY(-50%);
}

.server-icon.home { background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 22px; }
.server-icon.s1   { background: linear-gradient(135deg, #6C5CE7, #a29bfe); }
.server-icon.s2   { background: linear-gradient(135deg, #fd79a8, #fdcb6e); }
.server-icon.s3   { background: linear-gradient(135deg, #00cec9, #55efc4); }

.server-icon.add  { background: var(--channel-bg); color: var(--online); font-size: 24px; font-weight: 300; }
.server-icon.add:hover { background: var(--online); color: white; border-radius: 14px; }

.server-badge {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 16px; height: 16px;
  background: var(--unread);
  border-radius: 50%;
  border: 2px solid var(--sidebar-bg);
  font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: white;
}


/* ============================================================
   CHANNEL SIDEBAR
   ============================================================ */

.channel-sidebar {
  width: 240px;
  background: var(--sidebar-secondary);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.sidebar-header:hover { background: var(--hover); }

.sidebar-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-server-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-chevron { color: var(--text-secondary); font-size: 12px; }

/* DM list scroll area */
.dm-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Section labels */
.section-label {
  padding: 16px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.section-label:hover { color: var(--text-secondary); }
.section-add { font-size: 18px; line-height: 1; font-weight: 400; }

/* ── NAV BUTTON ITEMS ── */
.nav-btn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 12px;
  margin: 1px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all .12s;
  position: relative;
  text-decoration: none;
}
.nav-btn-item:hover  { background: var(--hover); color: var(--text-primary); }
.nav-btn-item.active { background: var(--active); color: var(--text-primary); }

.nav-icon {
  width: 32px; height: 32px;
  background: var(--channel-bg);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.nav-btn-item.active .nav-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.nav-badge {
  margin-left: auto;
  background: var(--unread);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

/* ── DM ITEMS ── */
.dm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 4px 12px;
  margin: 1px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s;
}
.dm-item:hover          { background: var(--hover); }
.dm-item:hover .dm-close { opacity: 1; }
.dm-item.active         { background: var(--active); }

.dm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.dm-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.dm-status {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--sidebar-secondary);
}
.dm-status.online  { background: var(--online); }
.dm-status.idle    { background: var(--idle); }
.dm-status.dnd     { background: var(--dnd); }
.dm-status.offline { background: var(--text-muted); }

.dm-info { flex: 1; min-width: 0; }
.dm-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-item:hover .dm-name,
.dm-item.active .dm-name { color: var(--text-primary); }

.dm-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-close {
  opacity: 0;
  color: var(--text-muted);
  font-size: 16px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all .1s;
}
.dm-close:hover { color: var(--text-primary); background: var(--hover); }

.notif-dot {
  width: 8px; height: 8px;
  background: var(--unread);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── USER PANEL ── */
.user-panel {
  padding: 8px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-panel-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}
.user-panel-avatar img { width: 100%; height: 100%; border-radius: 50%; }

.user-panel-status {
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  background: var(--online);
  border-radius: 50%;
  border: 2px solid var(--sidebar-bg);
}

.user-panel-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.user-panel-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-panel-id {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-panel-actions { display: flex; gap: 2px; }

.panel-action-btn {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .1s;
}
.panel-action-btn:hover { background: var(--hover); color: var(--text-primary); }
.panel-action-btn.muted { color: var(--dnd); }


/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--channel-bg);
  min-width: 0;
  position: relative;
}

/* ── LOGIN WALL ── */
.login-wall {
  position: absolute;
  inset: 0;
  background: rgba(13,14,18,.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.login-card {
  background: var(--sidebar-secondary);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 44px 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.55), 0 0 0 1px rgba(108,92,231,.18);
  animation: cardIn .3s ease;
}

@keyframes cardIn {
  from { transform: scale(.95); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.login-logo {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.login-card h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.login-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}

.login-actions { display: flex; flex-direction: column; gap: 10px; }

.btn-login {
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.btn-login.primary {
  background: linear-gradient(135deg, var(--accent), #8b7cf8);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-login.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-login.secondary {
  background: var(--hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-login.secondary:hover { background: var(--active); }


/* ── PAGE VIEWS ── */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.page.active { display: flex; }


/* ── CHANNEL HEADER ── */
.channel-header {
  height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
  flex-shrink: 0;
}
.channel-header-icon   { font-size: 20px; color: var(--text-muted); }
.channel-header-name   { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.channel-header-sep    { width: 1px; height: 20px; background: var(--border); }
.channel-header-topic  { font-size: 13px; color: var(--text-secondary); }

.header-actions { margin-left: auto; display: flex; gap: 4px; }

.header-btn {
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: all .1s;
}
.header-btn:hover { background: var(--hover); color: var(--text-primary); }


/* ── FRIENDS / GENERIC PAGE CONTENT ── */
.friends-page {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.friends-page-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.friends-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  transition: all .12s;
}
.friends-tab:hover         { color: var(--text-primary); }
.friends-tab.active        { color: var(--text-primary); border-bottom-color: var(--accent); }
.friends-tab.green         { color: var(--online); }
.friends-tab.green:hover   { color: white; background: var(--online); border-radius: 4px; }
.friends-tab.green.active  { border-bottom-color: var(--online); }

.tab-badge {
  background: var(--unread);
  color: white;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 11px;
  margin-left: 4px;
}

.friends-search {
  display: block;
  width: 280px;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  margin-bottom: 16px;
  transition: border-color .15s;
}
.friends-search:focus { border-color: var(--accent); }
.friends-search::placeholder { color: var(--text-muted); }

.friends-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  padding: 14px 0 6px;
}

/* Your ID box */
.your-id-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
}
.your-id-label { color: var(--text-muted); font-weight: 600; }
.your-id-val {
  color: var(--accent2);
  font-weight: 700;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: .05em;
}
.copy-id-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all .1s;
}
.copy-id-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }


/* ── FRIEND ROWS ── */
.friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .1s;
  margin: 2px 0;
  border-top: 1px solid var(--border);
}
.friend-row:first-of-type { border-top: none; }
.friend-row:hover { background: var(--hover); }

.friend-row-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.friend-row-avatar img { width: 100%; height: 100%; border-radius: 50%; }

.friend-row-status {
  position: absolute;
  bottom: 0; right: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--channel-bg);
}

.friend-row-info { flex: 1; min-width: 0; }
.friend-row-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.friend-row-state {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-outgoing { color: var(--online) !important; }
.call-incoming  { color: var(--accent2) !important; }
.call-missed    { color: var(--dnd) !important; }
.online-text    { color: var(--online) !important; }

.friend-row-actions { display: flex; gap: 8px; }

.friend-action {
  width: 36px; height: 36px;
  background: var(--channel-bg);
  border: none;
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .12s;
  flex-shrink: 0;
}
.friend-action:hover       { background: var(--hover); color: var(--text-primary); }
.friend-action.call:hover  { background: var(--online); color: white; }


/* ── MESSAGES PAGE ── */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.system-msg {
  padding: 8px 16px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.system-icon { font-size: 20px; flex-shrink: 0; }
.system-msg strong { color: var(--text-primary); margin-left: 2px; }

.msg-group {
  padding: 2px 16px;
  display: flex;
  gap: 16px;
  transition: background .08s;
  position: relative;
}
.msg-group:hover { background: rgba(255,255,255,.02); }

.msg-group-header { padding: 8px 16px 2px; }

.msg-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.msg-avatar img { width: 100%; height: 100%; border-radius: 50%; }

.msg-body { flex: 1; min-width: 0; }
.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.msg-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
}
.msg-name:hover { text-decoration: underline; }
.msg-name.accent { color: var(--accent2); }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-text { font-size: 14px; color: var(--text-primary); line-height: 1.55; }
.msg-text.continuation { padding-left: 56px; }

.msg-timestamp {
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0;
  width: 40px;
  text-align: right;
  transition: opacity .1s;
}
.msg-group:hover .msg-timestamp { opacity: 1; }

/* Message input */
.message-input-wrap {
  padding: 0 16px 16px;
  flex-shrink: 0;
}
.message-input-box {
  background: var(--hover);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 14px;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.message-input-box:focus-within { border-color: rgba(108,92,231,.5); }

.msg-input-btn {
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: all .1s;
  flex-shrink: 0;
}
.msg-input-btn:hover { color: var(--text-primary); background: var(--active); }

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 0;
  caret-color: var(--accent);
}
.message-input::placeholder { color: var(--text-muted); }


/* ── ACCOUNT PAGE ── */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--hover);
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.profile-avatar-wrap {
  width: 80px; height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}
.profile-avatar-wrap img { width: 100%; height: 100%; }

.profile-info { flex: 1; }
.profile-name { font-size: 20px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.profile-id   { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.badge-premium {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.badge-online {
  background: var(--channel-bg);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  border: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE — mobile toggle
   ============================================================ */
@media (max-width: 768px) {
  .server-bar { display: none; }

  .channel-sidebar {
    position: fixed;
    left: -240px;
    top: 0; bottom: 0;
    z-index: 200;
    transition: left .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .channel-sidebar.open { left: 0; }

  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 300;
    width: 36px; height: 36px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
  }
}










   * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #6C5CE7;
            --primary-light: #A29BFE;
            --primary-dark: #4A3FB5;
            --accent: #00CEC9;
            --accent-light: #55EFC4;
            --bg-dark: #0F0E17;
            --bg-card: #1A1932;
            --bg-card-hover: #232248;
            --text-primary: #FFFFFE;
            --text-secondary: #A7A9BE;
            --text-muted: #6B6D80;
            --gradient-1: linear-gradient(135deg, #6C5CE7, #00CEC9);
            --gradient-2: linear-gradient(135deg, #FD79A8, #6C5CE7);
            --gradient-3: linear-gradient(135deg, #00CEC9, #55EFC4);
            --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-dark);
            color: var(--text-primary);
            overflow-x: hidden;
            line-height: 1.6;
        }

        /* Animated Background */
        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            overflow: hidden;
            pointer-events: none;
        }

        .bg-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.15;
            animation: orbFloat 20s ease-in-out infinite;
        }

        .bg-orb:nth-child(1) {
            width: 600px;
            height: 600px;
            background: var(--primary);
            top: -200px;
            right: -200px;
            animation-delay: 0s;
        }

        .bg-orb:nth-child(2) {
            width: 500px;
            height: 500px;
            background: var(--accent);
            bottom: -150px;
            left: -150px;
            animation-delay: -7s;
        }

        .bg-orb:nth-child(3) {
            width: 400px;
            height: 400px;
            background: #FD79A8;
            top: 50%;
            left: 50%;
            animation-delay: -14s;
        }

        @keyframes orbFloat {
            0%, 100% { transform: translate(0, 0) scale(1); }
            25% { transform: translate(50px, -80px) scale(1.1); }
            50% { transform: translate(-30px, 50px) scale(0.9); }
            75% { transform: translate(80px, 30px) scale(1.05); }
        }

        /* Navigation */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            padding: 16px 40px;
            transition: all 0.4s ease;
            backdrop-filter: blur(20px);
            background: rgba(15, 14, 23, 0.7);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .navbar.scrolled {
            padding: 12px 40px;
            background: rgba(15, 14, 23, 0.95);
        }

        .nav-container {
            max-width: 1280px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .nav-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            font-size: 24px;
            font-weight: 800;
            color: var(--text-primary);
        }

        .nav-logo svg {
            width: 36px;
            height: 36px;
        }

        .nav-logo span {
            background: var(--gradient-1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            align-items: center;
            gap: 32px;
            list-style: none;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-secondary);
            font-size: 15px;
            font-weight: 500;
            transition: color 0.3s ease;
            position: relative;
        }

        .nav-links a:hover {
            color: var(--text-primary);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--gradient-1);
            transition: width 0.3s ease;
            border-radius: 1px;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        .nav-btn {
            padding: 10px 24px;
            background: var(--gradient-1);
            border: none;
            border-radius: 12px;
            color: white;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
        }

        .nav-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-glow);
        }

        .mobile-toggle {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            background: none;
            border: none;
            padding: 4px;
        }

        .mobile-toggle span {
            width: 24px;
            height: 2px;
            background: var(--text-primary);
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        /* Hero Section */
        .hero {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            align-items: center;
            padding: 120px 40px 80px;
        }

        .hero-container {
            max-width: 1280px;
            margin: 0 auto;
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 60px;
            align-items: center;
        }

        .hero-content {
            animation: fadeInUp 1s ease forwards;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: rgba(108, 92, 231, 0.15);
            border: 1px solid rgba(108, 92, 231, 0.3);
            border-radius: 100px;
            font-size: 13px;
            font-weight: 500;
            color: var(--primary-light);
            margin-bottom: 24px;
        }

        .hero-badge .pulse-dot {
            width: 8px;
            height: 8px;
            background: var(--accent);
            border-radius: 50%;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.5); }
        }

        .hero h1 {
            font-size: 64px;
            font-weight: 900;
            line-height: 1.1;
            margin-bottom: 24px;
            letter-spacing: -2px;
        }

        .hero h1 .gradient-text {
            background: var(--gradient-1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero-description {
            font-size: 18px;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 40px;
            max-width: 500px;
        }

        .hero-actions {
            display: flex;
            gap: 16px;
            align-items: center;
            margin-bottom: 48px;
        }

        .btn-primary {
            padding: 16px 32px;
            background: var(--gradient-1);
            border: none;
            border-radius: 16px;
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 40px rgba(108, 92, 231, 0.4);
        }

        .btn-secondary {
            padding: 16px 32px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-3px);
        }

        .hero-stats {
            display: flex;
            gap: 40px;
        }

        .stat-item {
            display: flex;
            flex-direction: column;
        }

        .stat-number {
            font-size: 32px;
            font-weight: 800;
            background: var(--gradient-1);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .stat-label {
            font-size: 14px;
            color: var(--text-muted);
            font-weight: 500;
        }

        /* Hero Visual */
        .hero-visual {
            position: relative;
            animation: fadeInUp 1s ease 0.3s forwards;
            opacity: 0;
        }

        .phone-mockup {
            width: 320px;
            height: 640px;
            background: var(--bg-card);
            border-radius: 40px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            margin: 0 auto;
            overflow: hidden;
            position: relative;
            box-shadow: var(--shadow), var(--shadow-glow);
        }

        .phone-notch {
            width: 120px;
            height: 28px;
            background: var(--bg-dark);
            border-radius: 0 0 20px 20px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }

        .phone-screen {
            padding: 16px;
            height: calc(100% - 28px);
            display: flex;
            flex-direction: column;
        }

        .phone-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 0 16px;
        }

        .phone-header h3 {
            font-size: 20px;
            font-weight: 700;
        }

        .phone-header-icons {
            display: flex;
            gap: 12px;
        }

        .phone-header-icons span {
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .phone-search {
            padding: 10px 16px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            color: var(--text-muted);
            font-size: 13px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .online-friends {
            display: flex;
            gap: 16px;
            padding: 0 0 20px;
            overflow-x: auto;
        }

        .online-friend {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 60px;
        }

        .online-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            position: relative;
            overflow: hidden;
            border: 2px solid var(--accent);
        }

        .online-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .online-dot {
            position: absolute;
            bottom: 1px;
            right: 1px;
            width: 12px;
            height: 12px;
            background: var(--accent);
            border-radius: 50%;
            border: 2px solid var(--bg-card);
        }

        .online-name {
            font-size: 11px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .friend-list-phone {
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
            overflow: hidden;
        }

        .friend-item-phone {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.03);
            border-radius: 14px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .friend-item-phone:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .friend-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            position: relative;
            overflow: hidden;
        }

        .friend-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

     
        .friend-name {
            font-size: 14px;
            font-weight: 600;
        }

        .friend-status {
            font-size: 12px;
            color: var(--text-muted);
        }

        .friend-call-btn {
            width: 36px;
            height: 36px;
            background: var(--gradient-3);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        /* Floating Elements */
        .floating-card {
            position: absolute;
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 16px;
            box-shadow: var(--shadow);
            animation: floatCard 6s ease-in-out infinite;
        }

        .floating-card-1 {
            top: 60px;
            right: -40px;
            animation-delay: 0s;
        }

        .floating-card-2 {
            bottom: 120px;
            left: -50px;
            animation-delay: -3s;
        }

        @keyframes floatCard {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-15px); }
        }

        .fc-row {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .fc-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
        }

        .fc-text {
            font-size: 13px;
            font-weight: 600;
        }

        .fc-sub {
            font-size: 11px;
            color: var(--text-muted);
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Features Section */
        .features {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .features-container {
            max-width: 1280px;
            margin: 0 auto;
        }

        .section-header {
            text-align: center;
            margin-bottom: 64px;
        }

        .section-tag {
            display: inline-block;
            padding: 6px 16px;
            background: rgba(108, 92, 231, 0.15);
            border-radius: 100px;
            font-size: 13px;
            font-weight: 600;
            color: var(--primary-light);
            margin-bottom: 16px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .section-title {
            font-size: 48px;
            font-weight: 800;
            letter-spacing: -1px;
            margin-bottom: 16px;
        }

        .section-desc {
            font-size: 18px;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .feature-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 24px;
            padding: 36px;
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        .feature-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--gradient-1);
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .feature-card:hover {
            transform: translateY(-8px);
            border-color: rgba(108, 92, 231, 0.3);
            box-shadow: var(--shadow-glow);
        }

        .feature-card:hover::before {
            opacity: 1;
        }

        .feature-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-bottom: 20px;
        }

        .feature-card h3 {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .feature-card p {
            font-size: 15px;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        /* Call Demo Section */
        .call-demo {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .call-demo-container {
            max-width: 1280px;
            margin: 0 auto;
        }

        .call-demo-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 80px;
            align-items: center;
        }

        .call-ui {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 32px;
            padding: 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .call-ui::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(108, 92, 231, 0.1) 0%, transparent 70%);
            animation: rotateBg 20s linear infinite;
        }

        @keyframes rotateBg {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .call-ui-content {
            position: relative;
            z-index: 1;
        }

        .call-avatar-large {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            margin: 0 auto 24px;
            position: relative;
            overflow: hidden;
        }

        .call-avatar-large img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .call-ring {
            position: absolute;
            top: -8px;
            left: -8px;
            right: -8px;
            bottom: -8px;
            border: 3px solid var(--primary);
            border-radius: 50%;
            animation: ringPulse 2s ease-in-out infinite;
        }

        .call-ring:nth-child(2) {
            top: -18px;
            left: -18px;
            right: -18px;
            bottom: -18px;
            animation-delay: 0.5s;
        }

        @keyframes ringPulse {
            0%, 100% { opacity: 0.5; transform: scale(1); }
            50% { opacity: 0; transform: scale(1.1); }
        }

        .call-name {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .call-status-text {
            font-size: 16px;
            color: var(--accent);
            font-weight: 500;
            margin-bottom: 40px;
        }

        .call-controls {
            display: flex;
            justify-content: center;
            gap: 20px;
        }

        .call-control-btn {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
        }

        .call-control-btn:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.15);
        }

        .call-control-btn.end-call {
            background: #FF4757;
            width: 64px;
            height: 64px;
        }

        .call-control-btn.end-call:hover {
            background: #FF3344;
            box-shadow: 0 8px 30px rgba(255, 71, 87, 0.4);
        }

        .call-control-btn.active {
            background: var(--primary);
        }

        .call-info-text {
            margin-bottom: 24px;
        }

        .call-info-text h3 {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .call-info-text p {
            color: var(--text-secondary);
            font-size: 16px;
        }

        .call-info-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .call-info-item {
            display: flex;
            align-items: flex-start;
            gap: 16px;
        }

        .call-info-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }

        .call-info-item h4 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .call-info-item p {
            font-size: 14px;
            color: var(--text-muted);
            line-height: 1.5;
        }

        /* Friends Section */
        .friends {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .friends-container {
            max-width: 1280px;
            margin: 0 auto;
        }

        .friends-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 24px;
        }



        .friend-card:hover {
            transform: translateY(-8px);
            border-color: rgba(108, 92, 231, 0.3);
            box-shadow: var(--shadow-glow);
        }

        .friend-card-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            margin: 0 auto 16px;
            position: relative;
            overflow: hidden;
        }

        .friend-card-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .friend-card-status {
            position: absolute;
            bottom: 2px;
            right: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 3px solid var(--bg-card);
        }

        .friend-card-status.online {
            background: var(--accent);
        }

        .friend-card-status.offline {
            background: var(--text-muted);
        }

        .friend-card-name {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .friend-card-last {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 16px;
        }

        .friend-card-actions {
            display: flex;
            gap: 8px;
            justify-content: center;
        }

        .fc-action-btn {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .fc-action-btn.voice {
            background: rgba(108, 92, 231, 0.2);
            color: var(--primary-light);
        }

        .fc-action-btn.video {
            background: rgba(0, 206, 201, 0.2);
            color: var(--accent);
        }

        .fc-action-btn:hover {
            transform: scale(1.15);
        }

        /* Pricing Section */
        .pricing {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .pricing-container {
            max-width: 1080px;
            margin: 0 auto;
        }

        .pricing-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .pricing-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 24px;
            padding: 40px 32px;
            transition: all 0.4s ease;
            position: relative;
        }

        .pricing-card.popular {
            border-color: var(--primary);
            background: linear-gradient(180deg, rgba(108, 92, 231, 0.1) 0%, var(--bg-card) 100%);
        }

        .pricing-card:hover {
            transform: translateY(-8px);
        }

        .popular-badge {
            position: absolute;
            top: -12px;
            left: 50%;
            transform: translateX(-50%);
            padding: 6px 20px;
            background: var(--gradient-1);
            border-radius: 100px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .pricing-name {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .pricing-price {
            font-size: 48px;
            font-weight: 900;
            margin-bottom: 8px;
        }

        .pricing-price span {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-muted);
        }

        .pricing-desc {
            font-size: 14px;
            color: var(--text-muted);
            margin-bottom: 32px;
            line-height: 1.6;
        }

        .pricing-features {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 14px;
            margin-bottom: 32px;
        }

        .pricing-features li {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            color: var(--text-secondary);
        }

        .pricing-features li .check {
            color: var(--accent);
            font-size: 16px;
        }

        .pricing-btn {
            width: 100%;
            padding: 14px;
            border-radius: 14px;
            border: none;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .pricing-btn.primary {
            background: var(--gradient-1);
            color: white;
        }

        .pricing-btn.secondary {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
        }

        .pricing-btn:hover {
            transform: translateY(-2px);
        }

        /* CTA Section */
        .cta {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .cta-container {
            max-width: 900px;
            margin: 0 auto;
            text-align: center;
        }

        .cta-box {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 32px;
            padding: 64px 48px;
            position: relative;
            overflow: hidden;
        }

        .cta-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--gradient-1);
        }

        .cta-box::after {
            content: '';
            position: absolute;
            bottom: -100px;
            right: -100px;
            width: 300px;
            height: 300px;
            background: var(--primary);
            border-radius: 50%;
            filter: blur(100px);
            opacity: 0.15;
        }

        .cta-content {
            position: relative;
            z-index: 1;
        }

        .cta h2 {
            font-size: 42px;
            font-weight: 800;
            margin-bottom: 16px;
            letter-spacing: -1px;
        }

        .cta p {
            font-size: 18px;
            color: var(--text-secondary);
            margin-bottom: 40px;
            max-width: 500px;
            margin-left: auto;
            margin-right: auto;
        }

        .cta-actions {
            display: flex;
            gap: 16px;
            justify-content: center;
        }

        /* Footer */
        .footer {
            position: relative;
            z-index: 1;
            padding: 60px 40px 30px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .footer-container {
            max-width: 1280px;
            margin: 0 auto;
        }

        .footer-grid {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr;
            gap: 48px;
            margin-bottom: 48px;
        }

        .footer-brand p {
            color: var(--text-muted);
            font-size: 14px;
            line-height: 1.7;
            margin-top: 12px;
            max-width: 300px;
        }

        .footer-col h4 {
            font-size: 14px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 16px;
            color: var(--text-secondary);
        }

        .footer-col ul {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .footer-col ul a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 14px;
            transition: color 0.3s ease;
        }

        .footer-col ul a:hover {
            color: var(--text-primary);
        }

        .footer-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 24px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .footer-bottom p {
            color: var(--text-muted);
            font-size: 13px;
        }

        .footer-socials {
            display: flex;
            gap: 12px;
        }

        .footer-socials a {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 14px;
        }

        .footer-socials a:hover {
            background: var(--primary);
            color: white;
        }

        /* Scroll animations */
        .reveal {
            opacity: 0;
            transform: translateY(40px);
            transition: all 0.8s ease;
        }

        .reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .hero-container {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .hero-description {
                margin: 0 auto 40px;
            }

            .hero-actions {
                justify-content: center;
            }

            .hero-stats {
                justify-content: center;
            }

            .hero-visual {
                order: -1;
            }

            .phone-mockup {
                width: 280px;
                height: 560px;
            }

            .floating-card {
                display: none;
            }

            .features-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .call-demo-grid {
                grid-template-columns: 1fr;
            }

            .friends-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .pricing-grid {
                grid-template-columns: 1fr;
                max-width: 400px;
                margin: 0 auto;
            }

            .footer-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                padding: 12px 20px;
            }

            .nav-links {
                display: none;
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: rgba(15, 14, 23, 0.98);
                flex-direction: column;
                padding: 20px;
                gap: 16px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            }

            .nav-links.active {
                display: flex;
            }

            .mobile-toggle {
                display: flex;
            }

            .hero {
                padding: 100px 20px 60px;
            }

            .hero h1 {
                font-size: 40px;
                letter-spacing: -1px;
            }

            .hero-description {
                font-size: 16px;
            }

            .hero-actions {
                flex-direction: column;
                align-items: center;
            }

            .section-title {
                font-size: 32px;
            }

            .features-grid {
                grid-template-columns: 1fr;
            }

            .friends-grid {
                grid-template-columns: 1fr;
                max-width: 320px;
                margin: 0 auto;
            }

            .cta h2 {
                font-size: 28px;
            }

            .cta-actions {
                flex-direction: column;
                align-items: center;
            }

            .footer-grid {
                grid-template-columns: 1fr;
                gap: 32px;
            }

            .footer-bottom {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }
        }

        /* Waveform animation */
        .waveform {
            display: flex;
            align-items: center;
            gap: 3px;
            justify-content: center;
            margin-bottom: 24px;
        }

        .wave-bar {
            width: 4px;
            background: var(--gradient-1);
            border-radius: 2px;
            animation: waveAnim 1.2s ease-in-out infinite;
        }

        .wave-bar:nth-child(1) { height: 20px; animation-delay: 0s; }
        .wave-bar:nth-child(2) { height: 32px; animation-delay: 0.1s; }
        .wave-bar:nth-child(3) { height: 44px; animation-delay: 0.2s; }
        .wave-bar:nth-child(4) { height: 32px; animation-delay: 0.3s; }
        .wave-bar:nth-child(5) { height: 20px; animation-delay: 0.4s; }

        @keyframes waveAnim {
            0%, 100% { transform: scaleY(1); }
            50% { transform: scaleY(0.4); }
        }

        /* Particles */
        .particles {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            pointer-events: none;
        }

        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: var(--primary-light);
            border-radius: 50%;
            opacity: 0.3;
            animation: particleFloat 8s ease-in-out infinite;
        }

        @keyframes particleFloat {
            0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
            50% { transform: translateY(-100px) translateX(50px); opacity: 0.1; }
        }

        /* Scroll indicator */
        .scroll-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            animation: scrollBounce 2s ease-in-out infinite;
        }

        .scroll-indicator span {
            font-size: 12px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .scroll-mouse {
            width: 24px;
            height: 38px;
            border: 2px solid var(--text-muted);
            border-radius: 12px;
            position: relative;
        }

        .scroll-mouse::after {
            content: '';
            position: absolute;
            top: 6px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 8px;
            background: var(--text-muted);
            border-radius: 2px;
            animation: scrollDot 2s ease-in-out infinite;
        }

        @keyframes scrollDot {
            0%, 100% { top: 6px; opacity: 1; }
            50% { top: 18px; opacity: 0.3; }
        }

        @keyframes scrollBounce {
            0%, 100% { transform: translateX(-50%) translateY(0); }
            50% { transform: translateX(-50%) translateY(10px); }
        }

        /* Testimonials */
        .testimonials {
            position: relative;
            z-index: 1;
            padding: 100px 40px;
        }

        .testimonials-container {
            max-width: 1280px;
            margin: 0 auto;
        }

        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
        }

        .testimonial-card {
            background: var(--bg-card);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 24px;
            padding: 32px;
            transition: all 0.4s ease;
        }

        .testimonial-card:hover {
            transform: translateY(-4px);
            border-color: rgba(108, 92, 231, 0.2);
        }

        .testimonial-stars {
            display: flex;
            gap: 4px;
            margin-bottom: 16px;
            color: #FDCB6E;
            font-size: 14px;
        }

        .testimonial-text {
            font-size: 15px;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 20px;
        }

        .testimonial-author {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .testimonial-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            overflow: hidden;
        }

        .testimonial-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .testimonial-name {
            font-size: 14px;
            font-weight: 600;
        }

        .testimonial-role {
            font-size: 12px;
            color: var(--text-muted);
        }

        @media (max-width: 768px) {
            .testimonials-grid {
                grid-template-columns: 1fr;
            }
        }
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		/* ============================================================
   AirVoice — Full Redesign CSS
   Dark Glassmorphism + Cyber Accents + Heavy Animations
   ============================================================ */

/* ── FONTS & RESET ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg0:       #03050f;
  --bg1:       #080d1a;
  --bg2:       #0d1221;
  --bg3:       #121828;
  --bg4:       #1a2235;
  --bg5:       #1e2840;
  --glass:     rgba(255,255,255,0.03);
  --glass-b:   rgba(255,255,255,0.06);
  --glass-h:   rgba(255,255,255,0.09);
  --border:    rgba(255,255,255,0.06);
  --border-h:  rgba(255,255,255,0.12);

  --accent:    #6366f1;
  --accent2:   #818cf8;
  --accent3:   #a5b4fc;
  --cyan:      #22d3ee;
  --green:     #22c55e;
  --red:       #f43f5e;
  --yellow:    #f59e0b;
  --pink:      #ec4899;

  --txt1:  #f1f5f9;
  --txt2:  #94a3b8;
  --txt3:  #475569;
  --txt4:  #2d3a50;

  --online:  #22c55e;
  --idle:    #f59e0b;
  --dnd:     #f43f5e;
  --offline: #475569;

  --server-bar-w: 60px;
  --sidebar-w:    240px;
  --radius:       12px;
  --radius-lg:    18px;
  --radius-xl:    24px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow:    0 8px 32px rgba(0,0,0,.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,.7);
  --glow-a:    0 0 30px rgba(99,102,241,.25);
  --glow-c:    0 0 20px rgba(34,211,238,.2);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg0);
  color: var(--txt1);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── AMBIENT BACKGROUND ─────────────────────────────────── */
.bg-orbs {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-delay: 0s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #22d3ee 0%, transparent 70%);
  bottom: -150px; right: -100px;
  animation-delay: -7s;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  top: 50%; right: 30%;
  animation-delay: -14s;
  opacity: .15;
}
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%  { transform: translate(30px,-40px) scale(1.05); }
  66%  { transform: translate(-20px,20px) scale(.96); }
}

.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── LAYOUT ─────────────────────────────────────────────── */
body { display: flex; height: 100vh; position: relative; z-index: 2; }

.server-bar {
  width: var(--server-bar-w);
  flex-shrink: 0;
  background: var(--bg0);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
}

.channel-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition: width .3s cubic-bezier(.4,0,.2,1), transform .3s ease;
  overflow: hidden;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
}

/* ── SERVER ICONS ───────────────────────────────────────── */
.server-icon {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: var(--bg4);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  position: relative;
  transition: border-radius .25s ease, background .2s, box-shadow .2s, transform .15s;
  color: var(--txt2);
  flex-shrink: 0;
}
.server-icon:hover {
  border-radius: 10px;
  background: var(--bg5);
  border-color: var(--accent);
  box-shadow: var(--glow-a);
  transform: scale(1.05);
  color: var(--txt1);
}
.server-icon.active {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-color: transparent;
  box-shadow: var(--glow-a);
  color: #fff;
}
.server-icon .icon-glow {
  position: absolute; inset: -4px;
  border-radius: inherit;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  opacity: 0; filter: blur(6px);
  transition: opacity .3s;
}
.server-icon.active .icon-glow { opacity: .5; }
.server-sep {
  width: 28px; height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin: 4px 0;
}
.server-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg0);
}

/* ── SIDEBAR HEADER ─────────────────────────────────────── */
.sidebar-header {
  padding: 16px 14px 12px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: var(--glow-a);
}
.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -.3px;
  background: linear-gradient(135deg, var(--txt1), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.icon-btn {
  background: none; border: none; cursor: pointer;
  color: var(--txt3); font-size: 18px; padding: 4px 6px;
  border-radius: 6px; transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--txt1); background: var(--glass-b); }

/* ── NAV ITEMS ──────────────────────────────────────────── */
.sidebar-nav {
  padding: 8px 8px 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  color: var(--txt2);
  transition: background .15s, color .15s, transform .1s;
  position: relative;
  flex-shrink: 0;
}
.nav-item:hover {
  background: var(--glass-b);
  color: var(--txt1);
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(99,102,241,.2) 0%, rgba(99,102,241,.05) 100%);
  color: var(--accent3);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.nav-item-icon {
  width: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-item-label { flex: 1; font-size: 13.5px; font-weight: 500; }
.nav-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
}

/* ── SIDEBAR DIVIDER ────────────────────────────────────── */
.sidebar-divider {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 6px;
  flex-shrink: 0;
}
.divider-label {
  font-size: 11px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--txt3);
}
.divider-add {
  width: 20px; height: 20px;
  background: none; border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer; color: var(--txt3);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.divider-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── DM LIST ────────────────────────────────────────────── */
.dm-list {
  flex: 1; overflow-y: auto; padding: 4px 8px;
  scrollbar-width: thin; scrollbar-color: var(--bg5) transparent;
}
.dm-list::-webkit-scrollbar { width: 4px; }
.dm-list::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; }

.dm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  position: relative;
  animation: dmSlideIn .3s ease forwards;
  opacity: 0;
}
@keyframes dmSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.dm-item:hover { background: var(--glass-b); transform: translateX(2px); }
.dm-item.active {
  background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(99,102,241,.05));
  border-left: 2px solid var(--accent);
  padding-left: 6px;
}
.dm-avatar-wrap { position: relative; flex-shrink: 0; }
.dm-avatar-letter {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: var(--bg5);
}
.dm-status {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg2);
}
.dm-status.online  { background: var(--online); }
.dm-status.idle    { background: var(--idle); }
.dm-status.dnd     { background: var(--dnd); }
.dm-status.offline { background: var(--offline); }

.dm-info { flex: 1; min-width: 0; }
.dm-name { font-size: 13px; font-weight: 600; color: var(--txt1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-sub  { font-size: 12px; color: var(--txt3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dm-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; gap: 8px;
}
.dm-placeholder-icon { font-size: 32px; opacity: .3; }
.dm-placeholder-text { font-size: 12px; color: var(--txt3); }

/* ── USER PANEL ─────────────────────────────────────────── */
.user-panel {
  padding: 10px 12px;
  background: var(--bg0);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.user-panel:hover { background: var(--bg1); }
.user-avatar-wrap { position: relative; flex-shrink: 0; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
.user-status-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg0);
}
.user-status-dot.online { background: var(--online); }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--txt1); }
.user-id   { font-size: 11px; color: var(--txt3); font-family: 'Space Mono', monospace; }
.user-controls { display: flex; gap: 2px; }
.ctrl-btn {
  width: 28px; height: 28px;
  background: none; border: none; cursor: pointer;
  color: var(--txt3); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.ctrl-btn:hover { color: var(--txt1); background: var(--glass-b); }
.ctrl-btn.muted { color: var(--red); }

/* ── PAGE STRUCTURE ─────────────────────────────────────── */
.page { display: none; flex-direction: column; height: 100%; animation: pageIn .25s ease; }
.page.active { display: flex; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(99,102,241,.06) 0%, transparent 60%);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.page-header-left { display: flex; align-items: center; gap: 12px; }
.page-header-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(99,102,241,.1));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent2);
  box-shadow: var(--glow-a);
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 20px; letter-spacing: -.4px;
  color: var(--txt1);
}

/* Tab pills */
.page-header-tabs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tab-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--txt2);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif;
}
.tab-pill:hover { background: var(--glass-b); color: var(--txt1); border-color: var(--border-h); }
.tab-pill.active {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  border-color: transparent; color: #fff;
  box-shadow: var(--glow-a);
}
.tab-pill-add {
  background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(99,102,241,.05));
  border-color: rgba(99,102,241,.3); color: var(--accent2);
}
.tab-pill-add:hover { background: linear-gradient(135deg, var(--accent), #4f46e5); color: #fff; border-color: transparent; }
.tab-count {
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 8px; min-width: 16px;
}

/* Search field */
.page-header-search { margin-left: auto; }
.search-field {
  position: relative; display: flex; align-items: center;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.2); }
.search-icon { color: var(--txt3); flex-shrink: 0; }
.search-field input {
  background: none; border: none; outline: none;
  color: var(--txt1); font-size: 13px; width: 180px;
  font-family: 'DM Sans', sans-serif;
}
.search-field input::placeholder { color: var(--txt3); }
.search-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg3);
  border: 1px solid var(--border-h);
  border-radius: 12px;
  z-index: 100; display: none;
  max-height: 300px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}
.search-dropdown.open { display: block; animation: dropIn .15s ease; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── PAGE BODY ──────────────────────────────────────────── */
.page-body {
  flex: 1; overflow-y: auto; padding: 20px 24px;
  display: flex; flex-direction: column; gap: 16px;
  scrollbar-width: thin; scrollbar-color: var(--bg5) transparent;
}
.page-body::-webkit-scrollbar { width: 4px; }
.page-body::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; }

/* ── YOUR ID CARD ───────────────────────────────────────── */
.your-id-card {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(99,102,241,.04));
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  animation: cardReveal .4s ease;
}
.your-id-left { display: flex; align-items: center; gap: 12px; }
.your-id-icon { font-size: 20px; }
.your-id-label { font-size: 11px; color: var(--txt3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.your-id-val {
  font-family: 'Space Mono', monospace;
  font-size: 14px; color: var(--accent2); font-weight: 700;
}
.copy-btn {
  display: flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 8px; padding: 7px 14px;
  color: var(--accent2); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}
.copy-btn:hover { background: var(--accent); color: #fff; border-color: transparent; box-shadow: var(--glow-a); }

/* ── FRIENDS GRID ───────────────────────────────────────── */
.friends-grid { display: flex; flex-direction: column; gap: 6px; }

.friend-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
  animation: cardReveal .35s ease backwards;
}
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.friend-card:hover {
  background: var(--glass-b);
  border-color: var(--border-h);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.friend-av {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  position: relative; flex-shrink: 0;
}
.friend-status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--bg2);
}

.friend-name { font-size: 14px; font-weight: 600; color: var(--txt1); }
.friend-state { font-size: 12px; color: var(--txt3); margin-top: 1px; }
.friend-actions { display: flex; gap: 6px; }
.action-btn {
  width: 34px; height: 34px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer; color: var(--txt2);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.action-btn:hover { background: var(--accent); border-color: transparent; color: #fff; box-shadow: var(--glow-a); }
.action-btn.danger:hover { background: var(--red); box-shadow: 0 0 20px rgba(244,63,94,.3); }

/* ── SECTION LABELS ─────────────────────────────────────── */
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--txt3);
  padding-bottom: 8px;
}
.grid-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 32px; justify-content: center; color: var(--txt3);
}

/* ── LIST CARD ──────────────────────────────────────────── */
.list-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--glass-b); }
.channel-row { cursor: pointer; }
.row-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: color-mix(in srgb, var(--av-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--av-color) 40%, transparent);
  color: var(--av-color);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.row-info { flex: 1; min-width: 0; }
.row-name { font-size: 14px; font-weight: 600; color: var(--txt1); }
.row-sub  { font-size: 12px; color: var(--txt3); }
.row-sub.outgoing { color: var(--accent2); }
.row-sub.incoming { color: var(--green); }
.row-sub.missed   { color: var(--red); }
.row-sub.online-txt { color: var(--green); }
.row-actions { display: flex; gap: 6px; }
.channel-hash {
  width: 32px; text-align: center;
  color: var(--txt3); font-size: 16px; flex-shrink: 0;
}
.action-btn-sm {
  padding: 5px 12px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 6px; color: var(--accent2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}
.action-btn-sm:hover { background: var(--accent); color: #fff; border-color: transparent; }

/* ── CHAT HEADER ────────────────────────────────────────── */
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(99,102,241,.05) 0%, transparent 60%);
  flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-peer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 15px;
}
.chat-peer-name { font-weight: 700; font-size: 15px; color: var(--txt1); }
.chat-peer-status { font-size: 12px; color: var(--txt3); }
.chat-header-actions { display: flex; gap: 4px; }
.hdr-btn {
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  color: var(--txt3); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.hdr-btn:hover { background: var(--glass-b); color: var(--accent2); }

/* ── CHAT EMPTY ─────────────────────────────────────────── */
.chat-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; padding: 40px;
}
.chat-empty-visual { position: relative; width: 100px; height: 100px; margin-bottom: 8px; }
.empty-rings { position: absolute; inset: -20px; }
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(99,102,241,.2);
  animation: ringPulse 3s ease-in-out infinite;
}
.ring-1 { inset: 0; animation-delay: 0s; }
.ring-2 { inset: -16px; animation-delay: .5s; }
.ring-3 { inset: -32px; animation-delay: 1s; }
@keyframes ringPulse {
  0%,100% { opacity: .6; transform: scale(1); }
  50%      { opacity: .15; transform: scale(1.05); }
}
.empty-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.empty-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 22px; }
.empty-sub { color: var(--txt3); text-align: center; max-width: 320px; font-size: 14px; }
.empty-sub .highlight { color: var(--accent2); font-weight: 700; }

/* ── MESSAGES AREA ──────────────────────────────────────── */
.messages-area {
  flex: 1; overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--bg5) transparent;
}
.messages-area::-webkit-scrollbar { width: 4px; }
.messages-area::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; }

/* System message */
.sys-message {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 0 8px;
  color: var(--txt3); font-size: 12px;
}
.sys-line { flex: 1; height: 1px; background: var(--border); }

/* Message groups */
.msg-group {
  display: flex; gap: 14px; padding: 2px 4px;
  border-radius: 8px;
  transition: background .1s;
  animation: msgIn .2s ease backwards;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg-group:hover { background: rgba(255,255,255,.02); }
.msg-av-wrap { width: 40px; flex-shrink: 0; padding-top: 2px; }
.msg-av {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.msg-body { flex: 1; min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.msg-author { font-weight: 700; font-size: 14px; }
.msg-timestamp { font-size: 11px; color: var(--txt3); }
.msg-text { color: var(--txt1); font-size: 14px; line-height: 1.55; word-break: break-word; }
.msg-continuation {
  padding: 1px 0 1px 54px;
  color: var(--txt1); font-size: 14px; line-height: 1.55;
  border-radius: 6px;
  transition: background .1s;
}
.msg-continuation:hover { background: rgba(255,255,255,.02); }

/* Image preview */
.img-preview {
  max-width: 320px; max-height: 240px;
  border-radius: 10px; display: block; margin-top: 6px;
  cursor: zoom-in; border: 1px solid var(--border);
  object-fit: cover;
  transition: transform .2s, box-shadow .2s;
}
.img-preview:hover { transform: scale(1.01); box-shadow: var(--shadow); }

/* Voice message */
.voice-message {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  max-width: 280px; margin-top: 6px;
}
.voice-play-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  transition: all .15s; flex-shrink: 0;
}
.voice-play-btn:hover { background: var(--accent2); transform: scale(1.05); }
.voice-progress-wrap { flex: 1; }
.voice-progress-bar {
  height: 4px; background: var(--bg5);
  border-radius: 2px; overflow: hidden;
}
.voice-progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width .15s;
}
.voice-duration { font-size: 11px; color: var(--txt3); margin-top: 3px; }

/* ── CHAT INPUT ─────────────────────────────────────────── */
.chat-input-wrap {
  padding: 12px 16px 16px;
  flex-shrink: 0;
  position: relative;
}
.chat-input-box {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 10px;
  transition: border-color .2s, box-shadow .2s;
}
.chat-input-box:focus-within {
  border-color: rgba(99,102,241,.4);
  box-shadow: 0 0 0 2px rgba(99,102,241,.12);
}
.input-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--txt3); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.input-btn:hover { background: var(--glass-b); color: var(--accent2); }
.input-btn.voice-btn:hover { color: var(--red); }
.input-btn.recording { color: var(--red); animation: pulse 1s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.chat-textarea {
  flex: 1; background: none; border: none; outline: none;
  color: var(--txt1); font-size: 14px; resize: none;
  line-height: 1.5; padding: 4px 0;
  max-height: 120px; overflow-y: auto;
  font-family: 'DM Sans', sans-serif;
  scrollbar-width: none;
}
.chat-textarea::placeholder { color: var(--txt3); }
.input-right { display: flex; align-items: flex-end; gap: 4px; }

.record-duration {
  font-size: 12px; color: var(--red);
  font-family: 'Space Mono', monospace;
  min-width: 32px;
}

.send-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--accent);
  border: none; border-radius: 10px; cursor: pointer;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  box-shadow: var(--glow-a);
}
.send-btn:hover { background: var(--accent2); transform: scale(1.05); box-shadow: 0 0 20px rgba(99,102,241,.5); }

/* ── EMOJI PICKER ───────────────────────────────────────── */
.emoji-picker {
  position: absolute; bottom: calc(100% + 8px); right: 16px;
  width: 300px;
  background: var(--bg3);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100; display: none;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.emoji-picker.open { display: block; animation: dropIn .15s ease; }
.emoji-tabs {
  display: flex; gap: 2px; padding: 8px;
  border-bottom: 1px solid var(--border);
}
.emoji-tab {
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  font-size: 18px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.emoji-tab:hover, .emoji-tab.active { background: var(--glass-h); }
.emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 2px; padding: 8px; max-height: 200px; overflow-y: auto;
}
.emoji-btn {
  aspect-ratio: 1; background: none; border: none;
  cursor: pointer; font-size: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s, transform .1s;
}
.emoji-btn:hover { background: var(--glass-h); transform: scale(1.2); }

/* ── CALL OVERLAY ───────────────────────────────────────── */
.call-overlay {
  position: fixed; inset: 0;
  background: rgba(3,5,15,.9);
  backdrop-filter: blur(24px);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  animation: fadeIn .3s ease;
}
.call-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.call-card {
  position: relative;
  background: linear-gradient(160deg, var(--bg3), var(--bg2));
  border: 1px solid var(--border-h);
  border-radius: 28px;
  padding: 48px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden; min-width: 320px;
}
.call-bg-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.cr {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(99,102,241,.15);
  animation: callRing 3s ease-in-out infinite;
}
.cr-1 { width: 200px; height: 200px; animation-delay: 0s; }
.cr-2 { width: 300px; height: 300px; animation-delay: .5s; }
.cr-3 { width: 400px; height: 400px; animation-delay: 1s; }
@keyframes callRing {
  0%,100% { opacity: .5; transform: scale(1); }
  50%      { opacity: .1; transform: scale(1.03); }
}

.call-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 36px; color: #fff;
  border: 3px solid rgba(99,102,241,.4);
  box-shadow: 0 0 40px rgba(99,102,241,.3);
  position: relative; z-index: 1;
  animation: avatarPulse 2s ease-in-out infinite;
}
@keyframes avatarPulse {
  0%,100% { box-shadow: 0 0 30px rgba(99,102,241,.3); }
  50%      { box-shadow: 0 0 60px rgba(99,102,241,.5); }
}
.call-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 22px; z-index: 1; }
.call-status { font-size: 13px; color: var(--txt3); z-index: 1; }
.call-timer { font-family: 'Space Mono', monospace; font-size: 18px; color: var(--accent2); z-index: 1; min-height: 26px; }

.call-controls {
  display: flex; gap: 20px; margin-top: 16px; z-index: 1;
}
.call-ctrl {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s; color: #fff;
}
.mute-ctrl   { background: var(--bg5); }
.mute-ctrl:hover   { background: var(--bg4); transform: scale(1.05); }
.speaker-ctrl { background: var(--bg5); }
.speaker-ctrl:hover { background: var(--bg4); transform: scale(1.05); }
.end-ctrl    { background: var(--red); box-shadow: 0 0 20px rgba(244,63,94,.4); }
.end-ctrl:hover { background: #e11d48; transform: scale(1.05); box-shadow: 0 0 30px rgba(244,63,94,.6); }

/* ── INCOMING CALL ──────────────────────────────────────── */
.incoming-call {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 1001; display: none;
}
.incoming-call.show { display: block; animation: slideInRight .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px) scale(.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.incoming-card {
  background: var(--bg3);
  border: 1px solid var(--border-h);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
}
.incoming-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px;
  animation: avatarPulse 1.5s ease-in-out infinite;
}
.incoming-name { font-weight: 700; font-size: 16px; }
.incoming-sub  { font-size: 12px; color: var(--txt3); }
.incoming-actions { display: flex; gap: 16px; margin-top: 4px; }
.incoming-btn {
  width: 48px; height: 48px; border-radius: 50%; border: none;
  cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.incoming-btn.decline { background: var(--red); box-shadow: 0 0 16px rgba(244,63,94,.4); }
.incoming-btn.decline:hover { transform: scale(1.1); box-shadow: 0 0 24px rgba(244,63,94,.6); }
.incoming-btn.accept  { background: var(--green); box-shadow: 0 0 16px rgba(34,197,94,.4); }
.incoming-btn.accept:hover  { transform: scale(1.1); box-shadow: 0 0 24px rgba(34,197,94,.6); }

/* ── MODALS ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
.modal-backdrop.open { display: flex; animation: fadeIn .2s ease; }
.modal-box {
  background: var(--bg3);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 420px; max-height: 80vh;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-hdr { display: flex; align-items: center; justify-content: space-between; }
.modal-ttl { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; }
.modal-x {
  width: 28px; height: 28px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; color: var(--txt3);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.modal-x:hover { background: var(--red); color: #fff; border-color: transparent; }
.modal-hint { font-size: 13px; color: var(--txt3); }
.modal-hint code { background: var(--bg5); padding: 2px 6px; border-radius: 4px; color: var(--accent2); font-size: 12px; }
.modal-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  transition: border-color .2s;
}
.modal-search:focus-within { border-color: var(--accent); }
.modal-search svg { color: var(--txt3); flex-shrink: 0; }
.modal-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--txt1); font-size: 14px;
  font-family: 'DM Sans', sans-serif;
}
.modal-search input::placeholder { color: var(--txt3); }
.modal-results { overflow-y: auto; max-height: 300px; display: flex; flex-direction: column; gap: 4px; }
.modal-error { color: var(--red); font-size: 13px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-btn {
  padding: 8px 18px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  transition: all .15s;
}
.modal-btn.secondary { background: var(--bg5); color: var(--txt2); }
.modal-btn.secondary:hover { background: var(--bg4); color: var(--txt1); }
.modal-btn.primary   { background: var(--accent); color: #fff; box-shadow: var(--glow-a); }
.modal-btn.primary:hover   { background: var(--accent2); }
.modal-btn.success   { background: var(--green); color: #fff; }

/* Search result rows */
.result-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; transition: background .15s;
}
.result-row:hover { background: var(--glass-h); }
.result-av {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
  position: relative;
}
.result-status {
  position: absolute; bottom: 0; right: 0;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--bg3);
}
.result-status.online  { background: var(--online); }
.result-status.offline { background: var(--offline); }
.result-info { flex: 1; min-width: 0; }
.result-name { font-size: 14px; font-weight: 600; color: var(--txt1); }
.result-sub  { font-size: 12px; color: var(--txt3); }
.result-id   { font-size: 11px; color: var(--txt3); font-family: 'Space Mono', monospace; }
.result-actions { display: flex; gap: 4px; }

/* ── PROFILE ────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--bg4), var(--bg3));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0 0 24px;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative;
}
.profile-banner {
  width: 100%; height: 100px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 30%, #22d3ee 70%, #ec4899 100%);
  position: relative;
}
.profile-banner::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='white' opacity='.1'/%3E%3C/svg%3E");
}
.profile-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 32px; color: #fff;
  border: 4px solid var(--bg3);
  margin-top: -40px; margin-left: 24px;
  position: relative; z-index: 1;
}
.profile-meta { padding: 12px 24px 0; }
.profile-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 20px; }
.profile-tags { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.profile-tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
}
.profile-tag.premium { background: rgba(250,166,26,.15); color: #faa61a; border: 1px solid rgba(250,166,26,.3); }
.profile-tag.online  { background: rgba(34,197,94,.15);  color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.profile-edit-btn {
  position: absolute; top: 110px; right: 20px;
  padding: 7px 16px;
  background: var(--bg5); border: 1px solid var(--border-h);
  border-radius: 8px; color: var(--txt1);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.profile-edit-btn:hover { background: var(--accent); border-color: transparent; box-shadow: var(--glow-a); }

/* Settings card */
.settings-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-field { flex: 1; }
.field-label { font-size: 11px; color: var(--txt3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.field-val { font-size: 14px; font-weight: 500; color: var(--txt1); }
.field-val.muted { color: var(--txt3); }
.edit-btn {
  padding: 6px 14px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 8px; color: var(--txt2);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.edit-btn:hover   { background: var(--glass-b); color: var(--txt1); }
.edit-btn.accent  { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.3); color: var(--accent2); }
.edit-btn.accent:hover { background: var(--accent); color: #fff; border-color: transparent; }

.logout-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(244,63,94,.1);
  border: 1px solid rgba(244,63,94,.25);
  border-radius: 10px;
  color: var(--red); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  width: fit-content;
  font-family: 'DM Sans', sans-serif;
}
.logout-btn:hover { background: var(--red); color: #fff; border-color: transparent; box-shadow: 0 0 20px rgba(244,63,94,.3); }

/* ── SPINNER ────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SEARCH EMPTY ───────────────────────────────────────── */
.search-empty, .modal-empty {
  padding: 20px; text-align: center; color: var(--txt3); font-size: 13px;
}

/* ── VIDEO ELEMENTS ─────────────────────────────────────── */
#localVideo {
  position: fixed; bottom: 80px; right: 20px;
  width: 160px; border-radius: 12px;
  border: 2px solid var(--border-h);
  z-index: 999; display: none;
  box-shadow: var(--shadow-lg);
}
#remoteVideo {
  position: fixed; bottom: 80px; right: 190px;
  width: 200px; border-radius: 14px;
  border: 2px solid var(--accent);
  z-index: 999; display: none;
  box-shadow: var(--shadow-lg), var(--glow-a);
}

/* ── PENDING ROWS ───────────────────────────────────────── */
.pending-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: cardReveal .3s ease backwards;
}
.pending-av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg5); display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 16px;
  color: var(--txt2); flex-shrink: 0;
}
.pending-info { flex: 1; min-width: 0; }
.pending-name { font-weight: 600; font-size: 14px; }
.pending-state { font-size: 12px; color: var(--txt3); }
.pending-actions { display: flex; gap: 6px; }
.accept-btn { background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.3) !important; color: var(--green) !important; }
.accept-btn:hover  { background: var(--green) !important; color: #fff !important; }
.decline-btn { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.25) !important; color: var(--red) !important; }
.decline-btn:hover { background: var(--red) !important; color: #fff !important; }

/* ── RESPONSIVE / SCROLLBAR ─────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 200px; }
  .page-header { padding: 10px 14px; }
  .page-body   { padding: 14px; }
}
/* Красивая карточка найденного пользователя */
.user-found-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #1e1f22;
  border: 2px solid #5865f2;
  border-radius: 12px;
  margin-top: 8px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-found-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  position: relative;
  flex-shrink: 0;
}

.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #1e1f22;
}

.status-online {
  background: #23a55a;
}

.status-offline {
  background: #80848e;
}

.user-found-info {
  flex: 1;
  min-width: 0;
}

.user-found-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-found-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.user-status-badge.status-online {
  background: #23a55a20;
  color: #23a55a;
}

.user-status-badge.status-offline {
  background: #80848e20;
  color: #80848e;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.user-id-badge {
  padding: 4px 10px;
  background: #5865f220;
  color: #5865f2;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Consolas', monospace;
}

.user-found-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #23a55a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  animation: checkPulse 0.4s ease;
}

@keyframes checkPulse {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
/* --- Стили для Модалок (Поиск и Заявки) --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}

.modal-content {
  background: #2b2d31; border-radius: 16px; width: 90%; max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5); overflow: hidden;
  animation: modalSlide .2s ease;
}
@keyframes modalSlide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  padding: 20px 20px 10px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #3e4045;
}
.modal-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0; }
.modal-close { background: none; border: none; color: #80848e; cursor: pointer; font-size: 20px; padding: 4px; border-radius: 4px; }
.modal-close:hover { background: #3e4045; color: #fff; }

.modal-body { padding: 16px 20px; max-height: 400px; overflow-y: auto; }
.modal-footer { padding: 16px 20px; border-top: 1px solid #3e4045; display: flex; justify-content: flex-end; gap: 10px; }

/* --- Карточка Заявки (Pending Request) --- */
.pending-section-label {
  font-size: 12px; font-weight: 700; color: #80848e; text-transform: uppercase;
  margin: 16px 0 8px; letter-spacing: 0.5px;
}
.pending-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; margin-bottom: 8px;
  background: #1e1f22; border-radius: 12px;
  border: 1px solid #3e4045; transition: background .2s;
}
.pending-card:hover { background: #25272c; }

.pending-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; flex-shrink: 0;
}

.pending-info { flex: 1; min-width: 0; }
.pending-name { font-weight: 600; font-size: 15px; color: #fff; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b5bac1; }
.pending-id { background: #3e4045; padding: 2px 6px; border-radius: 4px; font-family: monospace; color: #dbdee1; }

/* --- Кнопки Действий --- */
.pending-actions { display: flex; gap: 8px; flex-shrink: 0; }
.btn-action {
  padding: 8px 12px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; transition: filter .2s;
}
.btn-accept { background: #23a55a; color: white; } /* Зеленая кнопка "Добавить/Принять" */
.btn-decline { background: #ed4245; color: white; }
.btn-cancel { background: #3e4045; color: #dbdee1; }
.btn-action:hover { filter: brightness(1.1); }

/* --- Кнопка "Отправить запрос" в Поиске --- */
.btn-success {
  background: #23a55a; color: white; border: none;
  padding: 10px 20px; border-radius: 6px; cursor: pointer;
  font-weight: 600; font-size: 14px; transition: background .2s;
}
.btn-success:hover { background: #1a8f4b; }






/* Карточка друга — чистый минималистичный стиль */
.friend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.friend-card:hover {
  background: rgba(88, 101, 242, 0.08);
}

.friend-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Аватар */
.friend-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.friend-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

/* Статус на аватаре */
.friend-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #1e1f22;
}

.friend-status.online {
  background: #23a55a;
}

.friend-status.offline {
  background: #80848e;
}

/* Информация */


.friend-name {
  font-weight: 600;
  font-size: 15px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #96989d;
  margin-top: 2px;
}

.friend-id {
  font-family: 'Consolas', monospace;
  font-weight: 500;
}

.separator {
  opacity: 0.5;
}

.friend-status-text {
  font-weight: 500;
}

.friend-status-text.online {
  color: #23a55a;
}

.friend-status-text.offline {
  color: #80848e;
}

/* Кнопки действий */
.friend-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
    opacity: 1;

  transition: opacity 0.15s ease;
}



.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #96989d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.action-btn.call:hover {
  background: rgba(35, 165, 90, 0.15);
  color: #23a55a;
}

.action-btn.msg:hover {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
}

.action-btn.delete:hover {
  background: rgba(237, 66, 69, 0.15);
  color: #ed4245;
}

/* SVG иконки */
.action-btn svg {
  width: 18px;
  height: 18px;
}

/* Адаптив */
@media (max-width: 600px) {
  .friend-actions {
    opacity: 1;
  }
}