/* DayZ Server Website - NVIDIA Style */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-green: #76b900;
    --dark-bg: #1a1a1a;
    --darker-bg: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #333333;
    --hover-bg: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.logo-img {
    width: 60px;  /* Kích thước chiều rộng logo */
    height: 60px; /* Kích thước chiều cao logo */
    object-fit: cover; /* Đảm bảo logo được cắt sao cho vừa với kích thước vuông */
}


body {
    font-family: 'Roboto', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.header {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-green);
    background: rgba(118, 185, 0, 0.1);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%), url('https://dayzds.info/hinh/T3_13.png');
    background-size: cover; /* Đảm bảo hình nền phủ đầy phần Hero */
    background-position: center; /* Đảm bảo hình ảnh luôn căn giữa */
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}


.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-green), #9acd32);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #5a8a00;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(118, 185, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* Server Status */
.server-status {
    background: var(--dark-bg);
    padding: 3rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.status-card {
    background: var(--darker-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
}

.status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.status-card h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.status-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* News Section */
.news-section {
    padding: 4rem 0;
    background: var(--darker-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news-card {
    background: var(--dark-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-green);
}

.news-image {
    width: 100%;
    height: 200px;
    background: var(--border-color);
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.news-category {
    background: var(--primary-green);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.news-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .status-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Styles */
.admin-header {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.admin-nav {
    display: flex;
    gap: 2rem;
}

.admin-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-green);
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 2px rgba(118, 185, 0, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.table {
    width: 100%;
    background: var(--dark-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--darker-bg);
    color: var(--primary-green);
    font-weight: 600;
}

.table tr:hover {
    background: var(--hover-bg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #28a745;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
}
/* ========================================================= */
/* === CSS SỬA LỖI LAYOUT HEADER KHI ĐĂNG NHẬP (V2.0) === */
/* ========================================================= */

/* --- Container chính của thanh điều hướng --- */
/* Thiết lập Flexbox để các mục con nằm ngang */
.header .nav-container {
    display: flex;
    justify-content: space-between; /* Đẩy logo sang trái và các mục khác sang phải */
    align-items: center; /* Căn giữa các mục theo chiều dọc */
    width: 100%;
    padding: 0 2rem; /* Thêm khoảng đệm hai bên để không bị dính sát lề */
    box-sizing: border-box;
}

/* --- Menu chính --- */
/* Cho phép menu co giãn và đẩy khối user-actions sang phải */
.header .nav-menu {
    flex-grow: 1; 
    display: flex;
    justify-content: center; /* Căn giữa các mục menu */
    margin: 0; /* Xóa margin mặc định nếu có */
    padding: 0; /* Xóa padding mặc định */
    list-style: none; /* Xóa dấu chấm đầu dòng của ul */
}

/* --- Khối chứa các hành động của người dùng (Đăng nhập/Info) --- */
.user-actions {
    flex-shrink: 0; /* Ngăn không cho khối này bị co lại khi không đủ chỗ */
    display: flex; /* Bắt buộc các mục con bên trong nó cũng phải là flex */
    align-items: center; /* Căn giữa theo chiều dọc */
}

/* --- Khối thông tin khi người dùng đã đăng nhập --- */
/* Đây là phần quan trọng nhất để sửa lỗi */
.user-info {
    display: flex; /* BẮT BUỘC: để avatar, tên, nút logout nằm ngang */
    align-items: center; /* Căn giữa chúng theo chiều dọc */
    gap: 15px; /* Khoảng cách giữa các phần tử bên trong */
    color: var(--text-primary, #e0e0e0);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--primary-green, #76b900);
    flex-shrink: 0; /* Ngăn avatar bị co lại */
}

.user-greeting {
    font-weight: 500;
    white-space: nowrap; /* Ngăn không cho tên người dùng bị xuống dòng */
}

/* --- Nút đăng nhập/đăng xuất --- */
.user-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px; /* Khoảng cách giữa icon và chữ */
    padding: 8px 16px;
    font-weight: bold;
    white-space: nowrap; /* Ngăn chữ trên nút bị xuống dòng */
}