:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
.profile-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid #e5e7eb;
}
.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.profile-info h2 { margin: 0 0 8px; }
.profile-meta {
    margin: 6px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #475569;
    font-size: 14px;
}
.profile-meta i { margin-right: 6px; color: #4f46e5; }
.profile-signature {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}
.col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}

/* Navbar */
.navbar {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-link .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

.btn-login {
    background: var(--primary-color);
}

.btn-register {
    background: var(--success-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
    color: white;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.stat-item span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-item small {
    display: block;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Category Block */
.category-block {
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 30px;
}

.category-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.category-header p {
    opacity: 0.9;
    margin: 0;
}

/* Forums List */
.forums-list {
    padding: 0;
}

.forum-item {
    display: grid;
    grid-template-columns: 60px 1fr 120px 200px;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    align-items: center;
}

.forum-item:hover {
    background: var(--light-color);
}

.forum-item:last-child {
    border-bottom: none;
}

.forum-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.forum-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.forum-info h3 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s;
}

.forum-info h3 a:hover {
    color: var(--primary-color);
}

.forum-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.forum-stats {
    display: flex;
    gap: 15px;
    color: #64748b;
}

.forum-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.forum-last-post {
    text-align: right;
    font-size: 0.85rem;
}

.topic-link {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
}

.topic-link:hover {
    color: var(--primary-color);
}

.post-meta {
    margin-top: 5px;
    color: #64748b;
}

.post-meta a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 90px;
}

.widget {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.user-widget p {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
    margin-right: 5px;
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.latest-posts-list {
    list-style: none;
    padding: 0;
}

.latest-posts-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.latest-posts-list li:last-child {
    border-bottom: none;
}

.latest-posts-list a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.latest-posts-list a:hover {
    color: var(--primary-color);
}

.latest-posts-list small {
    color: #64748b;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .col-lg-9, .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .forum-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .forum-last-post {
        text-align: center;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-muted {
    color: #64748b;
}

/* Profile */
.profile-card {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.profile-meta {
    margin: 6px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #6b7280;
    font-size: 14px;
}

.profile-meta i { margin-right: 6px; color: #4f46e5; }

.profile-signature {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* Search */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-form input {
    flex: 1;
}

.search-results {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.search-list { list-style: none; padding: 0; margin: 0; }
.search-list li { padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.search-list li:last-child { border-bottom: none; }
.search-list a { font-weight: 700; color: var(--dark-color); text-decoration: none; }
.search-list a:hover { color: var(--primary-color); }
.search-list small { color: #6b7280; }

/* Messages */
.messages-list { display: flex; flex-direction: column; gap: 12px; }
.message-card { background: white; border-radius: 12px; padding: 14px; box-shadow: var(--shadow); }
.message-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 10px; }
.message-body { white-space: pre-wrap; }

/* Rules */
.rules-card { background: #fff; border-radius: 14px; padding: 22px; box-shadow: var(--shadow); border: 1px solid #e5e7eb; line-height: 1.7; }

/* Members */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.member-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #e5e7eb;
}

.member-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #f1f5f9;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.member-info h3 { margin: 0 0 6px; font-size: 18px; }
.member-name { color: var(--dark-color); text-decoration: none; }
.member-name:hover { color: var(--primary-color); }

.member-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #6b7280;
    font-size: 13px;
}

.member-meta i { margin-right: 6px; color: #4f46e5; }

/* Forum topics */
.topics-list { border: 1px solid #e5e7eb; }
.topic-row {
    grid-template-columns: 140px 1fr 200px;
    background: #fff;
}
.topic-row:hover { background: #f8fafc; }
.topic-meta { display: flex; gap: 6px; align-items: center; }
.topic-info { font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-last small { color: #6b7280; }

/* Topic page */
.topic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.posts-list { gap: 18px; }
.post-card {
    grid-template-columns: 180px 1fr;
    border: 1px solid #e5e7eb;
}
.post-user {
    border-right: 1px solid var(--border-color);
    padding-right: 12px;
    text-align: center;
}
.avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    margin: 0 auto 10px;
}
.username { font-weight: 700; }
.post-content { display: flex; flex-direction: column; gap: 10px; }
.post-text { line-height: 1.7; }
.post-meta { font-size: 0.9rem; color: #6b7280; }

@media (max-width: 768px) {
    .profile-card { grid-template-columns: 1fr; text-align: center; }
    .profile-avatar img { margin: 0 auto; }
    .search-form { flex-direction: column; }
    .topic-row { grid-template-columns: 1fr; }
    .topic-last { text-align: left; }
    .post-card { grid-template-columns: 1fr; }
    .post-user { border-right: none; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
}

/* Auth */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0;
}

.auth-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
}

.auth-card h2 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--dark-color);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

textarea {
    resize: vertical;
    min-height: 140px;
}

.alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.alert-danger { background: #fee2e2; color: #b91c1c; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info    { background: #e0f2fe; color: #075985; }

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.badge-primary { background: var(--primary-color); }
.badge-danger  { background: var(--danger-color); }

/* Topics */
.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topics-list {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.topic-row {
    display: grid;
    grid-template-columns: 150px 1fr 180px;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.topic-row:last-child { border-bottom: none; }

.topic-row.pinned { background: #f8fafc; }

.topic-title a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

.topic-title a:hover { color: var(--primary-color); }

.topic-info { font-size: 0.9rem; }

.topic-last { text-align: right; font-size: 0.9rem; }

.empty { padding: 20px; text-align: center; color: #94a3b8; }

.pagination { margin-top: 20px; display: flex; gap: 8px; }
.page-link {
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-color);
}
.page-link.active { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* Posts */
.posts-list { display: flex; flex-direction: column; gap: 15px; }

.post-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 15px;
    gap: 15px;
}

.post-user {
    border-right: 1px solid var(--border-color);
    padding-right: 10px;
}

.avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.post-text { font-size: 1rem; line-height: 1.7; }
.post-meta { font-size: 0.9rem; margin-top: 8px; }

.reply-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-top: 20px;
}

/* Misc */
.breadcrumbs { margin-bottom: 15px; color: #64748b; }
.breadcrumbs a { color: var(--primary-color); text-decoration: none; }

@media (max-width: 992px) {
    .topic-row { grid-template-columns: 1fr; text-align: left; }
    .topic-last { text-align: left; }
    .post-card { grid-template-columns: 1fr; }
    .post-user { border-right: none; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
}

/* Members */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.member-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 12px;
    align-items: center;
}

.member-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f1f3;
}

.member-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.member-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: #6b7280;
    font-size: 13px;
}

.member-meta i {
    margin-right: 6px;
    color: #4f46e5;
}
