:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2236;
    --bg-card-hover: #1f2a42;
    --gold: #f0b90b;
    --gold-light: #fcd535;
    --gold-dark: #c99a06;
    --red: #ef4444;
    --red-hover: #dc2626;
    --green: #22c55e;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --gradient-gold: linear-gradient(135deg, #f0b90b 0%, #fcd535 50%, #f0b90b 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e17 0%, #111827 100%);
    --gradient-card: linear-gradient(145deg, #1a2236 0%, #0f172a 100%);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-gold: 0 4px 24px rgba(240,185,11,0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Noto Sans Thai', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.logo:hover { color: var(--gold); }

.logo-icon {
    background: var(--gradient-gold);
    color: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.logo-text { font-size: 0.95rem; }

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.main-nav a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: block;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold);
    background: rgba(240, 185, 11, 0.08);
}

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 240px;
    padding: 8px 0;
    box-shadow: var(--shadow);
    flex-direction: column;
    z-index: 100;
}

/* เดสก์ท็อป: เปิดเมนูย่อยเฉพาะตอน .is-open — บังคับซ่อนเมื่อปิด (กันเมนูค้าง) */
@media (min-width: 769px) {
    .nav-dropdown .dropdown-menu {
        display: none !important;
    }
    .nav-dropdown.is-open .dropdown-menu {
        display: flex !important;
    }
}

.dropdown-menu li { width: 100%; }

.dropdown-menu a {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 0;
}

.dropdown-menu a:hover { background: rgba(240, 185, 11, 0.1); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--gradient-gold);
    color: #000;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    color: #000;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--gold);
    padding: 12px 32px;
    border: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--gold);
    color: #000;
}

.btn-red {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-red:hover { background: var(--red-hover); transform: translateY(-2px); }

/* Hero Section */
.hero {
    background: var(--gradient-dark);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(240,185,11,0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 16px;
    position: relative;
    line-height: 1.3;
}

.hero h1 .highlight { color: var(--gold); }

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* Banner Slider */
.banner-section { padding: 40px 0; }

.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.banner-item {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.banner-item:hover { transform: translateY(-4px); }

.banner-item img { width: 100%; height: 220px; object-fit: cover; }

.banner-fallback {
    grid-column: 1 / -1;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.banner-fallback code { color: var(--gold); font-size: 0.85rem; }

/* Section */
section { padding: 50px 0; }

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-title h2 .highlight { color: var(--gold); }

.section-title p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gold);
}

.card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.brand-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.brand-card:hover {
    border-color: var(--gold);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.brand-card .brand-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.35;
}

.brand-card .brand-name .brand-name-alt {
    font-weight: 700;
    font-size: 0.88em;
    color: var(--gold-light);
}

.brand-card .brand-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(240,185,11,0.1);
    padding: 2px 10px;
    border-radius: 20px;
}

/* Reviews */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.review-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.review-card .reviewer {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.review-card .stars {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.review-card .review-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Promotions (โปรรายวัน — แสดงเฉพาะหน้าแรก ต่อจากแบนเนอร์โปรโมชั่นสล็อตเว็บตรง) */
.daily-promo {
    padding: 16px 0 48px;
    margin-top: 0;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(240, 185, 11, 0.06) 0%, rgba(17, 24, 39, 0.35) 100%);
}

.promo-card {
    background: var(--gradient-card);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.promo-card.highlight {
    background: linear-gradient(135deg, rgba(240,185,11,0.08) 0%, rgba(15,23,42,1) 100%);
}

.promo-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--red);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.promo-date {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.promo-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }

.promo-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.promo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.promo-item {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
}

.promo-item .promo-day {
    font-size: 0.8rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.promo-item h3 { font-size: 1.1rem; margin-bottom: 8px; }

.promo-item p { color: var(--text-secondary); font-size: 0.9rem; }

/* Article Content — กว้างเท่า .container (1200px) ไม่ให้เหลือพื้นที่ว่างข้างขวาโดดเดี่ยว */
.article-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.article-content h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
    color: var(--gold);
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 30px 0 12px;
    color: var(--gold-light);
}

.article-content h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 24px 0 10px;
}

.article-content h5 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--gold);
}

.article-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text-secondary);
}

.article-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-content strong { color: var(--text-primary); }

.article-content ul, .article-content ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-content img {
    border-radius: var(--radius);
    margin: 24px 0;
    border: 1px solid var(--border);
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-banner {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

/* Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.info-table th, .info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.info-table th {
    background: var(--bg-card);
    color: var(--gold);
    font-weight: 700;
}

.info-table td { color: var(--text-secondary); }

.info-table tr:hover td { background: rgba(240,185,11,0.03); }

/* Forms */
.form-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 50px 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.form-group textarea { min-height: 120px; resize: vertical; }

/* FAQ */
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-q {
    padding: 16px 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-q:hover { background: var(--bg-card-hover); }

.faq-q::after { content: '+'; font-size: 1.3rem; color: var(--gold); }

.faq-item.open .faq-q::after { content: '−'; }

.faq-a {
    display: none;
    padding: 0 20px 16px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-a { display: block; }

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.feature-item {
    text-align: center;
    padding: 32px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.feature-item:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.feature-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--gold);
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.text-muted { color: var(--text-muted); }

.brand-name-alt {
    color: var(--gold-light);
    font-weight: 700;
    font-size: 0.92em;
}

/* Brand page: ทางเข้า / ทางเข้า มือถือ
   ไม่ใช้ auto-fill ของ .feature-grid — มันสร้างแทร็กเกิน การ์ด 2 ใบเลยชิดซ้าย เหลือที่ว่างขวา */
.brand-access-section {
    margin: 2rem 0;
}

.brand-access-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brand-access-grid .feature-item {
    min-width: 0;
    text-align: left;
    overflow-wrap: break-word;
}

.brand-access-grid .feature-item h3 {
    text-align: left;
}

.brand-access-tip {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.brand-access-table {
    margin-top: 1.25rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-list { list-style: none; }

.contact-info-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--text-secondary);
}

.contact-info-list .icon { font-size: 1.5rem; }

/* 404 */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 { font-size: 2rem; margin-bottom: 16px; }

.error-page p { color: var(--text-secondary); margin-bottom: 30px; }

.error-links { margin-top: 40px; text-align: left; max-width: 400px; margin-left: auto; margin-right: auto; }

.error-links ul { list-style: none; }

.error-links li { padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Internal Link Box */
.internal-links {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 30px 0;
}

.internal-links h3 {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 12px;
}

.internal-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}

.internal-links li a {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(240,185,11,0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.internal-links li a:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 50px 0 30px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3, .footer-col h4, .footer-col h5 {
    color: var(--gold);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul { list-style: none; }

.footer-col li {
    padding: 4px 0;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom p { margin-bottom: 4px; }

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        transition: right 0.3s ease;
        z-index: 999;
        padding: 80px 0 20px;
        overflow-y: auto;
    }

    .main-nav.open { right: 0; }

    .main-nav ul { flex-direction: column; gap: 0; }

    .main-nav a { padding: 14px 24px; border-bottom: 1px solid var(--border); border-radius: 0; }

    .nav-dropdown .dropdown-menu {
        position: static;
        display: none;
        border: none;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        min-width: 100%;
    }

    .nav-dropdown.is-open .dropdown-menu { display: flex; }

    .dropdown-menu a { padding-left: 40px; font-size: 0.85rem; }

    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }

    .article-content h1 { font-size: 1.6rem; }
    .article-content h2 { font-size: 1.3rem; }

    .footer-grid { grid-template-columns: 1fr; }

    .banner-grid { grid-template-columns: 1fr; }

    .section-title h2 { font-size: 1.5rem; }

    .brand-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

    .brand-access-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 1.5rem; }
    .btn-primary, .btn-secondary, .btn-red { padding: 10px 24px; font-size: 0.9rem; }
    .card { padding: 20px; }
    .article-content { padding: 20px 16px; }
}

/* Overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 998;
}

.nav-overlay.active { display: block; }

/* Breadcrumb */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { margin: 0 6px; }

/* Summary box */
.summary-box {
    background: linear-gradient(135deg, rgba(240,185,11,0.1) 0%, var(--bg-card) 100%);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 24px;
    margin: 24px 0;
}

.summary-box h3 { color: var(--gold); margin-bottom: 10px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
