:root {
    --primary-dark: #000b5e;  /* ฟ้าเข้มสุด */
    --primary: #006bb3;       /* ฟ้าปานกลาง */
    --secondary: #00b8e6;     /* ฟ้าสด */
    --light-blue: #89e3ff;    /* ฟ้าพาสเทล */
    --lighter-blue: #d4f4ff;  /* ฟ้าอ่อนสุด */
}

* {
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: hidden;
}

html, body {
    overflow-x: hidden; /* ป้องกันการเลื่อนแนวนอน */
    width: 100%;
}

body, .container {
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px; /* กำหนดขนาดให้เท่ากับองค์ประกอบอื่น */
    margin: auto; /* จัดให้อยู่ตรงกลาง */
    border-radius: 1px; /* ทำให้มุมโค้ง */
    box-shadow: 0px 4px 10px rgba(0, 238, 255, 0.603); /* เพิ่มเงาให้ดูเด่น */
    border-radius: 8px;
    
}

body {
    background: linear-gradient(to bottom, #000b5e, #006bb3); /* ไล่สีฟ้าหลายระดับ */
    color: white;
    font-family: 'Arial', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh; /* ✅ ป้องกันการเว้าเข้าไป */
}

/* ========================= */
/* 📌 HEADER & LANGUAGE SWITCH */
/* ========================= */
header {
    background: #f53f08;
    color: white;
    text-align: center;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
}

.promo-slider {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.promo-slider p {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    animation: marquee 10s linear infinite;
}

/* ทำให้ข้อความไหลไปทางซ้าย */
@keyframes marquee {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-105%);
    }
}


.lang-switch img {
    width: 30px;
    cursor: pointer;
}

/* ========================= */
/* 🖼️ BANNER SLIDER */
/* ========================= */
.banner {
    position: relative;
    width: 100%;
    max-width: 8000px;
    margin: auto;
    overflow: hidden;
    border-radius: 1px;
}

.banner-slider img {
    width: 100%;
    height: auto;
    display: none;
    transition: opacity 0.5s ease-in-out;
}

.banner-slider img.active {
    display: block;
    opacity: 1;
}

/* ปุ่มเลื่อนแบนเนอร์ */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(6 48 114 / 56%);
    border: none;
    color: #c8b71e ;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease-in-out;
}

.prev:hover, .next:hover {
    background: #ffd60a;
}

.prev { left: 10px; }
.next { right: 10px; }

/* ========================= */
/* 🔒 LOGIN FORM */
/* ========================= */
.login-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    margin: 20px auto;
    width: 90%;
    max-width:400px;
}

.login-form a {
    display: block; /* ✅ ทำให้ลิงก์แสดงเป็นบล็อก (เหมือนปุ่ม) */
    text-align: center;
    text-decoration: none; /* ✅ เอาขีดเส้นใต้ของลิงก์ออก */
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    border: none;
    transition: 0.3s;
}

button {
    position: relative;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    border: none;
    transition: 0.3s;
}

.login-form button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}


@keyframes shake {
    0% { transform: translateX(0); }
    15% { transform: translateX(-3px) rotate(-2deg); }
    30% { transform: translateX(3px) rotate(2deg); }
    45% { transform: translateX(-3px) rotate(-2deg); }
    60% { transform: translateX(3px) rotate(2deg); }
    75% { transform: translateX(-1px) rotate(-1deg); }
    100% { transform: translateX(0); }
}

.register-btn {
    background: linear-gradient(to bottom, #e60073, #b30000); /* ✅ ใช้โทนสีฟ้าตามธีม */
    color: white;
    border-radius: 50px;
    box-shadow: 0px 4px 15px rgba(0, 184, 230, 0.6);
    font-weight: bold;
    padding: 15px;
    animation: shake 1s ease-in-out infinite alternate;
}

/* หยุดสั่นเมื่อโฮเวอร์ */
.register-btn:hover {
    animation: none;
}

.shake {
    animation: shake 0.8s ease-in-out;
}

/* เอฟเฟกต์แวววาว */
.register-btn::before {
    content: "";
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px 10px 0 0;
}

.register-btn:hover::before {
    left: 100%;
}

.register-btn:hover {
    background: linear-gradient(to bottom, #28a745, #1e7e34);
    box-shadow: 0px 4px 15px rgba(0, 238, 0, 0.6);
}

.contact-btn {
    background: linear-gradient(to bottom, #006bb3, #000b5e);
    color: white;
    border-radius: 50px;
    box-shadow: 0px 4px 15px rgba(0, 107, 179, 0.6);
    font-weight: bold;
    padding: 15px;
}



/* เอฟเฟกต์เมื่อเอาเมาส์ไปวาง */
.contact-btn:hover {
    background: linear-gradient(to bottom, #007bff, #0056b3);
    box-shadow: 0px 4px 15px rgba(0, 123, 255, 0.6);
}


.click-btn {
    background: rgb(1, 255, 56);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    animation: blink 1s infinite;
}

/* เอฟเฟกต์กะพริบ */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}



/* ==== ปุ่มติดต่อแอดมิน ==== */
.contact-btn {
    background: #1a73e8;
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
}

.contact-btn:hover {
    background: #1669c1;
}

.category-menu {
    display: flex;
    overflow-x: auto; /* ✅ ให้เลื่อนได้หากจอเล็ก */
    white-space: nowrap; /* ป้องกันข้อความขึ้นบรรทัดใหม่ */
    scrollbar-width: none; /* 🔥 ซ่อน Scrollbar */
    -ms-overflow-style: none; /* 🔥 ซ่อน Scrollbar ใน IE/Edge */
    max-width: 100%;
}

.category-menu {
    display: flex;
    justify-content: space-around; /* ✅ ทำให้แต่ละปุ่มมีระยะห่างเท่ากัน */
    align-items: center;
    background: #03045e;
    padding: 10px;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* 🔥 ซ่อน Scrollbar */
}


/* ซ่อน Scrollbar บน Chrome & Safari */
.category-menu::-webkit-scrollbar {
    display: none;
}

/* หมวดหมู่ปกติ */
.category {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
    color: white;
    padding: 8px 0;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    font-size: 14px;
}

/* หมวดหมู่ที่ถูกเลือก */
.category.active {
    background: #00f7ff;
    color: #14213d;
    font-weight: bold;
    padding: 5px 8px; /* ลด padding เพื่อไม่ให้ขยายเกิน */
    border-radius: 5px;
    box-shadow: 0px 3px 8px rgba(10, 226, 255, 0.5);
    transform: scale(1.05);
}


.category img {
    width: 50px;
    height: auto;
    margin-bottom: 5px;
}

@media screen and (max-width: 480px) {
    .category-menu {
        flex-direction: row !important; /* ✅ บังคับให้เป็นแนวนอน */
        justify-content: center;
    }
}

@media screen and (min-width: 768px) {
    .login-form button {
        font-size: 20px;
        padding: 15px 25px;
    }
}

@media screen and (max-width: 360px) {
    .category {
        font-size: 14px; /* ลดขนาดตัวหนังสือ */
        padding: 6px; /* ลด padding เพื่อให้พอดี */
    }

    .category img {
        width: 40px; /* ปรับขนาดไอคอน */
    }
}

/* ✅ บังคับให้เป็นแถวเดียวกันในมือถือ */
@media screen and (max-width: 768px) {
    .category-menu {
        justify-content: flex-start !important; /* 🔥 บังคับให้เมนูเริ่มต้นจากซ้าย */
        padding: 5px 10px;
    }

    .category {
        width: auto;
    }

    .category img {
        width: 40px; /* ปรับขนาดไอคอน */
    }
}

@media screen and (min-width: 768px) {
    .game-item {
        width: 200px; /* ปรับขนาดใหญ่ขึ้น */
    }
}


.game-list {
    background: #000146;
    padding: 20px;
    text-align: center;
}

#games-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.game-item {
    width: 120px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.game-item:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.game-item img {
    width: 100%;
    border-radius: 8px;
}


/* ========================= */
/* 🎰 BETTING PLATFORMS */
/* ========================= */
.betting-platforms {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.platform {
    background: #14213d;
    padding: 15px;
    border-radius: 10px;
    transition: background 0.3s ease-in-out;
}

.platform:hover {
    background: #ffd60a;
    color: #14213d;
}

/* ========================= */
/* 📱 MEDIA QUERIES (RESPONSIVE) */
/* ========================= */

/* ✅ สำหรับหน้าจอแท็บเล็ต (สูงสุด 768px) */
@media screen and (max-width: 768px) {
    .login-form {
        flex-direction: column;
        align-items: center;
    }

    .login-form input {
        width: 80%;
    }

    .login-form button {
        width: 80%;
    }

    .category-menu {
        gap: 5px;
    }

    .category img {
        width: 40px;
    }

    .betting-platforms {
        padding: 10px;
    }
}


/* ✅ สำหรับมือถือ (สูงสุด 480px) */
@media screen and (max-width: 480px) {
    .banner {
        max-width: 100%;
    }

    .login-form {
        width: 90%;
    }

    .category-menu {
        flex-direction: column;
        align-items: center;
    }

    .category img {
        width: 35px;
    }

    .prev, .next {
        font-size: 16px;
        padding: 8px;
    }

    .platform {
        font-size: 14px;
    }
}

.bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%; /* 🔥 ทำให้เมนูเต็มจอ */
    background: #1a73e8;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0px -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* 🔥 ปรับขนาดของเมนูให้เท่ากับองค์ประกอบอื่น */
.bottom-menu a {
    flex: 1;
    text-align: center;
    color: white;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 0;
}

/* 🔥 ปรับขนาดให้ไอคอนและข้อความมีระยะเท่ากัน */
.bottom-menu i {
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

/* 🔥 ปรับขนาดเมนูสำหรับหน้าจอใหญ่ */
@media screen and (min-width: 768px) {
    .bottom-menu a {
        font-size: 16px;
        padding: 15px 0;
    }

    .bottom-menu i {
        font-size: 22px; /* ขยายไอคอน */
    }
}


.bottom-menu a:hover, .bottom-menu a.active {
    background: var(--secondary);
    color: var(--primary-dark);
    font-weight: bold;
    border-radius: 5px;
    transform: scale(1.1);
}

#loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid #ffd60a;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media screen and (min-width: 768px) {
    .bottom-menu {
        max-width: 800px; /* ทำให้กว้างเท่ากับองค์ประกอบอื่น */
        margin: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .bottom-menu a {
        font-size: 16px;
        padding: 15px 0;
    }

    .bottom-menu i {
        font-size: 22px;
    }
}

