/* ===== ÎÑÍÎÂÍÛÅ ÏÅÐÅÌÅÍÍÛÅ (Ò¨ÌÍÀß ÒÅÌÀ) ===== */
:root {
    --bg-primary: #0a0f1c;
    --bg-secondary: #131824;
    --bg-card: #1a202e;
    --border: #2a3242;
    --text-primary: #eef2ff;
    --text-secondary: #9ca3af;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
    --success: #10b981;
}

/* ===== ÃËÎÁÀËÜÍÛÅ ÑÒÈËÈ ===== */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== ØÀÏÊÀ ÔÎÐÓÌÀ ===== */
.forum-header {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 20px 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.forum-header h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== ÍÀÂÈÃÀÖÈß ===== */
.forum-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.forum-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.forum-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.forum-nav a.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

/* ===== ÒÀÁËÈÖÀ / ÑÅÒÊÀ ÐÀÇÄÅËÎÂ ===== */
.categories-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.category-header {
    background: var(--bg-secondary);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.category-header h2 {
    margin: 0;
    font-size: 20px;
}

.category-header h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.category-header h2 a:hover {
    color: var(--accent);
}

.category-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-item {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.topic-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.topic-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.topic-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.topic-title a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.topic-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

/* ===== ÒÅÌÀ (ÑÏÈÑÎÊ ÑÎÎÁÙÅÍÈÉ) ===== */
.post {
    background: var(--bg-card);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.post-header {
    background: var(--bg-secondary);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.author {
    font-weight: 700;
    color: var(--accent);
}

.post-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-content {
    padding: 20px;
    line-height: 1.7;
    font-size: 15px;
}

/* Ñîîáùåíèÿ îò àâòîðà òåìû */
.post.original-post .post-header {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--accent);
}

/* ===== ÔÎÐÌÀ ÎÒÂÅÒÀ ===== */
.reply-form {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-top: 32px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.btn:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* ===== ÏÀÃÈÍÀÖÈß ===== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
}

/* ===== ÀÂÀÒÀÐÛ ===== */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
}

/* ===== ÏÐÎÔÈËÜ ÏÎËÜÇÎÂÀÒÅËß ===== */
.user-info {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 20px;
}

.user-stats {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== ÀÄÀÏÒÈÂÍÎÑÒÜ ===== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .forum-header {
        padding: 16px;
    }
    
    .topic-item, .category-header, .post-header {
        padding: 12px 16px;
    }
    
    .topic-meta {
        flex-direction: column;
        gap: 4px;
    }
    
    .post-header {
        flex-direction: column;
    }
}