@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700&display=swap');

/* Color Variables อิงตามโลโก้ Z16 (น้ำเงิน-ทอง) และ UI แบบ Dark Mode */
:root {
    --bg-dark: #0a0e17;       /* สีพื้นหลังหลัก (กรมท่าเข้มเกือบดำ) */
    --bg-card: #151b2b;       /* สีพื้นหลังการ์ด */
    --primary-blue: #003399;  /* สีน้ำเงินโลโก้ */
    --primary-gold: #cfaa5e;  /* สีทองโลโก้ */
    --gold-hover: #e0be75;    
    --text-main: #ffffff;
    --text-muted: #9ba4b5;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #050810;
    border-bottom: 1px solid rgba(207, 170, 94, 0.2);
}

.nav-logo img {
    height: 40px;
    object-fit: contain;
}

.nav-actions button {
    padding: 8px 16px;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-login {
    background: transparent;
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold) !important;
    margin-right: 10px;
}

.btn-login:hover {
    background: rgba(207, 170, 94, 0.1);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary-gold), #8a6a2c);
    color: #fff;
}

.btn-register:hover {
    background: linear-gradient(135deg, var(--gold-hover), #9c7b37);
}

/* Main Container */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, var(--primary-blue), #0a0e17); /* แทนที่ด้วยภาพพื้นหลังได้ */
    border-radius: 15px;
    padding: 50px 30px;
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
}

.hero-content h1 {
    font-size: 2.5rem;
    max-width: 400px;
    margin-top: 0;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn-register.large {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 25px;
}

/* Category Grid (3 กล่องใหญ่) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.cat-card {
    height: 150px;
    border-radius: 12px;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.cat-card:hover { transform: translateY(-5px); }
.box-blue { background: linear-gradient(45deg, #0052cc, #003399); }
.box-darkblue { background: linear-gradient(45deg, #1a2a42, #0f1724); border: 1px solid #2a3a52; }
.box-gold { background: linear-gradient(45deg, var(--primary-gold), #8a6a2c); }
.cat-card h3 { margin: 0; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }

/* Games Grid */
.games-section { margin-bottom: 50px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.section-header h2 { margin: 0; font-size: 1.3rem; }
.section-header a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.game-item {
    background-color: var(--bg-card);
    height: 150px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
}

/* SEO Article Section */
.seo-article-container {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border-top: 3px solid var(--primary-gold);
    line-height: 1.7;
    margin-top: 50px;
}

.seo-article-container h1, .seo-article-container h2 {
    color: var(--primary-gold);
    margin-top: 30px;
}

.seo-article-container p {
    color: #cbd5e1;
}

.seo-article-container ol, .seo-article-container ul {
    color: #cbd5e1;
}

/* Review Summary Box */
.review-summary {
    background-color: rgba(207, 170, 94, 0.05);
    border: 1px solid rgba(207, 170, 94, 0.3);
    padding: 25px;
    border-radius: 10px;
    margin-top: 40px;
}

.review-summary h3 {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.summary-list {
    list-style: none;
    padding: 0;
}

.summary-list li {
    margin-bottom: 10px;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.pros, .cons {
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
}

.pros strong { color: #4ade80; }
.cons strong { color: #f87171; }

/* Responsive */
@media (max-width: 768px) {
    .pros-cons { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 1.8rem; }
    .seo-article-container { padding: 20px; }
}


/* =========================================
   ส่วนที่เพิ่มใหม่: ชุดคลาสสำหรับจัดการรูปภาพ (Image Set)
   ========================================= */

/* 1. คลาสสำหรับลบช่องว่างกล่องแม่ใน Hero Banner */
.hero-section.no-padding {
    padding: 0;
    background: transparent;
    border: none;
    overflow: hidden;
}

/* 2. คลาสสำหรับแทรกรูปใน Hero Banner ให้พอดีกรอบ */
.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    object-fit: cover;
}

/* 3. คลาสควบคุมรูปภาพย่อยในหมวดหมู่ (Category) และกล่องเกม (Games) */
.cat-card, .game-item {
    position: relative;
    overflow: hidden; /* ป้องกันภาพทะลุมุมโค้งของกล่องแม่ */
}

/* 4. คลาสสำหรับแท็ก <img> ที่แทรกในกล่องย่อยให้เต็มพื้นที่พอดีเป๊ะ */
.cat-card img, .game-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* ส่งรูปไปอยู่เลเยอร์หลังสุด */
}

/* 5. ดันตัวหนังสือให้อยู่บนสุดเสมอ ไม่โดนรูปทับ */
.cat-card h3, .game-item span {
    position: relative;
    z-index: 2; 
}