/* public/css/style.css */
/* 🟢🔵⚫⚪ ธีม Neon Tech (เขียว-น้ำเงิน-ดำ-เงิน) ⚪⚫🔵🟢 */

/* โหลดฟอนต์ */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600&display=swap');

:root {
    /* กำหนดชุดสีหลัก แก้ตรงนี้เปลี่ยนทั้งเว็บ */
    --bg-main: #020c1b;       /* ดำ-น้ำเงินเข้มสุด (พื้นหลัง) */
    --bg-secondary: #0a192f;  /* น้ำเงินเข้ม (การ์ด/หัวเว็บ) */
    --accent-primary: #00ffcc; /* เขียวนีออน/ไซแอน (ปุ่มหลัก/แสง) */
    --accent-secondary: #8892b0; /* เงิน-น้ำเงิน (ข้อความรอง/ขอบ) */
    --text-light: #e6f1ff;    /* สีขาวอมฟ้า (ข้อความหลัก) */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
    /* พื้นหลังไล่เฉดดำ-น้ำเงิน เหมือนอวกาศ */
    background: linear-gradient(180deg, var(--bg-main) 0%, #051224 100%);
    color: var(--text-light);
    text-align: center;
    padding-bottom: 90px; /* เว้นที่ให้เมนูล่าง */
    min-height: 100vh;
}

/* --- HEADER ส่วนบน --- */
.header-container {
    background: rgba(10, 25, 47, 0.95); /* น้ำเงินเข้มโปร่งแสง */
    backdrop-filter: blur(10px); /* เบลอฉากหลัง */
    border-bottom: 1px solid rgba(0, 255, 204, 0.2); /* เส้นขอบเขียวจางๆ */
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 255, 204, 0.1); /* เงาแสงสีเขียว */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* แก้สีหัวข้อ h1 ใน header (ทับ inline style เดิมใน HTML) */
.header-container h1 {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

/* --- ปรับแต่งปุ่ม Login / Register แบบพรีเมียม (No Glow) --- */

.auth-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.btn {
    padding: 10px 28px;
    border-radius: 6px; /* เปลี่ยนจากวงกลมเป็นเหลี่ยมมน ดูทันสมัยกว่า */
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease-in-out;
    width: 140px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ปุ่มเข้าสู่ระบบ (เน้นโทนเข้ม-เงิน ดูลึกลับ) */
.btn-login {
    background: #0a192f; /* สีเดียวกับพื้นหลังแต่ทึบ */
    color: #e6f1ff;
    border: 1.5px solid #8892b0; /* ขอบสีเงิน-เทา */
}

.btn-login:hover {
    background: #112240;
    border-color: #00ffcc; /* เปลี่ยนขอบเป็นสีเขียวเวลาชี้ */
    color: #00ffcc;
    transform: translateY(-2px);
}

/* ปุ่มสมัครสมาชิก (เน้นสีเขียวตัดกับดำ ให้เด่นที่สุดในหน้าเว็บ) */
.btn-register {
    /* ใช้การไล่สีแบบ Solid ไม่มีการเรืองแสง */
    background: linear-gradient(135deg, #00ffcc 0%, #00d6aa 100%);
    color: #020c1b; /* ตัวหนังสือสีเข้มเพื่อให้ตัดกับพื้นหลังสว่าง */
    border: none;
    /* ใส่เงาแบบทึบ (Drop Shadow) ไม่ใช่เงาฟุ้ง (Glow) */
    box-shadow: 0 4px 0px #008f72; 
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 0px #008f72; /* เอฟเฟกต์เหมือนปุ่มโดนกดลงไป */
    filter: brightness(1.1);
}

/* ปรับฟอนต์ให้ชัดขึ้น */
.btn span {
    display: block;
}

/* --- BANNER --- */
.hero-banner {
    margin: 25px auto;
    width: 92%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    /* กรอบเรืองแสงสีเขียว-ฟ้า */
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-main), var(--bg-main)), linear-gradient(45deg, var(--accent-primary), #00aaff);
    background-origin: border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-banner img {
    width: 100%;
    display: block;
}

/* ข้อความวิ่ง */
marquee {
    background: rgba(0, 255, 204, 0.1) !important; /* พื้นหลังเขียวจางๆ */
    color: var(--accent-primary) !important;
    border-top: 1px solid rgba(0, 255, 204, 0.2);
    border-bottom: 1px solid rgba(0, 255, 204, 0.2);
    padding: 8px 0;
    font-weight: 600;
    letter-spacing: 1px;
}
/* ต้องแก้ inline style ใน HTML ของ div ครอบ marquee ออกด้วย ถ้าอยากให้สวยสุด */


/* --- LAYOUT ใหม่: เมนูซ้าย + ตารางขวา --- */

.main-container {
    display: flex; /* จัดเรียงแนวนอน */
    max-width: 1200px;
    margin: 20px auto;
    gap: 15px;
    padding: 0 10px;
    align-items: flex-start; /* ให้เริ่มจากบนสุดเสมอ */
}

/* 1. เมนูหมวดหมู่ด้านซ้าย (Left Sidebar) */
.category-sidebar {
    width: 80px; /* ความกว้างแถบเมนู */
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 5px;
    position: sticky;
    top: 100px; /* ให้ลอยตามเวลาเลื่อนหน้าจอ */
    z-index: 50;
    flex-shrink: 0; /* ห้ามโดนบีบ */
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--accent-secondary);
    padding: 10px 5px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
}

.cat-item i {
    font-size: 24px;
    margin-bottom: 5px;
    transition: 0.3s;
}

.cat-item span {
    font-size: 10px;
    font-weight: 600;
}

/* เอฟเฟกต์ตอนชี้ หรือ เลือกอยู่ */
.cat-item:hover, .cat-item.active {
    background: rgba(0, 255, 204, 0.1);
    border-color: var(--accent-primary);
    color: var(--text-light);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.cat-item:hover i, .cat-item.active i {
    color: var(--accent-primary) !important;
    text-shadow: 0 0 10px var(--accent-primary);
}


/* 2. พื้นที่ตารางเกมด้านขวา (Right Grid Area) */
.game-content-area {
    flex-grow: 1; /* ขยายเต็มพื้นที่ที่เหลือ */
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* ปรับขนาดอัตโนมัติ */
    gap: 12px;
}

.provider-card {
    background: #0b1426;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #1e2d4d;
    transition: 0.3s;
    cursor: pointer;
    aspect-ratio: 3/4; /* สัดส่วนรูปแนวตั้งเหมือนปกเกม */
}

/* รูปภาพปกเกม/โลโก้ค่าย */
.provider-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ให้รูปเต็มกรอบสวยๆ */
    transition: 0.5s;
}

/* เอฟเฟกต์ตอนชี้ */
.provider-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(0, 255, 204, 0.3);
}

.provider-card:hover img {
    transform: scale(1.1); /* ขยายรูปนิดนึง */
}

/* ป้ายชื่อค่าย (Overlay) */
.provider-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    color: white;
    padding: 10px 5px;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 2px 5px black;
}

/* --- ปรับแต่งสำหรับมือถือ: ให้เมนูอยู่ด้านข้างตลอด --- */
@media (max-width: 768px) {
    /* 1. บังคับให้เรียงแนวนอนเหมือนเดิม */
    .main-container {
        flex-direction: row !important; 
        gap: 8px;
        padding: 0 5px;
    }
    
    /* 2. บีบเมนูซ้ายให้แคบลงเพื่อให้ไม่บังจอ */
    .category-sidebar {
        width: 60px; /* ลดความกว้างลง */
        position: sticky;
        top: 75px;
        padding: 10px 2px;
        height: auto;
        flex-shrink: 0; /* ห้ามโดนตารางเกมเบียด */
    }
    
    /* 3. ลดขนาดไอคอนและตัวหนังสือในเมนูซ้าย */
    .cat-item {
        padding: 8px 2px;
        margin-bottom: 5px;
    }
    
    .cat-item i {
        font-size: 18px !important; /* ไอคอนเล็กลง */
    }
    
    .cat-item span {
        font-size: 8px; /* ตัวหนังสือเล็กจิ๋วเพื่อให้ไม่ล้น */
        letter-spacing: 0;
    }

    /* 4. ปรับตารางเกมให้โชว์แถวละ 2 หรือ 3 รูปให้ดูเต็มจอ */
    .provider-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* โชว์แถวละ 2 รูปจะดูแพงกว่า */
        gap: 8px;
    }

    .provider-name {
        font-size: 10px;
        padding: 5px 2px;
    }

    /* ปรับขนาดหัวข้อเกมแนะนำ */
    .game-content-area h2 {
        font-size: 1.1rem;
    }
}

/* --- BOTTOM BAR (เมนูล่าง) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* พื้นหลังโปร่งแสง เบลอ */
    background: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 255, 204, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 8px 15px;
    z-index: 999;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.nav-item {
    color: var(--accent-secondary); /* สีเงินปกติ */
    text-decoration: none;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
    position: relative;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 5px;
}

.nav-item.active {
    color: var(--accent-primary); /* สีเขียวเมื่อเลือก */
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

/* จุดแสดงสถานะเมนูที่เลือก */
.nav-item.active::after {
    content: '';
    position: absolute;
    top: -12px;
    width: 30px;
    height: 3px;
    background: var(--accent-primary);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 8px var(--accent-primary);
}


/* --- แก้ไขปุ่มตรงกลาง (ฝากถอน) --- */
/* เราใช้ CSS สั่งทับ inline style ใน HTML */
.nav-item div[style*="background: #b48536"] {
    background: linear-gradient(45deg, var(--accent-primary), #00aaff) !important; /* ไล่สีเขียว-ฟ้า */
    border: 3px solid var(--bg-main) !important; /* ขอบสีเดียวกับพื้นหลัง */
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.5) !important;
    transform: translateY(-5px);
}
.nav-item div[style*="background: #b48536"] i {
    color: var(--bg-main) !important; /* ไอคอนสีเข้ม */
}

/* --- ปุ่ม LINE แบบวงกลมกะทัดรัด --- */
.line-float-btn {
    position: fixed;
    bottom: 90px;   /* อยู่ตำแหน่งเดิม */
    right: 25px;    /* ขยับให้ตรงกับ Telegram (25px) */
    width: 45px;    /* ขนาดเท่ากับ Telegram */
    height: 45px;   /* ขนาดเท่ากับ Telegram */
    background: linear-gradient(45deg, #06c755, #00d65b);
    color: white;
    border-radius: 50%; /* ทำให้เป็นวงกลม */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    border: 2px solid white;
    animation: line-pulse 2s infinite;
}

.line-float-btn i {
    font-size: 18px; /* ขนาดไอคอนเท่ากับ Telegram */
}

/* เอฟเฟกต์ตอนเอาเมาส์ชี้ */
.line-float-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(6, 199, 85, 0.7);
}

/* เอฟเฟกต์เด้งดึ๋ง (Pulse) ของ LINE */
@keyframes line-pulse {
    0% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(6, 199, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, 0); }
}
/* --- ปุ่ม Telegram แบบวงกลมกะทัดรัด --- */
.telegram-float-btn {
    position: fixed;
    bottom: 150px; /* อยู่เหนือปุ่ม LINE */
    right: 25px;   /* ขยับให้ตรงกลางพอดีกับปุ่ม LINE */
    width: 45px;   /* กำหนดความกว้าง */
    height: 45px;  /* กำหนดความสูงให้เท่ากันเพื่อให้เป็นวงกลม */
    background: linear-gradient(45deg, #0088cc, #24a1de);
    color: white;
    border-radius: 50%; /* ทำให้เป็นวงกลมเป๊ะๆ */
    display: flex;
    align-items: center;
    justify-content: center; /* จัดไอคอนให้อยู่ตรงกลาง */
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    border: 2px solid white;
    animation: tg-pulse 2s infinite;
}

.telegram-float-btn i {
    font-size: 18px; /* ขนาดไอคอนกำลังดีสำหรับปุ่มวงกลม */
}

/* เอฟเฟกต์ตอนเอาเมาส์ชี้ */
.telegram-float-btn:hover {
    transform: scale(1.15); /* ขยายใหญ่ขึ้นนิดหน่อยเวลาชี้ */
    box-shadow: 0 0 20px rgba(0, 136, 204, 0.7);
}

/* เอฟเฟกต์เด้งดึ๋ง (Pulse) */
@keyframes tg-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(0, 136, 204, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 136, 204, 0); }
}

/* --- แถบประกาศแบบ Clean Inset (ไม่มีมุมดำ) --- */

.cyber-news-frame {
    margin: 20px 15px;
    display: flex;
    height: 38px;
    background: #020c1b; /* พื้นหลังหลัก */
    border: 1px solid rgba(255, 204, 0, 0.4); 
    border-radius: 4px;
    overflow: hidden;
}

.cyber-tag-yellow {
    background: #ffcc00; /* สีเหลืองล้วน ไม่ต้องไล่เฉดเพื่อให้ดูแบนและสะอาด */
    color: #000;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 13px;
    /* ลบ clip-path เฉียงออกเพื่อให้เป็นสี่เหลี่ยมที่ลงล็อคเป๊ะ */
    clip-path: none; 
    position: relative;
    z-index: 2;
    /* เพิ่มเส้นขอบขวาบางๆ เพื่อแบ่งสัดส่วนแทนการใช้เงาดำ */
    border-right: 2px solid #000; 
}

.cyber-tag-yellow i {
    margin-right: 8px;
    font-size: 16px;
}

.cyber-ticker-area {
    flex-grow: 1;
    background: rgba(255, 204, 0, 0.05); /* ใส่สีเหลืองจางๆ ในแถบวิ่งเพื่อให้ดูเป็นชุดเดียวกัน */
    display: flex;
    align-items: center;
    color: #ffcc00;
    font-size: 14px;
    font-weight: 500;
    padding-left: 10px;
}

.cyber-ticker-area marquee {
    padding-top: 2px;
}

/* --- ปรับแต่งรูปภาพไอคอนเมนูล่าง --- */

.nav-custom-icon {
    width: 24px;   /* ปรับขนาดความกว้างตามต้องการ */
    height: 24px;  /* ปรับขนาดความสูงตามต้องการ */
    margin-bottom: 5px;
    object-fit: contain;
    transition: 0.3s;
    /* ถ้าเป็นรูปสีเทา อยากให้เป็นสีเขียวนีออนตอน Active สามารถใช้ filter ได้ครับ */
    filter: grayscale(100%) opacity(0.7); 
}

/* เมื่อเมนูถูกเลือก (Active) หรือเอาเมาส์ชี้ */
.nav-item.active .nav-custom-icon,
.nav-item:hover .nav-custom-icon {
    filter: grayscale(0%) opacity(1) drop-shadow(0 0 5px var(--accent-primary));
}

/* ปรับแต่งปุ่มกลางให้ดูเด่นเหมือนในรูป image_5b6622.png */
.center-wallet-btn {
    background: linear-gradient(135deg, var(--accent-primary), #00aaff);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -30px; /* ให้ปุ่มลอยขึ้นมา */
    border: 3px solid var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.4);
}

.nav-custom-icon-center {
    width: 28px;
    height: 28px;
    filter: brightness(0) saturate(100%); /* ทำให้ไอคอนในปุ่มกลางเป็นสีดำ/สีเข้ม */
}