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

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: #e9f0f5;
    padding: 1rem;
}

.forum-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: #2c3e66;
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.home-link {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.forum-controls {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.primary-btn {
    background: #2c3e66;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
}

.topics-list {
    padding: 1rem 1.5rem;
}

.topic-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    cursor: pointer;
    transition: background 0.1s;
}

.topic-item:hover {
    background: #f8fafc;
}

.topic-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e2a3a;
    margin-bottom: 0.25rem;
}

.topic-meta {
    font-size: 0.8rem;
    color: #6c7a89;
}

/* Модальное окно (такое же как в чате) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
}

.close {
    float: right;
    font-size: 28px;
    cursor: pointer;
}

#topicTitle, #topicContent {
    width: 100%;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}