/* Основные стили */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Страница авторизации */
.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-wrapper {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 60px);
}

.auth-left, .auth-right {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-left {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--dark-color);
}

.auth-right {
    background: white;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.brand i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.brand h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

.tagline {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 40px;
}

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

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

.feature i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Формы */
.auth-form-container {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

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

.form-header h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.form-header p {
    color: var(--gray-color);
}

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

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

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox input {
    width: 18px;
    height: 18px;
}

.checkbox span {
    color: var(--dark-color);
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #bdc3c7;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--dark-color);
}

.btn-outline:hover {
    background-color: var(--light-color);
}

/* Алерты */
.alert {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Сайдбар */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 3px solid var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    overflow-y: auto;
    min-height: 100vh;
}

/* Профиль */
.profile-cover-container {
    position: relative;
    margin-bottom: 100px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-cover {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-cover:hover .cover-overlay {
    opacity: 1;
}

.btn-cover-upload {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-cover-upload:hover {
    background: white;
    transform: scale(1.05);
}

.profile-header {
    display: flex;
    align-items: flex-end;
    position: absolute;
    bottom: -50px;
    left: 20px;
    right: 20px;
}

.profile-avatar {
    position: relative;
    margin-right: 20px;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-avatar-upload {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.btn-avatar-upload:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    margin-bottom: 20px;
}

.profile-info h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(255,255,255,0.8);
}

.profile-url {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-color);
    margin-bottom: 20px;
    background: rgba(255,255,255,0.9);
    padding: 8px 15px;
    border-radius: 20px;
    max-width: fit-content;
}

.btn-copy-url {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-copy-url:hover {
    background-color: rgba(52, 152, 219, 0.1);
    transform: scale(1.1);
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.stat {
    text-align: center;
    padding: 10px 20px;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.profile-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

/* Карточки */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.card-header h3 {
    color: var(--dark-color);
    font-size: 1.2rem;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* Контент профиля */
.profile-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-top: 60px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item i {
    color: var(--primary-color);
    margin-top: 3px;
    font-size: 1.2rem;
}

.info-item strong {
    display: block;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.info-item p {
    color: var(--gray-color);
    margin: 0;
}

/* Создание поста */
.post-creator {
    display: flex;
    gap: 15px;
}

.post-creator-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.post-creator-input {
    flex: 1;
}

.post-creator-input textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.post-creator-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.post-creator-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.btn-attachment {
    background: none;
    border: none;
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.btn-attachment:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.small {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Форма редактирования */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-section h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-with-prefix {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.input-prefix {
    padding: 12px 15px;
    background-color: var(--light-color);
    color: var(--gray-color);
    border-right: 1px solid var(--border-color);
    font-weight: 600;
}

.input-with-prefix input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 1rem;
    outline: none;
}

.file-upload-preview {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.preview-container {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-preview {
    width: 100%;
    height: 160px;
}

.preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-upload {
    position: relative;
}

.file-upload input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--light-color);
    color: var(--dark-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.file-upload-label:hover {
    background-color: #d5dbdb;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .profile-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }
    
    .auth-left, .auth-right {
        border-radius: var(--radius);
        padding: 20px;
    }
    
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        position: static;
        margin-top: 20px;
    }
    
    .profile-avatar {
        margin-bottom: 20px;
        margin-right: 0;
    }
    
    .profile-stats {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-cover {
        height: 200px;
    }
    
    .profile-avatar img {
        width: 120px;
        height: 120px;
    }
}

/* Футер авторизации */
.auth-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
}

/* Дополнительные элементы */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 15px;
    color: var(--gray-color);
}

.link {
    color: var(--primary-color);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.optional {
    color: var(--gray-color);
    font-weight: normal;
    font-size: 0.9rem;
}

/* Стили для шагов регистрации */
.registration-steps {
    margin-top: 30px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.step.active {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--gray-color);
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: white;
}

.step-info h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

/* Бейджи */
.badge {
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-left: 5px;
}

/* Карточки постов */
.post-card {
    margin-bottom: 20px;
}

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

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author-avatar {
    position: relative;
    display: block;
}

.post-author-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: var(--success-color);
    border: 2px solid white;
    border-radius: 50%;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    font-weight: 600;
    color: var(--dark-color);
    text-decoration: none;
}

.post-author-name:hover {
    text-decoration: underline;
}

.post-time {
    font-size: 0.9rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-edited {
    color: var(--gray-color);
    font-style: italic;
    font-size: 0.8rem;
}

.post-actions-dropdown {
    position: relative;
}

.btn-more {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-more:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    min-width: 150px;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--dark-color);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.post-content {
    padding: 15px;
}

.post-content p {
    margin-bottom: 15px;
    white-space: pre-line;
    line-height: 1.6;
}

.post-image {
    margin-top: 15px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.post-image img:hover {
    transform: scale(1.02);
}

.post-stats {
    display: flex;
    gap: 20px;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.post-likes, .post-comments {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-color);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
}

.post-likes:hover, .post-comments:hover {
    color: var(--primary-color);
}

.post-actions {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.post-action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-color);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.post-action-btn:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.post-action-btn.liked {
    color: var(--accent-color);
}

.post-action-btn.liked:hover {
    color: #c0392b;
}

.post-comments-section {
    padding: 15px;
    background-color: #f8f9fa;
}

.comments-list {
    margin-bottom: 15px;
}

.comment {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: var(--radius);
    transition: background-color 0.3s;
    background-color: white;
    border: 1px solid var(--border-color);
}

.comment:hover {
    background-color: var(--light-color);
}

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

.comment-content {
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
}

.comment-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.comment-delete {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
    padding: 5px;
    border-radius: 4px;
}

.comment-delete:hover {
    opacity: 1;
    color: var(--danger-color);
    background-color: rgba(231, 76, 60, 0.1);
}

.btn-show-more-comments {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 10px 0;
    width: 100%;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s;
}

.btn-show-more-comments:hover {
    color: #2980b9;
    text-decoration: underline;
}

.add-comment {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: white;
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.comment-input-wrapper {
    flex: 1;
    position: relative;
}

.comment-input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.comment-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-send-comment {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.btn-send-comment:hover {
    background-color: #2980b9;
}

/* Стили для мессенджера */
.messenger-content {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.btn-back {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-right: 15px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.chat-user-avatar {
    position: relative;
}

.chat-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.chat-user-details h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.user-status {
    font-size: 0.9rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-actions {
    position: relative;
}

.btn-chat-action {
    background: none;
    border: none;
    color: var(--gray-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-chat-action:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.chat-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.chat-actions-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.chat-actions-menu button:last-child {
    border-bottom: none;
}

.chat-actions-menu button:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa 0%, white 100%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    margin-bottom: 5px;
    max-width: 70%;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

.other-message {
    margin-right: auto;
}

.message-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 5px;
    border: 2px solid var(--primary-color);
}

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

.message-content {
    margin: 0 10px;
    max-width: calc(100% - 50px);
}

.message-text {
    background: white;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.own-message .message-text {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.message-edited {
    font-size: 0.8rem;
    color: var(--gray-color);
    font-style: italic;
    margin-right: 5px;
}

.own-message .message-edited {
    color: rgba(255, 255, 255, 0.8);
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray-color);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.own-message .message-time {
    justify-content: flex-end;
    color: rgba(255, 255, 255, 0.8);
}

.message-actions {
    position: relative;
    opacity: 0;
    transition: opacity 0.3s;
    align-self: center;
}

.message:hover .message-actions {
    opacity: 1;
}

.btn-message-action {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.btn-message-action:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.message-actions-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1000;
    display: none;
    border: 1px solid var(--border-color);
}

.message-actions-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.message-actions-menu button:last-child {
    border-bottom: none;
}

.message-actions-menu button:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.chat-input {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: white;
}

.message-form {
    display: flex;
    gap: 10px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.message-form input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.message-form input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-send {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.btn-send:hover {
    background-color: #2980b9;
}

/* Стили для списка чатов */
.chats-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s;
    border-radius: var(--radius);
    margin-bottom: 5px;
}

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

.chat-item.pinned {
    background-color: #fff9e6;
    border-left: 4px solid var(--warning-color);
}

.chat-avatar {
    position: relative;
    margin-right: 15px;
}

.chat-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.chat-info {
    flex: 1;
    min-width: 0;
}

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

.chat-header h4 {
    margin-bottom: 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.8rem;
    color: var(--gray-color);
    flex-shrink: 0;
    margin-left: 10px;
}

.chat-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-last-message {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0 5px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Стили для раздела друзей */
.friends-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    background: white;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    flex-wrap: wrap;
}

.tab-link {
    flex: 1;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    min-width: 150px;
}

.tab-link:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.tab-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
    background-color: rgba(52, 152, 219, 0.05);
}

.tab-count {
    background-color: var(--light-color);
    color: var(--dark-color);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: normal;
}

.tab-count.badge {
    background-color: var(--accent-color);
    color: white;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.friend-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.friend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.friend-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

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

.friend-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.friend-status {
    font-size: 0.9rem;
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.friend-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.btn-friend-action {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
}

.btn-friend-action:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.btn-remove-friend:hover {
    color: var(--danger-color);
    background-color: rgba(231, 76, 60, 0.1);
}

/* Стили для запросов в друзья */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.request-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s;
}

.request-card:hover {
    transform: translateY(-3px);
}

.request-user {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.request-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.request-info {
    flex: 1;
}

.request-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.request-time {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 5px;
}

.request-city {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.request-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Стили для поиска друзей */
.find-friends {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-search:hover {
    background-color: #2980b9;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.suggested-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.suggested-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.suggested-avatar {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

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

.suggested-info h4 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.suggested-city {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mutual-friends {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-bottom: 15px;
}

.suggested-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.modal-body {
    padding: 20px;
}

.image-viewer .modal-content {
    max-width: 90%;
    max-height: 90%;
    background: none;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.like-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s;
}

.like-item:hover {
    background-color: var(--light-color);
}

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

.like-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.like-item a {
    margin-left: auto;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.like-item a:hover {
    text-decoration: underline;
    background-color: rgba(52, 152, 219, 0.1);
}

.empty {
    text-align: center;
    color: var(--gray-color);
    padding: 40px 20px;
    font-style: italic;
}

/* Анимации */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Прокрутка */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Утилиты */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .friends-grid,
    .suggested-grid {
        grid-template-columns: 1fr;
    }
    
    .request-card {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .request-user {
        flex-direction: column;
        text-align: center;
    }
    
    .request-actions {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .friends-tabs {
        flex-direction: column;
    }
    
    .tab-link {
        flex: none;
        width: 100%;
        justify-content: flex-start;
        padding: 15px 20px;
    }
    
    .chat-header {
        padding: 10px 15px;
    }
    
    .chat-messages {
        padding: 15px 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}