/*
Theme Name: 8x-bet-vn
Theme URI: https://8x-bet-vn.com
Author: 8XBET
Author URI: https://8x-bet-vn.com
Description: Professional betting WordPress theme - Clean E-E-A-T Design
Version: 1.0.0
Text Domain: 8x-bet-vn
*/

/* ========== Variables ========== */
:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2540;
    --accent: #f5a623;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #f8f9fa;
    --white: #fff;
    --border: #e5e8eb;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

/* ========== Reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Be Vietnam Pro', sans-serif; font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.4; color: var(--primary); }

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

/* ========== Header ========== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo-img { height: 38px; }
.nav-menu { display: flex; gap: 5px; }
.nav-menu li a {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    background: rgba(26,58,92,0.08);
    color: var(--primary);
}
.header-buttons { display: flex; gap: 10px; }
.btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #e69516; }
.mobile-menu-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; background: none; border: none; cursor: pointer; }
.mobile-menu-toggle span { width: 22px; height: 2px; background: var(--text); }

/* ========== Hero Banner ========== */
.hero-banner {
    margin-top: 60px;
}
.hero-banner img {
    width: 100%;
    display: block;
}

/* ========== Games Section ========== */
.games-section {
    padding: 40px 0;
    background: var(--white);
}
.section-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.game-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}
.game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.game-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* ========== About Section ========== */
.about-section {
    padding: 50px 0;
    background: var(--bg);
}
.about-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.about-box h1 {
    font-size: 26px;
    margin-bottom: 20px;
    line-height: 1.4;
}
.about-box h2 {
    font-size: 20px;
    margin: 30px 0 15px;
}
.about-box p {
    margin-bottom: 15px;
    color: var(--text-light);
}
.about-box strong {
    color: var(--text);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
    padding: 25px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stat-box { text-align: center; }
.stat-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.stat-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* Feature List */
.feature-list {
    margin: 15px 0;
    padding-left: 0;
}
.feature-list li {
    position: relative;
    padding: 8px 0 8px 25px;
    color: var(--text-light);
}
.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}
.feature-list li strong {
    color: var(--text);
}

/* ========== News Section ========== */
.news-section {
    padding: 50px 0;
    background: var(--white);
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.news-card:hover {
    transform: translateY(-5px);
}
.news-thumb {
    display: block;
    overflow: hidden;
}
.news-thumb img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-card:hover .news-thumb img {
    transform: scale(1.05);
}
.news-content {
    padding: 20px;
}
.news-date {
    font-size: 12px;
    color: var(--text-muted);
}
.news-content h3 {
    font-size: 16px;
    margin: 8px 0;
    line-height: 1.4;
}
.news-content h3 a:hover {
    color: var(--accent);
}
.news-content p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ========== Partners Bar ========== */
.partners-bar {
    padding: 25px 0;
    background: var(--white);
    border-top: 1px solid var(--border);
}
.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 35px;
}
.partners-logos img {
    height: 28px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.partners-logos img:hover {
    opacity: 1;
}

/* ========== Footer ========== */
.site-footer {
    background: #1a2332;
    color: rgba(255,255,255,0.8);
}
.footer-main { padding: 50px 0 30px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 50px;
}
.footer-logo-img { height: 40px; margin-bottom: 15px; }
.footer-brand p { font-size: 14px; line-height: 1.7; opacity: 0.75; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-link {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.2s;
}
.social-link:hover { background: var(--accent); transform: translateY(-2px); }
.footer-widget h4 { font-size: 16px; color: var(--white); margin-bottom: 20px; font-weight: 600; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14px; opacity: 0.75; transition: all 0.2s; }
.footer-links a:hover { opacity: 1; color: var(--accent); padding-left: 5px; }
.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}
.copyright { font-size: 13px; opacity: 0.6; }
.copyright strong { color: var(--accent); }
.footer-payments { display: flex; align-items: center; gap: 15px; }
.footer-payments img { height: 18px; opacity: 0.6; }
.age-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #e53935;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
}
.age-warning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #e53935;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

/* ========== Single Post ========== */
.single-post-section { padding: 30px 0 50px; margin-top: 60px; }
.single-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}
.post-main {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.post-main img.featured { width: 100%; }
.post-body { padding: 30px; }
.post-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 15px; }
.post-title { font-size: 26px; margin-bottom: 20px; }
.entry-content p { margin-bottom: 15px; }
.entry-content h2 { font-size: 20px; margin: 25px 0 15px; }
.entry-content ul, .entry-content ol { margin: 15px 0; padding-left: 25px; }
.entry-content li { margin-bottom: 8px; list-style: disc; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.widget-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* ========== Page Header ========== */
.page-header {
    background: var(--primary);
    padding: 35px 0;
    margin-top: 60px;
    color: var(--white);
}
.page-title { font-size: 26px; color: var(--white); margin-bottom: 8px; }
.page-desc { font-size: 14px; opacity: 0.85; }
.breadcrumb { font-size: 13px; margin-bottom: 10px; opacity: 0.8; }
.breadcrumb a:hover { color: var(--accent); }

/* ========== Pagination ========== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s;
}
.pagination a:hover, .pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========== Mobile Navigation ========== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}
.mobile-nav-overlay.active { display: block; }
.mobile-nav {
    position: fixed;
    top: 0;
    right: -280px;  /* 从右边滑出 */
    width: 280px;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    transition: right 0.3s;
    overflow-y: auto;
}
.mobile-nav.active { right: 0; }
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    border: none; border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}
.mobile-nav-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
}
.mobile-nav-buttons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mobile-nav-buttons .btn { width: 100%; text-align: center; }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .nav-menu { display: none; }
    .mobile-menu-toggle { display: flex; }
    
    /* 手机端header重新布局 */
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        height: auto;
        padding: 10px 0;
        position: relative;
    }
    
    /* Logo居中 */
    .site-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* 汉堡菜单在右边 */
    .mobile-menu-toggle {
        flex-shrink: 0;
    }
    
    /* 桌面端按钮在手机端完全隐藏 */
    .header-buttons {
        display: none !important;
    }
    
    /* 主导航隐藏 */
    .main-nav {
        display: none;
    }
    
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .single-container { grid-template-columns: 1fr; }
}

/* 手机端顶部按钮样式 - 默认完全隐藏 */
.mobile-header-buttons {
    display: none !important;
}

@media (max-width: 1024px) {
    .mobile-header-buttons {
        display: flex !important;
        justify-content: center;
        gap: 10px;
        padding: 10px 0;
        background: var(--white);
        border-top: 1px solid var(--border);
        width: 100%;
    }
    .mobile-header-buttons .btn {
        padding: 8px 25px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .stat-num { font-size: 26px; }
    .about-box { padding: 25px; }
    .about-box h1 { font-size: 22px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .stats-row { gap: 15px; }
    .partners-logos { gap: 20px; }
    .partners-logos img { height: 22px; }
}

/* ========== Additional Page Styles ========== */

/* Page Content Box */
.page-content { padding: 40px 0 60px; }
.content-box {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.content-box h2 { font-size: 22px; margin: 30px 0 15px; }
.content-box h2:first-child { margin-top: 0; }
.content-box p { margin-bottom: 15px; color: var(--text-light); }
.content-box ul, .content-box ol { margin: 15px 0; padding-left: 25px; }
.content-box li { margin-bottom: 10px; color: var(--text-light); }

/* Archive Section */
.archive-section { padding: 40px 0 60px; }

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius);
}
.no-posts h2 { margin-bottom: 15px; }
.no-posts p { color: var(--text-light); margin-bottom: 20px; }

/* Error Section */
.error-section { padding: 60px 0; }
.error-box {
    text-align: center;
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.error-code {
    font-size: 120px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
}
.error-box h2 { font-size: 28px; margin-bottom: 15px; }
.error-box p { color: var(--text-light); margin-bottom: 30px; }
.error-actions { display: flex; gap: 15px; justify-content: center; margin-bottom: 40px; }
.error-search { margin-bottom: 40px; }
.error-search p { margin-bottom: 15px; }
.error-links h3 { font-size: 18px; margin-bottom: 15px; }
.error-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.error-links li a { color: var(--primary); }
.error-links li a:hover { color: var(--accent); }

/* Search Form Large */
.search-form-large {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.search-form-large .search-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 15px;
    outline: none;
}
.search-form-large .btn { border-radius: 0; }

/* Game Page */
.game-page-section { padding: 40px 0 60px; }
.game-banner {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
}
.game-banner img { width: 100%; }

/* Intro Section - 介绍部分 */
.intro-section {
    padding: 40px 0 30px;
    background: var(--white);
}
.intro-banner {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    max-height: 300px;
}
.intro-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.intro-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.intro-content h2 {
    font-size: 20px;
    margin: 25px 0 12px;
    color: var(--primary);
}
.intro-content h2:first-child {
    margin-top: 0;
}
.intro-content h3 {
    font-size: 18px;
    margin: 20px 0 10px;
}
.intro-content p {
    margin-bottom: 12px;
    color: var(--text-light);
    line-height: 1.8;
}
.intro-content ul, .intro-content ol {
    margin: 15px 0;
    padding-left: 25px;
}
.intro-content li {
    margin-bottom: 8px;
    color: var(--text-light);
}
.intro-content ul li { list-style: disc; }
.intro-content ol li { list-style: decimal; }
.intro-content strong { color: var(--text); }

/* Posts List Section - 文章列表部分 */
.posts-list-section {
    padding: 40px 0 60px;
    background: var(--bg);
}
.posts-list-section .section-title {
    margin-bottom: 30px;
}
.no-posts-note {
    text-align: center;
    color: var(--text-muted);
    margin-top: 20px;
    font-style: italic;
}

.step-list { counter-reset: step; padding-left: 0; }
.step-list li {
    counter-increment: step;
    padding: 15px 15px 15px 50px;
    position: relative;
    background: var(--bg);
    margin-bottom: 10px;
    border-radius: var(--radius);
}
.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 40px;
}
.cta-box h3 { color: var(--white); font-size: 24px; margin-bottom: 10px; }
.cta-box p { opacity: 0.9; margin-bottom: 20px; }
.btn-lg { padding: 14px 35px; font-size: 16px; }

/* Contact Page */
.contact-section { padding: 40px 0 60px; }
.contact-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}
.contact-info-box {
    background: var(--primary);
    color: var(--white);
    padding: 35px;
    border-radius: var(--radius);
}
.contact-info-box h2 { color: var(--white); font-size: 22px; margin-bottom: 15px; }
.contact-info-box > p { opacity: 0.85; margin-bottom: 30px; }
.contact-methods { display: flex; flex-direction: column; gap: 20px; }
.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.contact-method .contact-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: var(--accent);
}
.contact-method strong { display: block; font-size: 13px; opacity: 0.7; margin-bottom: 3px; }
.contact-method p { margin: 0; font-size: 15px; }
.working-hours {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.working-hours h3 { color: var(--white); font-size: 16px; margin-bottom: 8px; }
.working-hours p { margin: 0; }

/* Contact Form */
.contact-form { margin-top: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Widget Styles */
.widget-list { padding: 0; }
.widget-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.widget-list li:last-child { border-bottom: none; }
.widget-list a { color: var(--text-light); transition: color 0.2s; }
.widget-list a:hover { color: var(--primary); }

.popular-posts { padding: 0; }
.popular-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.popular-post-item:last-child { border-bottom: none; }
.popular-post-thumb {
    width: 70px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}
.popular-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    display: block;
    margin-bottom: 3px;
}
.popular-post-title:hover { color: var(--primary); }
.popular-post-date { font-size: 12px; color: var(--text-muted); }

/* Post Tags */
.post-tags {
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--border);
}
.post-tags a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 13px;
    margin: 5px 5px 5px 0;
    transition: all 0.2s;
}
.post-tags a:hover { background: var(--primary); color: var(--white); }

/* Search Widget */
.search-form {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.search-form .search-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    font-size: 14px;
    outline: none;
}
.search-form .search-btn {
    padding: 10px 12px;
    background: var(--primary);
    border: none;
    color: var(--white);
    cursor: pointer;
}

/* Responsive Additional */
@media (max-width: 1024px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-info-box { order: 2; }
}

@media (max-width: 768px) {
    .content-box { padding: 25px; }
    .error-code { font-size: 80px; }
    .error-box { padding: 40px 20px; }
    .error-actions { flex-direction: column; }
    .cta-box { padding: 30px 20px; }
}
