/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --link-color: #2563eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background: #f9fafb;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: all 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
}

.logo i {
    font-size: 2rem;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.main-nav a {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.2);
}

.header-user {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-login:hover {
    background: white;
    color: var(--primary-color);
}

.btn-register {
    background: white;
    color: var(--primary-color);
}

.btn-register:hover {
    background: #f3f4f6;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

/* Top Stats Bar */
.top-stats {
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0;
}

.stats-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.stat-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.stat-item strong {
    color: var(--dark-color);
}

/* Main Container */
.main-container {
    padding: 2rem 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

/* Welcome Box */
.welcome-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.welcome-box h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-box p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Forum Categories */
.forum-category {
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-header {
    background: var(--light-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-header i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.category-header h2 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.forum-list {
    display: flex;
    flex-direction: column;
}

.forum-item {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
    align-items: center;
}

.forum-item:last-child {
    border-bottom: none;
}

.forum-item:hover {
    background: var(--light-color);
}

.forum-item.hot {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
    border-left: 4px solid var(--danger-color);
}

.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 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forum-info p {
    color: #6b7280;
    font-size: 0.95rem;
}

.hot-badge {
    background: var(--danger-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.forum-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.forum-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.forum-stats i {
    color: var(--primary-color);
}

.forum-last {
    min-width: 250px;
}

.last-post {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.last-post-title {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.last-post-user,
.last-post-time {
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.last-post-user i,
.last-post-time i {
    font-size: 0.8rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-widget h3 i {
    color: var(--primary-color);
}

/* Online Users */
.online-users {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.online-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.online-user:hover {
    background: var(--light-color);
}

.online-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--success-color);
}

.online-user span {
    font-weight: 500;
    color: var(--dark-color);
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: var(--light-color);
    border-radius: 6px;
    font-weight: 500;
}

/* Popular Topics */
.popular-topics {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.popular-topic {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.popular-topic:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.topic-title {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.95rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-stats {
    display: flex;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.topic-stats i {
    margin-right: 0.2rem;
}

/* Forum Stats Widget */
.forum-stats-widget {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 6px;
    background: var(--light-color);
}

.stat-label {
    color: #6b7280;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--dark-color);
}

/* Ad Widget */
.ad-widget {
    background: var(--light-color);
    border: 2px dashed var(--border-color);
}

.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #9ca3af;
}

.ad-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
}

.developer-credit {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.developer-credit strong {
    color: white;
    font-weight: 600;
}

.developer-credit i {
    color: var(--primary-color);
    margin-right: 0.3rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .forum-item {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
    }
    
    .forum-stats,
    .forum-last {
        grid-column: 2;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .header-user {
        order: 1;
    }
    
    .forum-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .forum-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .forum-stats,
    .forum-last {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .stats-content {
        gap: 0.5rem;
    }
    
    .stat-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-nav a {
        justify-content: center;
    }
    
    .welcome-box h1 {
        font-size: 1.3rem;
    }
    
    .welcome-box p {
        font-size: 0.95rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
}

