:root {
    --primary: #ff4d88; /* Розовый акцент */
    --bg: #f5f7fa;      /* Светло-серый фон */
    --card: #ffffff;    /* Белая карточка */
    --text: #2d3436;    /* Темный текст */
    --radius: 16px;     /* Скругления */
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}


/* Чат */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 70vh; /* Высота чата */
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid #eee;
    overflow: hidden;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    position: relative;
    font-size: 15px;
}

.message-bubble.mine {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-bubble.theirs {
    background: #f1f2f6;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.delete-msg-icon {
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
    opacity: 0.6;
}

.chat-input-area {
    padding: 15px;
    background: #f9f9f9;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}








/* Шапка */
.top-nav {
    background: var(--card);
    padding: 1rem 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
}
.nav-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-decoration: none; }
.nav-links a { 
    margin-left: 20px; 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

/* Основной контент */
.content-wrapper { max-width: 1000px; margin: 30px auto; padding: 0 20px; }

/* Карточки (основа дизайна) */
.user-card, .settings-box, .profile-container {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Кнопки */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: scale(1.02); }

/* Сетка пользователей (Поиск/Главная) */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.user-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: var(--radius);
}
.user-card h4 { margin: 10px 0 5px; }

/* Формы */
input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}