/* Thiết lập Font chữ cơ bản */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212; 
    color: #f0f0f0;
    line-height: 1.6;

    /* Ảnh nền được áp dụng cho toàn bộ BODY */
    background-image: url('hero_bg.jpg'); 
    background-size: cover; 
    background-attachment: fixed; 
    background-position: center center; 
    background-repeat: no-repeat; 
    
    /* Áp dụng hiệu ứng Fade In cho toàn bộ nội dung sau khi tải */
    animation: fadeIn 1s ease-out forwards;
}

/* Lớp phủ cho toàn bộ body để làm nền tối và các nội dung trong suốt dễ đọc hơn */
body::before {
    content: '';
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Lớp phủ đen trong suốt 40% */
    z-index: -1; 
}

/* === KEYFRAMES CHO ANIMATION === */

/* Hiệu ứng Nhấp nháy nhẹ (chỉ dùng box-shadow để tránh lệch bố cục) */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7); } /* Cam Nóng */
    70% { box-shadow: 0 0 0 10px rgba(255, 87, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

/* Hiệu ứng Mờ dần khi tải trang (Fade In) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hiệu ứng di chuyển Sao Băng - ĐÃ TĂNG PHẠM VI RƠI */
@keyframes fall {
    to {
        /* Tăng phạm vi rơi xuống 300vh để tạo cảm giác nhiều sao hơn trên màn hình */
        transform: translateY(300vh); 
    }
}

/* === NỀN SAO BĂNG/SPARKLES - ĐÃ TĂNG KÍCH THƯỚC VÀ ĐỘ SÁNG === */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; 
    pointer-events: none; 
}

.star {
    position: absolute;
    width: 3px; /* Tăng kích thước */
    height: 3px;
    background-color: #FFC107; 
    border-radius: 50%;
    opacity: 1; /* Tăng độ sáng */
    /* Tăng cường hiệu ứng phát sáng */
    box-shadow: 0 0 8px #FFC107, 0 0 15px rgba(255, 193, 7, 0.5);
    animation: fall linear infinite; 
}

/* Cấu trúc chung */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Các section đều được căn giữa và làm trong suốt */
.section {
    background-color: rgba(31, 31, 31, 0.8); 
    margin: 30px auto; 
    padding: 80px 0;
    text-align: center; 
    border-radius: 10px; 
    transition: background-color 0.3s ease; 
}

.section:hover {
    background-color: rgba(31, 31, 31, 0.85); 
}

h1, h2, h3 {
    color: #FF5722; 
    font-weight: 900;
}

h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
}

/* === HEADER & NAVIGATION === */
.header {
    background-color: rgba(31, 31, 31, 0.8); 
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-bottom-left-radius: 10px; 
    border-bottom-right-radius: 10px;
}

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

.header .logo img {
    height: 50px; 
    width: auto;
}

.nav a {
    color: #f0f0f0; 
    text-decoration: none;
    margin-left: 25px;
    font-weight: 700;
    transition: color 0.3s, transform 0.3s;
}

.nav a:hover {
    color: #FF5722; 
    transform: translateY(-2px); 
}

/* === HERO SECTION (Giới Thiệu Chính) === */
.hero {
    padding-bottom: 50px; 
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    position: relative;
    background-color: transparent; 
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero h1 {
    font-size: 4em;
    margin-bottom: 10px;
    color: #FFC107; 
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
    line-height: 1.1; 
}

.hero .slogan {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #FFC107; 
}

/* Server Status Box */
.server-status-box {
    background-color: rgba(30, 30, 30, 0.85); 
    padding: 25px 40px;
    border-radius: 10px;
    border: none;
    display: inline-block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
}

.server-status-box h2 {
    color: white;
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 5px;
}

#server-ip {
    display: block;
    font-size: 2em;
    font-weight: 900;
    color: #FFC107; 
    margin-bottom: 15px;
}

.status-info span {
    margin: 0 10px;
    font-weight: 700;
    color: #f0f0f0;
}

/* Nút Chung */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease; 
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #FF5722; 
    color: white;
    margin-top: 10px;
    animation: pulse 2s infinite; 
}

.btn-primary:hover {
    background-color: #FF7043;
    transform: scale(1.03); 
    animation: none; 
}

.btn-secondary {
    background-color: #FFC107; 
    color: #121212;
}

.btn-secondary:hover {
    background-color: #FFD54F;
    transform: scale(1.03); 
}

.large-btn {
    padding: 15px 50px;
    font-size: 1.2em;
    margin-top: 30px;
}

/* === CỤM MÁY CHỦ === */
.single-survival-mode {
    grid-template-columns: minmax(300px, 600px); 
    justify-content: center; 
}

.gamemodes .card {
    background-color: transparent; 
    border-radius: 8px;
    overflow: hidden;
    text-align: center; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: 1px solid #333; 
}

.gamemodes .card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(255, 87, 34, 0.4); 
}

.gamemodes .card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.gamemodes .card h3 {
    margin: 15px 15px 5px;
    font-size: 1.8em;
    color: #FFC107; 
}

.gamemodes .card p {
    padding: 0 15px 15px;
    margin: 0;
    color: #ccc;
}

/* Features Icon */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.icon-features .feature-item {
    background-color: transparent; 
    text-align: center;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
    transition: transform 0.3s ease, background-color 0.3s ease; 
}

.icon-features .feature-item:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 87, 34, 0.1); 
}

.icon-features .feature-item .icon {
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.icon-features .feature-item h3 {
    color: #FF5722; 
    margin-top: 0;
}

/* === SUPPORT & CONTACT === */
.support {
    background-color: rgba(31, 31, 31, 0.8); 
}

.contact-links {
    margin-top: 30px;
}

.contact-btn {
    margin: 10px;
    padding: 15px 40px;
    font-size: 1.1em;
}

.discord-btn { background-color: #7289DA; color: white; }
.facebook-btn { background-color: #4267B2; color: white; }

.contact-btn:hover { opacity: 0.8; }

.final-ip-call {
    margin-top: 40px;
    font-size: 1.5em;
}

.final-ip-call strong {
    color: #FFC107;
}

/* === FOOTER === */
footer {
    background-color: rgba(13, 13, 13, 0.8); 
    color: #888;
    padding: 20px 0;
    font-size: 0.9em;
    border-top-left-radius: 10px; 
    border-top-right-radius: 10px;
    margin-top: 0; 
    text-align: center;
}

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

.footer-links a {
    color: #888;
    text-decoration: none;
    margin-left: 15px;
}

.footer-links a:hover {
    color: #f0f0f0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
    }

    .header .nav {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .header .nav a {
        margin: 5px 10px;
    }

    .hero h1 {
        font-size: 3em;
    }
    
    .hero .slogan {
        font-size: 1.2em;
    }

    .server-status-box {
        padding: 20px 20px;
    }

    #server-ip {
        font-size: 1.5em;
    }
    
    .single-survival-mode {
        grid-template-columns: 1fr; 
    }

    footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 10px;
    }
}