body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f6f7f8;
    margin: 0;
    padding: 0;
    color: #1c1c1c;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    gap: 20px;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid #e4e4e4;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    align-items: center;
}

header .logo h1 a {
    color: #ff4500;
    font-size: 24px;
    font-weight: bold;
}

header .search-bar {
    flex-grow: 1;
    margin: 0 20px;
}

header .search-bar input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
}

header .user-actions button {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #ff4500;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

header .user-actions button:hover {
    background-color: #e03d00;
}

/* Sidebar */
aside.sidebar {
    width: 300px;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    margin-right: 20px;
    position: sticky;
    top: 80px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #0079d3;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
}

.sidebar-section ul li {
    margin-bottom: 10px;
}

.sidebar-section ul li a {
    color: #1c1c1c;
    text-decoration: none;
}

.sidebar-section ul li a:hover {
    text-decoration: underline;
}

.sidebar-section p {
    font-size: 14px;
    color: #787c7e;
}

/* Main container styling */
.main-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Post list */
#post-list {
    flex-grow: 1;
    max-width: calc(100% - 340px);
}

.post {
    background-color: #fff;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.post .votes {
    width: 60px;
    background-color: #f8f9fa;
    text-align: center;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post .votes button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #878a8c;
}

.post .votes button:hover {
    color: #ff4500;
}

.post .votes .voted {
    color: #ff4500;
}

.post .votes .vote-count {
    margin: 5px 0;
    font-weight: bold;
}

.post .content {
    padding: 15px;
    flex-grow: 1;
}

.post .content .post-info {
    font-size: 12px;
    color: #787c7e;
}

.post .content .post-title {
    font-size: 18px;
    margin: 5px 0;
    font-weight: bold;
}

.post .content .post-title a {
    color: #1c1c1c;
}

.post .content .post-title a:hover {
    text-decoration: underline;
}

.post .content .post-actions {
    display: flex;
    font-size: 14px;
    color: #878a8c;
    margin-top: 10px;
}

.post .content .post-actions div {
    margin-right: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.post .content .post-actions div:hover {
    color: #0079d3;
}

.post .content .post-actions div svg {
    margin-right: 5px;
}

/* Post content styling */
#post-content {
    flex-grow: 1;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    max-width: calc(100% - 340px);
}

/* Post header styling */
.post-header {
    border-bottom: 1px solid #e4e4e4;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.post-header h2 {
    margin: 0;
    font-size: 24px;
}

.post-info {
    font-size: 14px;
    color: #787c7e;
}

/* Post body styling */
.post-body {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Post actions styling */
.post-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.votes {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upvote-button, .downvote-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #878a8c;
}

.upvote-button:hover, .downvote-button:hover {
    color: #ff4500;
}

.vote-count {
    font-weight: bold;
    margin: 5px 0;
}

.share-actions, .save-action {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.share-actions i, .save-action i {
    margin-right: 5px;
}

/* Share Dropdown */
.share-dropdown {
    display: none;
    position: absolute;
    background-color: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
    margin-top: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

.share-actions:hover .share-dropdown {
    display: flex;
}

.social-icon {
    font-size: 24px;
    color: #0079d3;
    cursor: pointer;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
    color: #0056b3;
}

/* Comments section styling */
.comments-section {
    margin-top: 30px;
}

.comments-section h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #0079d3;
}

.comment {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.comment-info {
    font-size: 14px;
    color: #787c7e;
    margin-bottom: 5px;
}

.comment-body {
    font-size: 16px;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e4e4e4;
    padding: 20px 0;
    text-align: center;
    margin-top: 30px;
}

footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

footer ul li {
    margin: 0 10px;
}

footer ul li a {
    font-size: 14px;
    color: #0079d3;
}

footer ul li a:hover {
    text-decoration: underline;
}

/* Modal window */
.modal {
    display: none;
    position: fixed;
    z-index: 101;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #fff;
    margin: 100px auto;
    padding: 30px;
    border: 1px solid #e4e4e4;
    width: 400px;
    position: relative;
    border-radius: 4px;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
}

#login-form,
#signup-form {
    display: flex;
    flex-direction: column;
}

#login-form label,
#signup-form label {
    margin-top: 10px;
    font-weight: bold;
}

#login-form input,
#signup-form input {
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
}

#login-form button,
#signup-form button {
    margin-top: 20px;
    padding: 12px;
    background-color: #ff4500;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#login-form button:hover,
#signup-form button:hover {
    background-color: #e03d00;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    aside.sidebar {
        width: 100%;
        margin: 0 0 20px 0;
    }

    #post-list {
        max-width: 100%;
    }
}
