/* --- Weather Effects --- */
#weather-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998; /* Below lightning but above content */
    overflow: hidden;
}

.raindrop {
    position: absolute;
    bottom: 100%;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.4));
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

.lightning-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    z-index: 9999;
    animation: flash-bang 0.3s linear 1;
}

@keyframes flash-bang {
    0% { opacity: 0; }
    20% { opacity: 0.9; }
    40% { opacity: 0.3; }
    60% { opacity: 0.7; }
    100% { opacity: 0; }
}


/* --- General and Background Settings --- */
body {
    background-color: #000;
    color: #fff;
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    /* --- นี่คือส่วนที่คุณตั้งค่าพื้นหลัง --- */
    /* Added a semi-transparent overlay to dim the background image */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('Image/Background/Background.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* --- Navigation Bar --- */
.top-nav {
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #a47743;
    border-radius: 25px;
    margin-bottom: 20px;
}

.top-nav ul {
    list-style: none;
    margin: 0;
    padding: 5px;
    display: flex;
    justify-content: space-around;
}

.top-nav ul li a {
    color: #fdd8a5;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s;
}

.top-nav ul li a:hover {
    color: #fff;
}

/* --- Header & Logo --- */
.logo-container {
    position: relative;
    display: inline-block; /* To wrap around the logo size */
}





@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px #fdd8a5) drop-shadow(0 0 20px #a47743);
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px #fff) drop-shadow(0 0 35px #fdd8a5);
        transform: scale(1.02);
    }
}

.main-header {
    text-align: center;
    padding: 40px 0;
}

.main-logo {
    max-width: 550px;
    animation: pulse-glow 3s infinite ease-in-out;
    transition: transform 0.3s ease;
}

/* --- Main Action Buttons --- */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.btn {
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    border: 2px solid;
    transition: transform 0.2s;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-register { background-color: #7a0e0e; border-color: #ff4c4c; }
.btn-download { background-color: #0e4c8d; border-color: #4ca1ff; }
.btn-facebook { background-color: #0d6b33; border-color: #4cff8e; }
.btn-refill { background-color: #8d6a0e; border-color: #ffd84c; }


/* --- Server Status & Video Section --- */
.status-video-section {
    display: flex;
    flex-wrap: wrap; /* Added for better responsiveness */
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    align-items: flex-start;
}

.server-status {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid #555;
    padding: 20px;
    width: 280px;
    border-radius: 5px;
}

.server-status h2 {
    margin: 0 0 15px 0;
    color: #fdd8a5;
    font-size: 22px;
    text-align: center;
}

.status-box {
    background-color: #000;
    color: #00ff00;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #0f0;
}

.status-light {
    width: 15px;
    height: 15px;
    background-color: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
}

.status-details {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.status-details li {
    background-color: rgba(30,30,30,0.8);
    margin-bottom: 8px;
    padding: 8px 15px;
    border-radius: 4px;
    color: #ccc;
}

.video-placeholder {
    width: 640px;
    max-width: 100%; /* Ensure video resizes */
    height: 360px;
    background-color: #000;
    position: relative;
    border: 2px solid #555;
}

.video-placeholder iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
}



/* --- Server Details Section --- */
.server-details-section {
    padding: 40px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px; /* Increased gap */
    margin-top: 30px;
}

.detail-card {
    /* A richer, gradient background with a glassy effect */
    background: radial-gradient(circle, rgba(45, 35, 25, 0.8) 0%, rgba(15, 10, 5, 0.85) 100%);
    backdrop-filter: blur(4px);
    border: 1px solid #a47743;
    /* A more complex shadow for depth and glow */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 8px rgba(164, 119, 67, 0.4);
    padding: 0; /* Remove padding to allow full-width header */
    border-radius: 10px; /* Slightly more rounded */
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden; /* Needed for the header styling */
}

.detail-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4), 0 0 15px rgba(253, 216, 165, 0.6);
}

.detail-card h3 {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    padding: 15px 20px;
    text-align: center;
    text-shadow: 0 0 5px #fdd8a5;
    border-bottom: 1px solid #a47743;
}

.detail-card ul {
    list-style: none;
    padding: 20px 25px; /* Add padding here instead of the card */
    margin: 0;
}

.detail-card ul li {
    color: #ddd; /* Brighter text */
    margin-bottom: 15px; /* More spacing */
    font-size: 16px;
    padding-left: 28px;
    position: relative;
    transition: color 0.3s;
}

.detail-card ul li:hover {
    color: #fff;
}

.detail-card ul li::before {
    content: '➤'; /* A more elegant arrow */
    position: absolute;
    left: 0;
    top: 0;
    color: #fdd8a5;
    text-shadow: 0 0 8px #fdd8a5;
    transition: transform 0.3s;
}

.detail-card ul li:hover::before {
    transform: translateX(5px);
}

/* --- Divider --- */
.divider {
    height: 3px;
    background: linear-gradient(to right, transparent, #a47743, transparent);
    margin: 60px 0;
}

/* --- News & Update Section --- */
.news-section {
    padding: 20px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 36px;
    color: #fff;
    margin: 0;
}

.section-title p {
    font-size: 24px;
    color: #ff4a4a;
    font-weight: bold;
    margin: 5px 0 0 0;
    text-transform: uppercase;
}

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

.news-card {
    background: linear-gradient(160deg, rgba(30, 25, 20, 0.85), rgba(10, 8, 5, 0.9));
    border: 1px solid #a47743;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(164, 119, 67, 0.4);
}

.news-image-container {
    height: 180px;
    overflow: hidden;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.news-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows the content to fill the space */
    text-align: center;
}

.news-card h3 {
    color: #fdd8a5;
    margin: 0 0 10px 0;
    font-size: 20px;
    min-height: 56px; /* Ensure consistent title height */
}

.news-card p {
    color: #bbb;
    margin: 0 0 25px 0;
    flex-grow: 1; /* Pushes the button to the bottom */
}

.details-button {
    background: linear-gradient(to right, #8d6a0e, #a47743);
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ffd84c;
    display: inline-block;
    transition: background-color 0.3s, transform 0.2s;
    align-self: center; /* Center the button */
}

.details-button:hover {
    background: linear-gradient(to right, #a47743, #8d6a0e);
    transform: scale(1.05);
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 50px 0;
}

.footer-logo {
    max-width: 600px;
}
/* --- Content Section (for sub-pages) --- */
.content-section {
    padding: 40px 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #a47743;
    box-shadow: 0 0 15px rgba(164, 119, 67, 0.3);
    text-align: center;
}

.content-section h1 {
    color: #fdd8a5;
    font-size: 36px;
    margin-bottom: 20px;
}

.content-section p {
    color: #ccc;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.info-box {
    background: radial-gradient(circle, rgba(45, 35, 25, 0.8) 0%, rgba(15, 10, 5, 0.85) 100%);
    border: 1px solid #a47743;
    border-radius: 10px;
    padding: 30px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.4), 0 0 15px rgba(253, 216, 165, 0.6);
    text-align: left;
}

.info-box h2 {
    color: #fff;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px #fdd8a5;
}

.info-box p {
    color: #ddd;
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* ปุ่มหลัก */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #007bff, #00c3ff);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* เอฟเฟกต์เวลาเอาเมาส์ชี้ */
.btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 15px rgba(0, 200, 255, 0.7);
}

/* แสงวิ่งผ่านปุ่ม */
.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75px;
    width: 50px;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 125%;
}

/* สีเฉพาะแต่ละปุ่ม */
.btn-register {
    background: linear-gradient(135deg, #ff5722, #ff9800);
}
.btn-download {
    background: linear-gradient(135deg, #28a745, #5ce65c);
}
.btn-facebook {
    background: linear-gradient(135deg, #3b5998, #00aced);
}
.btn-refill {
    background: linear-gradient(135deg, #ffc107, #ff9800);
}

/* ปุ่มสไตล์เกม RAN - สายฟ้าวิ่งรอบปุ่ม */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    background: #111;
    border: 2px solid #00ffff;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* เส้นสายฟ้าวิ่งรอบปุ่ม */
.btn::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    border: 2px solid #0ff;
    border-radius: 12px;
    box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 20px #0ff inset;
    pointer-events: none;
    animation: lightning 1s infinite linear;
}

/* เอฟเฟกต์สายฟ้า */
@keyframes lightning {
    0% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 20px #0ff inset; }
    25% { box-shadow: 0 0 10px #0ff, 0 0 15px #0ff, 0 0 30px #0ff inset; }
    50% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 20px #0ff inset; }
    75% { box-shadow: 0 0 15px #0ff, 0 0 20px #0ff, 0 0 35px #0ff inset; }
    100% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff, 0 0 20px #0ff inset; }
}

/* เอฟเฟกต์เวลาชี้เมาส์ */
.btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px #0ff, 0 0 40px #0ff inset;
}

/* สีเฉพาะแต่ละปุ่ม */
.btn-register::before {
    border-color: #ff6b6b;
    box-shadow: 0 0 5px #ff6b6b, 0 0 10px #ff6b6b, 0 0 20px #ff6b6b inset;
}
.btn-download::before {
    border-color: #fdd835;
    box-shadow: 0 0 5px #fdd835, 0 0 10px #fdd835, 0 0 20px #fdd835 inset;
}
.btn-facebook::before {
    border-color: #3b5998;
    box-shadow: 0 0 5px #3b5998, 0 0 10px #3b5998, 0 0 20px #3b5998 inset;
}
.btn-refill::before {
    border-color: #00e676;
    box-shadow: 0 0 5px #00e676, 0 0 10px #00e676, 0 0 20px #00e676 inset;
}

/* --- ปุ่มหลัก สายฟ้าวิ่งรอบปุ่ม --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    margin: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    background: #111;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* เส้นสายฟ้าวิ่งรอบปุ่ม */
.btn::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    border: 2px solid currentColor; /* ใช้สีจากแต่ละปุ่ม */
    border-radius: 12px;
    box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor inset;
    pointer-events: none;
    animation: lightning 1s infinite linear;
}

/* เอฟเฟกต์สายฟ้า */
@keyframes lightning {
    0% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor inset; }
    25% { box-shadow: 0 0 10px currentColor, 0 0 15px currentColor, 0 0 30px currentColor inset; }
    50% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor inset; }
    75% { box-shadow: 0 0 15px currentColor, 0 0 20px currentColor, 0 0 35px currentColor inset; }
    100% { box-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 20px currentColor inset; }
}

/* Hover effect */
.btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor inset;
}

/* --- สีเฉพาะปุ่ม --- */
.btn-register {
    color: #FFFF00;       /* สีแดง */
    border-color: #FFFF00;
}

.btn-download {
    color: #ff4c4c;       /* สีน้ำเงิน */
    border-color: #ff4c4c;
}

.btn-facebook {
    color: #0099FF;       /* สีน้ำเงินเข้ม Facebook */
    border-color: #0099FF;
}

.btn-refill {
    color: #00ff99;       /* สีเขียวอมฟ้า */
    border-color: #00ff99;
}

/* ไฟสถานะ */
.status-light {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #ff0000; /* สีเขียว */
    border-radius: 50%;
    margin-right: 10px;
    animation: blink-light 1s infinite; /* กระพริบ */
}

/* ข้อความกระพริบ */
.blinking {
    color: #ff0000; /* สีแดง */
    font-weight: bold;
    animation: blink-text 1s infinite;
}

/* Animation ของไฟ */
@keyframes blink-light {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

/* Animation ของข้อความ */
@keyframes blink-text {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

