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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f8fafc;
    text-decoration: none;
}

nav a {
    color: #94a3b8;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
}

nav a:hover, nav a.active {
    color: #38bdf8;
}

/* Карточки и блоки */
.content-section {
    background: #1e293b;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #334155;
    margin: 20px 0;
}

h1, h2, h3 { color: #f8fafc; margin-bottom: 15px; }

/* Список тем на форуме */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.forum-item {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #e2e8f0;
    transition: background 0.2s;
}

.forum-item:hover {
    background: #334155;
}

.forum-item.target-topic {
    border-left: 4px solid #38bdf8;
}

.forum-meta {
    font-size: 0.85rem;
    color: #64748b;
}

/* Форма регистрации (Модалка) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #334155;
    max-width: 400px;
    width: 90%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
}

.btn-submit {
    width: 100%;
    padding: 10px;
    background: #38bdf8;
    color: #0f172a;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.alert-message {
    display: none;
    background: #065f46;
    color: #34d399;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}


.post {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.author { font-weight: bold; color: #38bdf8; }
.date { font-size: 0.85rem; color: #64748b; }

footer {
    margin-top: auto;
    background-color: #020617;
    border-top: 1px solid #1e293b;
    padding: 20px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}




.forum-item.target-topic {
    border-left: 4px solid #38bdf8;
}


.forum-item.closed-topic {
    border-left: 4px solid #ef4444;
}