/* =========================================
   1. CORE SETTINGS & FONTS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700;900&display=swap');

:root {
    --primary: #ff4d00;
    --primary-hover: #ff6a2a;
    --dark: #0a0a0a;
    --dark-soft: #121212;
    --gray-card: #161616;
    --text-gray: #a0a0a0;
    --gold: #ffd700;
    --white: #ffffff;
}

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

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* Selection */
::selection { background: var(--primary); color: white; }

/* =========================================
   2. NAVIGATION
   ========================================= */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after, 
.nav-link.active::after { 
    width: 100%; 
}

.nav-link:hover,
.nav-link.active { 
    color: var(--primary); 
}

/* =========================================
   3. HERO SLIDER & ANIMATIONS
   ========================================= */
.hero-slider { 
    position: relative; 
    height: 70vh; 
    min-height: 500px; 
    background: #000; 
    overflow: hidden; 
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease-in-out, transform 10s linear;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
}

.slide.active { 
    opacity: 1; 
    visibility: visible; 
    transform: scale(1);
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark) 5%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.6) 100%);
}

/* =========================================
   4. FEATURE HIGHLIGHTS
   ========================================= */
.features-bg {
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), url('https://r2.erweima.ai/i/6699318464654941916.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 80px 0;
}

.feature-list li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #fefefe;
    transition: all 0.3s ease;
    list-style: none;
}

.feature-list li::before {
    content: '\f058'; /* fontawesome check-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--gold);
    filter: drop-shadow(0 0 5px var(--gold));
}

.feature-list li:hover {
    color: var(--gold);
    transform: translateX(10px);
}

/* =========================================
   5. NEWS & CARDS
   ========================================= */
.news-card {
    background: var(--gray-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.news-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(255, 77, 0, 0.2);
}

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

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* =========================================
   6. STATS & API (Server Status)
   ========================================= */
.stats-card {
    background: linear-gradient(145deg, #161616 0%, #0a0a0a 100%);
    border: 1px solid #222;
    border-top: 3px solid var(--primary);
    border-radius: 8px;
    padding: 20px;
}

.api-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    height: 350px; 
    border: 1px solid #333;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
    margin-right: 5px;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* =========================================
   7. DOWNLOAD PAGE (Modern Style)
   ========================================= */
.download-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.table-download {
    width: 100%;
    border-collapse: collapse;
}

.table-download th {
    background: #f8f9fa;
    color: #333;
    padding: 20px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #eee;
}

.table-download td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    color: #555;
    vertical-align: middle;
}

.btn-green-dl {
    background-color: #28a745;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.btn-green-dl:hover {
    background-color: #218838;
    transform: scale(1.1) rotate(360deg);
}

/* =========================================
   8. UTILITIES & BUTTONS
   ========================================= */
.btn-ran {
    background: linear-gradient(45deg, #cc3d00, var(--primary));
    padding: 14px 40px;
    border-radius: 50px; /* ทรงโค้งมนแบบ Modern */
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(255, 77, 0, 0.4);
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-ran:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 77, 0, 0.5);
    filter: brightness(1.1);
}

.text-gold { color: var(--gold); }
.text-primary { color: var(--primary); }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-slider { height: 50vh; }
    .btn-ran { padding: 10px 25px; font-size: 14px; }
    .features-bg { background-attachment: scroll; } /* ป้องกันกระตุกบนมือถือ */
}