/* style.css - Toàn diện cho Diễn Đàn Võ Lâm II */
:root {
    --bg-body: #090e1a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-header: rgba(15, 23, 42, 0.9);
    --border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --tong-color: #ef4444;
    --lieu-color: #3b82f6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    /* Mạnh mẽ hơn hiệu ứng Radial Gradient */
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(239, 68, 68, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, transparent 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Nav */
header { 
    background: var(--bg-header); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.75rem 1.5rem; 
}
.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
    background: linear-gradient(to right, #60a5fa, #f87171); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

/* Banner */
.forum-header {
    height: 300px;
    background-image: url('forum_header_banner_1778466177013.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(9, 14, 26, 0.2), var(--bg-body));
}
.header-content {
    position: relative;
    z-index: 1;
}
.header-content h1 {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
    color: #fff;
}

/* Layout */
.main-wrapper { 
    max-width: 1200px; 
    margin: 2rem auto 4rem; /* Đổi từ margin âm sang margin dương để tránh lỗi chồng lớp */
    padding: 0 1.5rem; 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 2rem; 
    align-items: start;
}

.breadcrumbs { 
    max-width: 1200px; 
    margin: 1.5rem auto 0; 
    padding: 0 1.5rem; 
    display: flex; 
    gap: 0.5rem; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }

/* Category & Row Styles */
.category-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    margin-bottom: 2rem;
}
.category-header {
    background: rgba(255,255,255,0.05);
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.category-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #60a5fa;
    letter-spacing: 1px;
}
.forum-row, .thread-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 220px;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}
.forum-row:last-child { border-bottom: none; }
.forum-row:hover { background: rgba(255,255,255,0.05); transform: scale(1.005); }

/* Thread & Link Colors */
a { transition: color 0.3s ease; }
.thread-title {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.3s;
}
.thread-title:hover {
    color: var(--accent);
}
.thread-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.forum-icon { font-size: 1.8rem; color: var(--accent); display: flex; justify-content: center; }
.forum-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-main); }
.forum-info p { font-size: 0.9rem; color: var(--text-muted); }

.forum-stats { text-align: center; }
.forum-stats .count { display: block; font-size: 1rem; font-weight: 700; color: var(--text-main); }
.forum-stats .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 1.5rem; 
    backdrop-filter: blur(15px); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.4); 
}
.widget-title { 
    font-size: 1rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    margin-bottom: 1.2rem; 
    color: var(--text-muted); 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 0.6rem; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

/* Faction Tabs */
.faction-tabs { display: flex; gap: 1rem; margin-bottom: 2rem; }
.faction-tab { padding: 0.7rem 2rem; border-radius: 100px; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.3s; border: 1px solid transparent; }
.tab-tong { background: rgba(239, 68, 68, 0.1); color: var(--tong-color); border-color: rgba(239, 68, 68, 0.2); }
.tab-tong.active { background: var(--tong-color); color: white; box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4); }
.tab-lieu { background: rgba(59, 130, 246, 0.1); color: var(--lieu-color); border-color: rgba(59, 130, 246, 0.2); }
.tab-lieu.active { background: var(--lieu-color); color: white; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4); }

/* Buttons */
.btn-new-thread { 
    background: var(--accent); 
    color: white; 
    padding: 0.8rem 2rem; 
    border-radius: 10px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 1rem; 
    transition: all 0.3s; 
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    display: inline-block;
}
.btn-new-thread:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5); }

@media (max-width: 992px) { 
    .main-wrapper { grid-template-columns: 1fr; margin-top: 2rem; } 
    .sidebar { display: none; } 
    .forum-header { height: 200px; }
    .header-content h1 { font-size: 2.2rem; }
    .forum-row { grid-template-columns: 50px 1fr 80px; }
    .forum-stats, .forum-last-post { font-size: 0.8rem; }
}

/* Modal & Auth Forms */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #1a2e26; /* Dark forest green */
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .auth-card {
    transform: translateY(0);
}

.auth-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.auth-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f3f4f6;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.auth-header p {
    color: #9ca3af;
    font-size: 0.95rem;
    font-style: italic;
}

.auth-body {
    padding: 2.5rem;
}

.auth-body h3 {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-input {
    width: 100%;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #10b981;
    background: #0f172a;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.pass-toggle {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    cursor: pointer;
}

.auth-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #3d5a4d 0%, #2d4339 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.auth-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: #9ca3af;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.captcha-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.captcha-img {
    background: #000;
    padding: 0.5rem;
    border-radius: 8px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    color: #fff;
}
