:root {
    --primary: #00ff88;      
    --emerald: #006644;      
    --dark-bg: #050a07;      
    --sidebar-bg: #0b140e;   
    --card-bg: #121f18;      
    --gold: #deb887;         
    --text: #e0e0e0;
    --text-muted: #8da696;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
    text-decoration: none;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    border-right: 1px solid rgba(0, 255, 136, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 5px 0 30px rgba(0,0,0,0.5);
}

/* --- ปรับแต่ง Logo รูปภาพ --- */
.brand {
    padding: 20px;
    display: flex;
    justify-content: center; /* จัดให้อยู่กึ่งกลางเมนู */
    align-items: center;
    background: transparent; /* เอาพื้นหลังไล่สีออก (หรือจะเก็บไว้ก็ได้) */
}

.logo-link {
    display: block;
    width: 100%;
    text-align: center;
}

.logo-link img {
    max-width: 80%;   /* ให้กว้างไม่เกิน 80% ของเมนู (เหลือขอบซ้ายขวานิดหน่อย) */
    height: auto;     /* ให้สูงตามสัดส่วน */
    max-height: 70px; /* จำกัดความสูงสูงสุดไม่ให้ดันเนื้อหาอื่นตก (ปรับเลขนี้ได้ตามชอบ) */
    object-fit: contain;
    display: inline-block;
}

.text-green { color: var(--primary); }
.text-gold { color: var(--gold); }

.user-mini-profile {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.avatar { position: relative; width: 40px; height: 40px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; border: 2px solid var(--emerald); }
.status-dot { width: 10px; height: 10px; background: var(--primary); border-radius: 50%; position: absolute; bottom: 0; right: 0; border: 2px solid var(--sidebar-bg); }
.info .username { display: block; font-size: 14px; font-weight: 500; }
.info .balance { display: block; font-size: 12px; color: var(--primary); font-weight: bold; }

.side-menu {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.side-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-muted);
    font-size: 14px;
    transition: 0.3s;
    border-left: 3px solid transparent;
}

.side-menu a i { width: 25px; font-size: 16px; }

.side-menu a:hover, .side-menu a.active {
    background: linear-gradient(90deg, rgba(0,255,136,0.1), transparent);
    color: #fff;
    border-left-color: var(--primary);
}

.side-menu .badge {
    margin-left: auto;
    background: #ff0040;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
}

.side-menu .separator {
    font-size: 11px;
    text-transform: uppercase;
    color: #4a5e53;
    padding: 15px 25px 5px;
    font-weight: 600;
}

.side-menu .vip-link { color: var(--gold); }
.side-menu .vip-link:hover { text-shadow: 0 0 10px var(--gold); }
.side-footer { padding: 20px; }
.deposit-btn {
    display: block; /* บังคับให้เป็นก้อนเต็มบรรทัด */
    text-align: center; /* จัดตัวหนังสือให้อยู่ตรงกลาง */
    text-decoration: none; /* เอาขีดเส้นใต้ลิ้งค์ออก */
    
    /* สไตล์เดิม (คงไว้) */
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--emerald), #004d33);
    border: 1px solid var(--primary);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0,255,136,0.2);
    transition: 0.3s;
}

.deposit-btn:hover { 
    box-shadow: 0 0 25px rgba(0,255,136,0.4); 
    transform: translateY(-2px); 
    color: #fff; /* ย้ำสีตัวหนังสือตอนเอาเมาส์จ่อ */
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px 30px;
    width: calc(100% - var(--sidebar-width));
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.page-title { font-size: 20px; font-weight: 600; color: #fff; }
.top-actions { display: flex; gap: 10px; }
.top-actions button {
    padding: 8px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}
/* --- ปุ่มเข้าสู่ระบบ (Premium Gold Style) --- */
.login-btn {
    position: relative;
    /* ไล่สีทอง 3 เฉด เพื่อมิติที่สวยงาม */
    background: linear-gradient(45deg, #b8860b, #ffd700, #b8860b);
    background-size: 200% auto; /* เตรียมพื้นที่สำหรับอนิเมชั่น */
    color: #000; /* ตัวหนังสือสีดำ ตัดกับสีทอง */
    border: none; /* เอาขอบเดิมออก */
    padding: 8px 25px; /* เพิ่มความกว้างให้ดูเต็มตา */
    border-radius: 50px; /* ทำมุมโค้งมน */
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase; /* ตัวพิมพ์ใหญ่ทั้งหมด */
    letter-spacing: 0.5px; /* ระยะห่างตัวอักษรนิดนึงให้ดูโปร */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* เงาปกติ */
    transition: all 0.4s ease; /* ความลื่นไหล */
    overflow: hidden;
    z-index: 1;
}

/* เอฟเฟกต์ตอนเอาเมาส์ไปจ่อ (Hover) */
.login-btn:hover {
    background-position: right center; /* เลื่อนสีพื้นหลังให้เหมือนไฟวิ่ง */
    transform: translateY(-3px) scale(1.05); /* ลอยขึ้นนิดนึง + ขยายใหญ่ขึ้น */
    color: #000;
}

/* แถม! เอฟเฟกต์แสงเงาวิ่งผ่าน (Shine Effect) */
.login-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
    z-index: -1;
}

.login-btn:hover::after {
    left: 100%; /* แสงวิ่งจากซ้ายไปขวาเมื่อเอาเมาส์แตะ */
}
/* --- ปุ่มติดต่อ LINE (Neon Shake Style) --- */
.line-btn {
    position: relative;
    display: inline-flex; /* จัดไอคอนกับตัวหนังสือให้อยู่กึ่งกลาง */
    align-items: center;
    gap: 8px; /* ระยะห่างระหว่างไอคอนกับตัวหนังสือ */
    
    /* สีเขียว Line แบบไล่เฉด */
    background: linear-gradient(135deg, #06c755, #00d65b);
    color: #fff;
    border: none;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    
    /* เงาสีเขียวจางๆ */
    box-shadow: 0 5px 15px rgba(6, 199, 85, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* เด้งดึ๋ง */
    z-index: 1;
    overflow: hidden;
}

/* เอฟเฟกต์ตอนเอาเมาส์ไปจ่อ (Hover) */
.line-btn:hover {
    transform: scale(1.05) translateY(-3px); /* ขยายและลอยขึ้น */
    background: linear-gradient(135deg, #00d65b, #06c755); /* สลับสีให้ดูมีการเคลื่อนไหว */
}

/* สั่งให้ไอคอนข้างใน (ตัว i) ขยับ */
.line-btn i {
    font-size: 18px; /* ขยายไอคอนให้ชัด */
    transition: 0.3s;
}

/* ตอนเอาเมาส์จ่อปุ่ม ให้ไอคอนเขย่า (Shake) */
.line-btn:hover i {
    animation: shake 0.5s ease-in-out both;
}

/* คีย์เฟรมการเขย่า */
@keyframes shake {
    0% { transform: rotate(0); }
    25% { transform: rotate(-20deg) scale(1.2); }
    50% { transform: rotate(20deg) scale(1.2); }
    75% { transform: rotate(-10deg) scale(1.2); }
    100% { transform: rotate(0) scale(1); }
}
.mobile-toggle { display: none; font-size: 24px; cursor: pointer; }

.hero-section {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    background: url('https://via.placeholder.com/1200x400/003300/fff') center/cover;
    height: 300px;
}

.bg-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    z-index: 1;
}

.match-info {
    position: relative; z-index: 2;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
}

.league-tag {
    color: var(--primary);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.teams { display: flex; align-items: center; gap: 20px; margin: 20px 0; }
.team { display: flex; flex-direction: column; align-items: center; color: #fff; }
.team img { width: 60px; margin-bottom: 5px; }
.vs-badge { text-align: center; }
.vs-badge span { font-size: 24px; font-weight: bold; color: #555; }
.live-indicator { background: #ff0040; color: white; padding: 2px 8px; font-size: 10px; border-radius: 4px; animation: pulse 1.5s infinite; }

.watch-now-btn {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    width: fit-content;
    cursor: pointer;
}

.quick-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}
.q-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
    cursor: pointer;
    height: 85px;
}
.q-card:hover, .q-card.active {
    background: linear-gradient(135deg, var(--emerald), #004d33);
    border-color: var(--primary);
}
.q-card i { font-size: 24px; margin-bottom: 10px; color: var(--primary); }
.q-card.active i { color: #fff; }
.q-card span { display: block; font-size: 14px; color: var(--text-muted); }
.q-card.active span { color: #fff; }


.section-header { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: center; }
.section-header h3 { font-size: 18px; color: #fff; }
.view-all { font-size: 13px; color: var(--text-muted); transition: 0.3s; }
.view-all:hover { color: var(--primary); }

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.thumb { position: relative; height: 160px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-tag { position: absolute; top: 10px; left: 10px; background: #ff0040; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.vip-tag { position: absolute; top: 10px; left: 10px; background: var(--gold); color: #000; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; }
.play-overlay, .lock-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: 0.3s;
}
.video-card:hover .play-overlay { opacity: 1; }
.video-card:hover .lock-overlay { opacity: 1; }
.play-overlay i { font-size: 40px; color: #fff; filter: drop-shadow(0 0 10px rgba(0,0,0,0.5)); }
.lock-overlay i { font-size: 40px; color: var(--gold); }

.video-card .meta { padding: 15px; }
.video-card h4 { font-size: 15px; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-card p { font-size: 12px; color: var(--text-muted); }


.bottom-nav { display: none; }

@media (max-width: 992px) {
    .sidebar { display: none; } 
    .main-content { margin-left: 0; width: 100%; padding: 15px; padding-bottom: 80px; }
    .mobile-toggle { display: block; color: var(--text); }
    .page-title { display: none; } 
    .hero-section { height: auto; }
    .match-info { padding: 20px; }
    .quick-menu { grid-template-columns: repeat(2, 1fr); }
    .bottom-nav {
        position: fixed; bottom: 0; left: 0; width: 100%;
        background: #0f1a14;
        border-top: 1px solid rgba(0,255,136,0.2);
        display: flex; justify-content: space-around;
        padding: 10px 0; z-index: 999;
        backdrop-filter: blur(10px);
    }
    
    .b-item {
        display: flex; flex-direction: column; align-items: center;
        color: #666; font-size: 10px; flex: 1;
    }
    .b-item i { font-size: 20px; margin-bottom: 4px; }
    .b-item.active { color: var(--primary); }
    
    .b-item.center { position: relative; }
    .float-btn {
        width: 50px; height: 50px;
        background: linear-gradient(135deg, var(--primary), var(--emerald));
        border-radius: 50%;
        display: flex; justify-content: center; align-items: center;
        position: absolute; top: -30px;
        border: 4px solid var(--dark-bg);
        box-shadow: 0 0 15px rgba(0,255,136,0.4);
    }
    .float-btn i { color: #000; font-size: 20px; margin: 0; }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 30px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    align-items: flex-start;
    height: auto;
}

.slide-item {
    min-width: 100%;
    height: auto;
    position: relative;
    display: flex; 
}

.slide-item img {
    width: 100%;
    height: auto;      
    object-fit: unset; 
    display: block;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    display: flex;
    align-items: center;
    padding-left: 50px;
}

.slider-btn {
    padding: 10px 25px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}
.slider-btn:hover { transform: scale(1.05); box-shadow: 0 0 25px rgba(0, 255, 136, 0.6); }

.slider-btn.gold-btn {
    background: linear-gradient(45deg, var(--gold), #b8860b);
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.3);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}
.nav-btn:hover { background: var(--primary); color: #000; }
.prev { left: 15px; }
.next { right: 15px; }

.dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.dot.active { background: var(--primary); width: 25px; border-radius: 10px; }

@media (max-width: 768px) {
    .slider-wrapper { height: auto; } 
    .slider-btn { padding: 8px 16px; font-size: 12px; }
    .nav-btn { width: 30px; height: 30px; font-size: 12px; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    
    /* เพิ่มบรรทัดนี้: เรียกใช้เอฟเฟกต์ Fade In พื้นหลัง */
    animation: fadeIn 0.3s ease-out forwards;
}

.modal-content {
    background: #111;
    border: 1px solid var(--primary);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
    text-align: center;

    /* เพิ่มบรรทัดนี้: เรียกใช้เอฟเฟกต์เด้งดึ๋ง (Popup Zoom) */
    animation: popupZoom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* เมื่อ Modal กำลังจะปิด ให้เล่น Animation ขาออก */
.modal-overlay.closing {
    animation: fadeOut 0.3s ease-in forwards; /* พื้นหลังค่อยๆ จาง */
    pointer-events: none; /* ป้องกันการกดซ้ำระหว่างกำลังปิด */
}

.modal-overlay.closing .modal-content {
    animation: popupZoomOut 0.3s ease-in forwards; /* ตัวกล่องค่อยๆ หุบ */
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.modal-header h2 {
    color: #fff;
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
}

.modal-login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #b8860b, #ffd700);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.modal-login-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.status-text {
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

/* --- Animation Keyframes --- */

/* 1. เฟดพื้นหลัง (จากจางไปเข้ม) */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 2. เด้งกล่องเนื้อหา (จากเล็กไปใหญ่ + ลอยขึ้นมา) */
@keyframes popupZoom {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px); /* เริ่มต้น: เล็กกว่าปกติ และลอยอยู่สูงนิดนึง */
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0); /* จบ: ขนาดปกติ เข้าที่เดิม */
    }
}

/* --- Exit Animations (ขาออก) --- */

/* 1. เฟดพื้นหลังออก (จากเข้มไปจาง) */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 2. หุบกล่องเนื้อหา (จากใหญ่ไปเล็ก + จางหายไป) */
@keyframes popupZoomOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px); /* หดเล็กลงนิดนึงแล้วลอยขึ้น */
    }
}

/* --- Logout Modal Buttons --- */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn {
    flex: 1; /* ให้ปุ่มกว้างเท่ากัน */
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

/* ปุ่มยกเลิก (สีเทา) */
.modal-btn.cancel {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}
.modal-btn.cancel:hover {
    background: #444;
}

/* ปุ่มยืนยัน (สีแดง หรือ ทองตามธีม) */
.modal-btn.confirm {
    background: linear-gradient(45deg, #ff0040, #ff4d4d); /* สีแดงให้รู้ว่าออกจากระบบ */
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 0, 64, 0.3);
}
.modal-btn.confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 64, 0.5);
}

/* --- TV / MUAY PAGE STYLES --- */

/* Grid สำหรับช่องรายการ */
.muay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* ปรับขนาดกล่อง */
    gap: 15px;
    padding-top: 10px;
}

.muay-box {
    background: #fff; /* ใช้พื้นขาวเพื่อให้โลโก้ชัด */
    border-radius: 12px;
    aspect-ratio: 1/1; /* สี่เหลี่ยมจัตุรัส */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.muay-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary); /* ขอบสีเขียวตอนชี้ */
    box-shadow: 0 0 20px rgba(0,255,136,0.4);
}

.muay-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%); /* ทำให้เป็นขาวดำก่อน */
    transition: 0.3s;
}

.muay-box:hover img {
    filter: grayscale(0%); /* คืนสีตอนเอาเมาส์ชี้ */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .muay-grid {
        grid-template-columns: repeat(3, 1fr); /* มือถือให้เรียง 3 ช่อง */
        gap: 10px;
    }
    .muay-box {
        padding: 10px;
    }
}

/* =========================================
   GRID LAYOUT (จัดระเบียบตาราง)
   ========================================= */
.muay-grid {
    display: grid;
    /* ปรับขนาดขั้นต่ำเป็น 100px-140px เพื่อให้พอดีกับโลโก้ */
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 15px; /* ระยะห่างระหว่างช่อง */
    padding: 10px 0;
}

/* =========================================
   CARD DESIGN (ดีไซน์กล่องให้ดูแพง)
   ========================================= */
.muay-box {
    /* 1. เปลี่ยนพื้นหลังเป็นสีดำจางๆ (Glassmorphism) */
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.1); /* เส้นขอบบางๆ */
    
    border-radius: 16px; /* มุมโค้งมน */
    aspect-ratio: 1 / 1; /* บังคับสี่เหลี่ยมจัตุรัส */
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* เพิ่ม padding เพื่อไม่ให้โลโก้ชิดขอบเกินไป */
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* ปรับรูปภาพโลโก้ */
.muay-box img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ให้รูปอยู่กลางพอดีไม่เบี้ยว */
    
    /* 2. ถ้าอยากให้ดูคลีน: เอา filter ออก หรือปรับให้สว่างขึ้น */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); 
    opacity: 0.8;
    transition: 0.4s ease;
}

/* =========================================
   HOVER EFFECTS (เอฟเฟกต์ตอนเอาเมาส์ชี้)
   ========================================= */
.muay-box:hover {
    transform: translateY(-5px);
    background: rgba(0, 255, 136, 0.05); /* พื้นหลังเปลี่ยนเป็นสีเขียวจางๆ ตามธีม */
    border-color: var(--primary); /* ขอบเรืองแสงสีเขียว */
    box-shadow: 0 10px 20px rgba(0, 255, 136, 0.15);
}

.muay-box:hover img {
    opacity: 1;
    transform: scale(1.1); /* ขยายรูปนิดนึง */
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)); /* ให้โลโก้เรืองแสง */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .muay-grid {
        grid-template-columns: repeat(3, 1fr); /* มือถือเรียง 3 */
        gap: 10px;
    }
    .muay-box {
        padding: 10px;
        border-radius: 12px;
    }
}

/* --- CSS สำหรับ Video Player --- */
.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    background: #000;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#clapprPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 20;
}

/* บังคับ Video/Iframe ให้ขยายเต็มพื้นที่ */
#clapprPlayer video, 
#clapprPlayer iframe, 
#clapprPlayer div {
    width: 100% !important;
    height: 100% !important;
    z-index: 20;
}

/* อนิเมชั่นไฟกระพริบ LIVE */
.live-indicator-blink {
    color: #ff0040;
    font-weight: bold;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* --- จัดการ Grid มวยให้สวยงาม --- */
.muay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

/* ปรับสไตล์กล่องที่ JS สร้างขึ้น (muay-box) */
.muay-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.muay-box:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
    transform: translateY(-5px);
}


/* คลีนค่าเก่าที่อาจจะล็อคความสูงไว้ */
.live-box {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    background: #000;
    /* บังคับสัดส่วน 16:9 มาตรฐาน เพื่อภาพที่คมชัด */
    aspect-ratio: 16 / 9; 
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

/* สำหรับมือถือ */
@media (max-width: 768px) {
    .live-box {
        margin: 0; /* เต็มขอบจอ */
        width: 100%;
        border-radius: 0;
        border: none;
    }
    .instruction-text {
        font-size: 12px;
        padding: 5px 15px;
    }
}



#default-youtube iframe {
    width: 100%;
    height: 100%;
    border: none;
    z-index: 10
}

/* UI ส่วนหน้าปกและข้อความแนะนำ */
.player-overlay-ui {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 50%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none; /* เพื่อให้ยังกดปุ่ม Play ของ YouTube ได้ */
    z-index: 5;
}

.welcome-badge {
    align-self: flex-start;
    background: rgba(0, 255, 136, 0.9);
    color: #000;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.instruction-text {
    align-self: center;
    color: #fff;
    font-size: 15px;
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn-watch-muay {
    background: linear-gradient(45deg, #ff0000, #cc0000);
    color: white !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    display: inline-flex; /* ใช้ inline-flex เพื่อให้กว้างเท่าเนื้อหา */
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* ป้องกันตัวอักษรตกบรรทัด */
}

/* ปรับขนาดปุ่มเมื่อดูในมือถือจอกว้างน้อยกว่า 480px */
@media (max-width: 480px) {
    .btn-watch-muay {
        font-size: 12px;
        padding: 4px 12px;
    }
    .section-header {
        gap: 10px !important; /* ลดระยะห่างลงนิดหน่อยบนมือถือ */
    }
}


@media (max-width: 992px) {
    /* 1. แก้ไขตรงนี้: ห้ามสั่ง display: none; ให้ใช้การดันออกไปข้างนอกแทน */
    .sidebar { 
        display: flex !important; /* เปลี่ยนจาก none เป็น flex */
        position: fixed !important;
        left: -260px; /* ดันเมนูไปเก็บไว้ทางซ้าย */
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 10000 !important;
        transition: 0.3s;
    }

    /* 2. เมื่อมี class active ให้เลื่อนกลับมาที่ 0 */
    .sidebar.active {
        left: 0 !important;
    }

    /* 3. ตรวจสอบให้แน่ใจว่า mobile-toggle แสดงผล */
    .mobile-toggle { 
        display: block !important; 
        color: var(--text); 
        font-size: 28px;
        z-index: 1001;
    }
}