/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #3498db;
}

a:hover {
    color: #2980b9;
}

.btn {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.errors {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

.left-aside {
    width: 250px;
    background: #2c3e50;
    color: #fff;
    padding: 20px;
    position: fixed;
    height: 100%;
}

main {
    flex: 1;
    margin: 0 300px 0 250px;
    padding: 20px;
    background: #fff;
    min-height: 100vh;
}

.right-aside {
    width: 300px;
    background: #ecf0f1;
    padding: 20px;
    position: fixed;
    right: 0;
    height: 100%;
}

/* Navigation */
.left-aside .logo {
    margin-bottom: 30px;
    text-align: center;
}

.left-aside .logo img {
    max-width: 100%;
    height: auto;
}

.left-aside nav ul {
    list-style: none;
}

.left-aside nav ul li {
    margin-bottom: 15px;
}

.left-aside nav ul li a {
    color: #fff;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.left-aside nav ul li a:hover {
    background: #34495e;
}

.left-aside nav ul li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Right Aside */
.right-aside .user-profile {
    text-align: center;
    padding: 20px 0;
}

.right-aside .user-profile img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #3498db;
}

.right-aside .user-profile h3 {
    margin-bottom: 5px;
}

.right-aside .user-profile p {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.edit-btn {
    display: inline-block;
    background: #2ecc71;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.edit-btn:hover {
    background: #27ae60;
}

/* Posts */
.posts {
    margin-top: 20px;
}

.post {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.post-header h3 {
    margin-right: auto;
}

.post-date {
    color: #7f8c8d;
    font-size: 0.9em;
}

.post-content p {
    margin-bottom: 15px;
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

.post-actions {
    display: flex;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.post-actions a {
    display: flex;
    align-items: center;
    margin-right: 15px;
    color: #7f8c8d;
    transition: color 0.3s;
}

.post-actions a:hover {
    color: #3498db;
}

.post-actions a i {
    margin-right: 5px;
}

.like-btn.liked {
    color: #e74c3c;
}

.delete-btn {
    color: #e74c3c !important;
}

.delete-btn:hover {
    color: #c0392b !important;
}

/* Create Post */
.create-post {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.create-post textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Profile Page */
.profile-header {
    display: flex;
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.profile-header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 30px;
    border: 5px solid #3498db;
}

.profile-info h1 {
    margin-bottom: 10px;
}

.bio {
    margin-bottom: 15px;
    color: #7f8c8d;
}

.join-date {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Auth Pages */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Comments */
.comments-section {
    margin-top: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.comment {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.comment-header h4 {
    margin-right: auto;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.8em;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: #fff;
    margin-left: 250px;
}

/* Responsive */
@media (max-width: 1200px) {
    .right-aside {
        display: none;
    }
    
    main {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .left-aside {
        width: 100%;
        position: static;
        height: auto;
    }
    
    main {
        margin: 0;
    }
    
    footer {
        margin-left: 0;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-header img {
        margin-right: 0;
        margin-bottom: 20px;
    }
}