:root {
    --primary-color: #ffaa00;
    --secondary-color: #ff4500;
    --bg-dark: #0a0a12;
    --bg-card: #151520;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --accent-red: #d32f2f;
    --gradient: linear-gradient(135deg, #8b0000, var(--primary-color));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 0%, #1f0a0a 0%, var(--bg-dark) 60%);
    color: var(--text-light);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    width: 80%;
    max-width: none;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-links li {
    flex: 1;
    min-width: 120px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
    border-color: var(--primary-color);
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background Image with Gradient Mask */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Background Image */
    background-image: url('../assets/Image/0205%285%29.gif');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    
    /* Gradient Mask for Seamless Blending */
    -webkit-mask-image: linear-gradient(to bottom, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,1) 60%, 
        rgba(0,0,0,0) 100%
    );
    mask-image: linear-gradient(to bottom, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,1) 60%, 
        rgba(0,0,0,0) 100%
    );
    
    z-index: -2;
    filter: brightness(0.8);
}

/* Overlay for Atmosphere */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(10, 10, 18, 0.2) 0%, 
        rgba(10, 10, 18, 0.8) 100%
    );
    z-index: -1;
    pointer-events: none;
}

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

.hero-logo {
    max-width: 200px;
    margin-bottom: 2rem;
    animation: float 3s ease-in-out infinite;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.highlight {
    color: var(--primary-color);
}

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

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

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: #000;
}

/* Server Info */
.server-info {
    padding: 4rem 0;
    background: var(--bg-card);
}

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

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

.info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.info-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.info-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.info-card .count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
}

/* News Section */
.news {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.title-line {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
}

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

.news-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.news-img {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.news-card:hover .news-img img {
    transform: scale(1.1);
}

.news-category {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.news-category.event { background: #e91e63; }
.news-category.promotion { background: #ffc107; color: #000; }
.news-category.update { background: #2196f3; }

.news-content {
    padding: 1.5rem;
}

.news-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

.read-more:hover {
    color: var(--text-light);
}

/* Download Section */
.download {
    padding: 6rem 0;
    position: relative;
    background: url('../assets/Image/0206%20%281%29.gif') no-repeat center center/cover;
    background-attachment: fixed;
}

.download .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.download .container {
    position: relative;
    z-index: 2;
}

.download-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .download-layout {
        grid-template-columns: 1fr;
    }
}

.box-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

/* System Requirements Table */
.req-table-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.req-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-light);
}

.req-table th,
.req-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.req-table th {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.req-table tr:last-child td {
    border-bottom: none;
}

.req-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Download Cards Grid */
.dl-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dl-card {
    display: flex;
    align-items: center;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-light);
}

.dl-card:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    background: rgba(30, 30, 45, 0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: 0.3s;
}

.dl-card:hover::before {
    opacity: 1;
}

.dl-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    flex-shrink: 0;
}

.dl-info {
    flex: 1;
}

.dl-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.dl-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.dl-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dl-action {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    white-space: nowrap;
}

.dl-card:hover .dl-action {
    background: var(--primary-color);
    color: #000;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-container {
    background: var(--bg-card);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--text-light);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body p {
    margin-bottom: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Server Status & Mobile Menu
   ========================================= */

/* Server Status Badge */
.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4caf50;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 50px;
    white-space: nowrap;
    margin-left: 1rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 10px #4caf50;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1001;
    transition: 0.3s;
    padding: 0.5rem;
}

.mobile-menu-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .navbar .container {
        width: 95%;
        padding: 0.8rem 1.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .server-status {
        display: none; /* Hide on mobile header */
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 18, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        
        /* Hidden state */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        padding: 1rem 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(-10px);
        transition: 0.3s;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger animation */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.4s; }

    .nav-links a {
        display: flex; /* Changed from inline-block for flex centering */
        width: 100%; /* Full width clickable */
        padding: 1rem;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        justify-content: center;
        font-size: 1rem;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: linear-gradient(90deg, transparent, rgba(255, 170, 0, 0.1), transparent);
        color: var(--primary-color);
        border-color: var(--primary-color);
        transform: none; /* Reset desktop hover transform */
        box-shadow: none;
        text-shadow: none;
    }
}
