* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
}
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
h1, h2, h3 {
    color: #1a1a2e;
    margin-bottom: 16px;
}
h1 {
    font-size: 28px;
    border-bottom: 3px solid #4a90d9;
    padding-bottom: 10px;
    display: inline-block;
}
h2 {
    font-size: 22px;
}
a {
    color: #4a90d9;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #357abd;
}
/* Меню навигации */
.nav {
    background: white;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.nav a, .nav button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.nav a {
    background: #e8f0fe;
    color: #4a90d9;
}
.nav a:hover {
    background: #d0e4fd;
    color: #357abd;
}
.nav .logout-btn {
    background: #ffe0e0;
    color: #d93025;
    margin-left: auto;
}
.nav .logout-btn:hover {
    background: #ffc0c0;
}
/* Формы */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
input, textarea, select, button {
    font-family: inherit;
    font-size: 15px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
input:focus, textarea:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}
textarea {
    min-height: 100px;
    resize: vertical;
}
button, .btn {
    background: #4a90d9;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
button:hover {
    background: #357abd;
    transform: translateY(-1px);
}
button:active {
    transform: translateY(0);
}
.btn-danger {
    background: #d93025;
}
.btn-danger:hover {
    background: #b71c1c;
}
.btn-success {
    background: #34a853;
}
.btn-success:hover {
    background: #2e7d32;
}
.btn-orange {
    background: #f9a825;
    color: white;
}
.btn-orange:hover {
    background: #e65100;
}
/* Посты */
.post {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.post-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.post-header .username {
    font-weight: 600;
    color: #1a1a2e;
}
.post-header .date {
    color: #888;
    font-size: 13px;
    margin-left: auto;
}
.post img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    margin: 10px 0;
}
.post-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.post-actions form {
    display: inline;
}
.post-actions button {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}
/* Комментарии */
.comments {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}
.comment {
    padding: 8px 12px;
    margin: 6px 0;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.comment .username {
    font-weight: 600;
    color: #4a90d9;
    font-size: 14px;
}
.comment .text {
    flex: 1;
}
.comment .comment-actions form {
    display: inline;
}
.comment .comment-actions button {
    width: auto;
    padding: 4px 10px;
    font-size: 12px;
}
/* Профиль */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4a90d9;
}
.profile-info {
    flex: 1;
}
.profile-info h1 {
    margin-bottom: 4px;
    border-bottom: none;
    display: block;
}
.profile-info .status {
    font-size: 14px;
    font-weight: 500;
}
.status-online {
    color: #34a853;
}
.status-offline {
    color: #888;
}
.profile-info .bio {
    color: #555;
    margin-top: 8px;
}
.profile-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
/* Уведомления */
.notification-item {
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 8px 0;
    border-left: 4px solid #4a90d9;
}
/* Сообщения */
.message-item {
    padding: 12px 16px;
    background: #e8f0fe;
    border-radius: 8px;
    margin: 8px 0;
}
.message-item .username {
    font-weight: 600;
    color: #4a90d9;
}
.message-item .date {
    color: #888;
    font-size: 12px;
    float: right;
}
/* Результаты поиска */
.search-item {
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    margin: 8px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.search-item a {
    font-weight: 600;
    font-size: 16px;
}
/* Адаптивность */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    .nav {
        flex-direction: column;
        align-items: stretch;
    }
    .nav .logout-btn {
        margin-left: 0;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .post-header {
        flex-wrap: wrap;
    }
}
/* ====== Боковое меню ====== */
body {
    display: flex;
    min-height: 100vh;
    margin: 0;
}
.sidebar {
    width: 220px;
    background: white;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}
.sidebar a {
    display: block;
    width: 80%;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    color: #1a1a2e;
    transition: all 0.2s;
    text-decoration: none;
}
.sidebar a:hover {
    background: #e8f0fe;
    color: #4a90d9;
}
.sidebar .logout-btn {
    background: #ffe0e0;
    color: #d93025;
    margin-top: auto;
    margin-bottom: 20px;
}
.sidebar .logout-btn:hover {
    background: #ffc0c0;
}
.sidebar .new-post-btn {
    background: #4a90d9;
    color: white;
    font-weight: 600;
    width: 90%;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.sidebar .new-post-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
}
.main-content {
    margin-left: 220px;
    flex: 1;
    padding: 20px 30px;
    max-width: 900px;
}
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        justify-content: center;
    }
    .sidebar a {
        width: auto;
        padding: 8px 12px;
        font-size: 14px;
    }
    .sidebar .new-post-btn {
        width: auto;
        margin-bottom: 0;
    }
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
}