/* --- 1. ตั้งค่าพื้นฐาน (Global Styles) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #070404; /* ดำสนิทสไตล์ถ่านไฟเพลิง */
    color: #ffeedb;
    font-family: 'Kanit', sans-serif;
    overflow-x: hidden;
    padding-bottom: 70px;
}

/* --- 2. Header & Navbar (สำหรับจอคอมพิวเตอร์) --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: linear-gradient(to bottom, #150606, #070404);
    border-bottom: 2px solid #ff3b00; /* ขอบแดงเพลิง */
    box-shadow: 0 4px 20px rgba(255, 59, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header .logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

header nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

header nav a {
    color: #ffcaa6;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

header nav a:hover {
    color: #ff3b00;
    text-shadow: 0 0 10px rgba(255, 59, 0, 0.7);
}

header .buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

header .buttons button {
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

header .buttons .login {
    background: transparent;
    color: #ffd700;
    border: 1px solid #ffd700;
}

header .buttons .login:hover {
    background: rgba(255, 215, 0, 0.1);
}

header .buttons .register {
    background: linear-gradient(135deg, #ff3b00, #ff8c00); /* ไล่เฉดแดงส้มแบบในโลโก้ตัว X */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 59, 0, 0.4);
}

header .buttons .register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 0, 0.7);
}

/* ปุ่มแฮมเบอร์เกอร์สำหรับมือถือ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #ff3b00;
    margin-left: 10px;
}

/* === HERO & OVERLAY (BANNER) === */
.hero {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 5%;
}

.overlay-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.overlay {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    background-image: url('i,/333.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    border: 2px solid #ff3b00;
    box-shadow: 0 8px 25px rgba(255, 59, 0, 0.4);
    overflow: hidden;
    cursor: pointer;
}

.overlay h1,
.overlay p,
.overlay button {
    display: none;
}

/* === CATEGORY SECTION === */
.category {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px 5%;
    flex-wrap: wrap;
}

.category .box {
    background: #150606; 
    color: #ffcaa6;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #b32a00;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.category .box:hover {
    background: rgba(255, 59, 0, 0.1);
    color: #ff3b00;
    border-color: #ff3b00;
}

.category .box.active {
    background: linear-gradient(135deg, #ff3b00, #ff8c00);
    color: #ffffff;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 59, 0, 0.6);
}

/* === GAMES DISPLAY SECTION === */
.games-container {
    max-width: 1200px;
    margin: 10px auto 30px auto;
    padding: 0 5%;
}

.category-content {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.category-content.active {
    display: grid;
}

.game-card {
    background-color: #120505;
    border: 1px solid rgba(255, 59, 0, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #ff3b00;
    box-shadow: 0 8px 20px rgba(255, 59, 0, 0.5);
}

.game-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* === CARDS / PROMOTION SECTION === */
.cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 5%;
    flex-wrap: wrap;
}

.card {
    background: #120505;
    color: #ffd700;
    border: 1px solid #ff3b00;
    width: 320px;
    height: 140px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(255, 59, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 8px 20px rgba(255, 59, 0, 0.4);
}

/* === FOOTER SECTION === */
footer {
    text-align: center;
    padding: 25px;
    background: #070404;
    color: #888888;
    margin-top: 30px;
    border-top: 1px solid #ff3b00;
}

footer.footer-bar {
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #070404;
    padding: 15px 10%;
    border-top: 2px solid #ff3b00;
    border-bottom: 2px solid #ff3b00;
    margin-top: 40px;
}

footer.footer-bar::before {
    content: '';
    position: absolute;
    top: 38%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ff3b00;
    z-index: 1;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    z-index: 2;
}

/* === BOTTOM NAVIGATION BAR === */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(7, 4, 4, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #ff3b00;
    z-index: 9999;
}

.bottom-nav::before {
    content: '';
    position: absolute;
    top: 35%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ff3b00;
    z-index: 1;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 2;
}

.nav-item .icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #3d0c0c 0%, #1c0707 70%, #070404 100%);
    border: 2px solid #ff3b00;
    box-shadow: 0 0 10px rgba(255, 59, 0, 0.5), inset 0 0 6px rgba(255, 140, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -15px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav-item .icon-circle img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.nav-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffcaa6;
    margin-top: 4px;
}

.nav-item:hover .icon-circle {
    transform: scale(1.1);
    border-color: #ffd700;
}

.nav-item .icon-circle i {
    font-size: 22px;
    color: #ff3b00;
}

/* === PROMOTION SECTION === */
.promotion-section {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Kanit', sans-serif;
}

.promo-main-title {
    text-align: center;
    color: #ffd700;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(255, 59, 0, 0.4);
}

.promo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.promo-box {
    background-color: #120505;
    border: 1px solid #ff3b00;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(255, 59, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.promo-banner {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.promo-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.promo-header-title {
    text-align: center;
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.promo-details {
    color: #ffcaa6;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.promo-details .details-title {
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 8px;
}

.promo-details ul {
    padding-left: 18px;
    margin: 0;
}

.promo-details li {
    margin-bottom: 4px;
    color: #ffeedb;
}

.btn-get-promo {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: linear-gradient(135deg, #ff3b00, #ff8c00);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(255, 59, 0, 0.4);
    transition: all 0.2s ease;
}

.btn-get-promo:hover {
    background: linear-gradient(135deg, #ff5722, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 59, 0, 0.7);
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.article-card {
    background-color: #120505;
    border: 1px solid #ff3b00;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(255, 59, 0, 0.2);
}

h1 {
    color: #ffd700;
    font-size: 2.1rem;
    margin-bottom: 20px;
    line-height: 1.3;
    border-bottom: 2px solid #ff3b00;
    padding-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 59, 0, 0.5);
}

h2 {
    color: #ffd700;
    font-size: 1.4rem;
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

h3 {
    color: #ffcaa6;
    font-size: 1.15rem;
    margin: 20px 0 10px 0;
}

p {
    color: #ffcaa6;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* HIGHLIGHT BOX */
.callout-box {
    background-color: #1c0707;
    border-left: 4px solid #ff3b00;
    padding: 18px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.callout-box p {
    margin-bottom: 0;
    color: #ffd700;
}

/* BUTTON ACTION */
.action-banner {
    text-align: center;
    margin: 35px 0;
    padding: 25px;
    background: radial-gradient(circle, #3d0c0c 0%, #120505 100%);
    border: 1px solid #ff3b00;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 59, 0, 0.3);
}

.btn-main-login {
    display: inline-block;
    background: linear-gradient(135deg, #ff3b00, #ff8c00);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 12px 35px;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(255, 59, 0, 0.5);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn-main-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 59, 0, 0.8);
    color: #ffffff;
    text-decoration: none;
}

/* FAQ SECTION */
.faq-item {
    background-color: #120505;
    border: 1px solid #ff3b00;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 15px 20px;
}

.faq-question {
    color: #ffd700;
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-question i {
    color: #ff3b00;
}

.faq-answer {
    color: #ffcaa6;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========================================== */
/* === RESPONSIVE DESIGN (มือถือ & แท็บเล็ต) === */
/* ========================================== */

@media (max-width: 1024px) {
    header {
        padding: 12px 3%;
    }
    header nav a {
        margin: 0 8px;
        font-size: 0.9rem;
    }
    .category-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 15px;
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(7, 4, 4, 0.98);
        flex-direction: column;
        padding: 20px 0;
        border-bottom: 2px solid #ff3b00;
        box-shadow: 0 10px 20px rgba(0,0,0,0.8);
        z-index: 2000;
    }

    header nav.active {
        display: flex;
    }

    header nav a {
        margin: 10px 0;
        font-size: 1.1rem;
    }

    header .logo img {
        max-height: 45px;
    }

    header .buttons button {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .hero {
        padding: 10px 15px;
    }

    .overlay {
        border-radius: 8px;
    }

    .category {
        padding: 10px 15px;
        gap: 8px;
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .category::-webkit-scrollbar {
        display: none;
    }

    .category .box {
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .games-container {
        padding: 0 15px;
        margin: 5px auto 20px auto;
    }

    .category-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cards, .promotion-section {
        padding: 10px 15px;
    }

    .card {
        width: 100%;
        height: 120px;
    }

    .promo-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .container {
        margin: 15px auto;
        padding: 0 15px;
    }

    .article-card {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .bottom-nav {
        height: 65px;
    }

    .nav-item .icon-circle {
        width: 42px;
        height: 42px;
        margin-top: -12px;
    }

    .nav-item .icon-circle img, 
    .nav-item .icon-circle i {
        width: 20px;
        height: 20px;
        font-size: 18px;
    }

    .nav-item span {
        font-size: 0.7rem;
    }

    body {
        padding-bottom: 65px;
    }
}

@media (max-width: 480px) {
    header .buttons {
        gap: 5px;
    }
    header .buttons button {
        padding: 5px 10px;
        font-size: 0.7rem;
    }
}