/* Modern CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.main-content {
    flex: 1;
    max-width: 800px;
}

.topics-sidebar {
    width: 300px;
    background: #2d2d2d;
    border-radius: 10px;
    padding: 20px;
    height: fit-content;
}

.topics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topics-header h2 {
    font-size: 1.5em;
    margin: 0;
}

#newTopicButton {
    background: #404040;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#newTopicButton:hover {
    background: #505050;
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-item {
    background: #1a1a1a;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.topic-item:hover {
    background: #2a2a2a;
}

.topic-item.active {
    background: #404040;
}

.topic-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.topic-post-count {
    font-size: 12px;
    color: #888;
}

#newTopicInput {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 14px;
}

#submit-topic {
    background: #404040;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

#submit-topic:hover {
    background: #505050;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin: 0;
    color: #ffffff;
}

header p {
    color: #888;
    margin-top: 10px;
}

.new-post {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.new-post textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 16px;
    resize: vertical;
}

.new-post button {
    background: #404040;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.new-post button:hover {
    background: #505050;
}

.post {
    background: #2d2d2d;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-actions {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.post-actions .like-button {
    font-size: 16px;
    padding: 8px 15px;
}

.post-timestamp {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.comments-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #3d3d3d;
}

.comments-list {
    margin-bottom: 15px;
}

.comment {
    background: #1a1a1a;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.comment-content {
    font-size: 14px;
    margin-bottom: 5px;
}

.comment-actions {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.like-button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-button:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}

.like-button.liked {
    color: #ff4444;
}

.comment-timestamp {
    color: #888;
    font-size: 12px;
}

.new-comment {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 15px;
}

.comment-input {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 16px;
    resize: vertical;
}

.comment-button {
    background: #404040;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.comment-button:hover {
    background: #505050;
}

footer {
    border-top: 1px solid #3d3d3d;
    margin-top: 50px;
    padding-top: 20px;
}

footer p {
    margin: 5px 0;
    line-height: 1.4;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    margin: 50px auto;
    position: relative;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.close-button:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .new-post {
        padding: 15px;
    }
    
    .comment-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .comment-button {
        width: 100%;
    }
}

.comment-section {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.comment-input::placeholder {
    color: #888;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .topics-sidebar {
        position: fixed;
        top: 0;
        right: -300px;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transition: right 0.3s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .topics-sidebar.active {
        right: 0;
    }

    .topics-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #404040;
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 1001;
        border: none;
    }

    .topics-toggle:hover {
        background: #505050;
    }

    .topics-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .topics-overlay.active {
        display: block;
    }

    .main-content {
        width: 100%;
        margin: 0;
    }

    .comment-section {
        background: #2d2d2d;
        padding: 20px;
        border-radius: 10px;
        margin: 15px 0;
    }
    
    .comment-input {
        min-height: 100px;
        font-size: 16px;
    }
    
    .comment-button {
        padding: 8px 16px;
        font-size: 14px;
    }
} 