/*
Theme Name: TGV Arcade
Theme URI: https://example.com/
Author: David + ChatGPT
Author URI: https://example.com/
Description: Theme WordPress dạng cổng game giống TroChoiVui (~95%), tối ưu cho post type tgv_game.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tgv-arcade
*/

/* ========== RESET NHẸ ========== */
.tgv-wrapper *, 
.tgv-wrapper *::before, 
.tgv-wrapper *::after {
    box-sizing: border-box;
}

.tgv-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

/* ========== NỀN & KHUNG CHÍNH ========== */
body {
    background: #f2f2f2;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.tgv-wrapper {
    max-width: 980px;
    margin: 10px auto 30px;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 0 10px 15px;
}

/* ========== HEADER ========== */
.tgv-header {
    padding: 10px 0 5px;
    border-bottom: 1px solid #e0e0e0;
}

.tgv-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tgv-logo img {
    max-height: 60px;
}

.tgv-logo-title {
    font-size: 20px;
    font-weight: bold;
    color: #0066cc;
}

/* ========== MENU TRÊN CÙNG ========== */
.tgv-top-menu {
    margin-top: 8px;
    padding: 6px 8px;
    background: #0073e6;
    border-radius: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tgv-top-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 2px;
}

.tgv-top-menu a:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Menu WP gắn class */
.tgv-top-menu .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tgv-top-menu .menu li {
    margin: 0;
}

/* ========== THANH MÔ TẢ ========== */
.tgv-intro-bar {
    margin: 10px 0;
    padding: 6px 8px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    font-size: 13px;
}

/* ========== LAYOUT NỘI DUNG ========== */
.tgv-layout {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Sidebar trái */
.tgv-sidebar {
    width: 210px;
    flex-shrink: 0;
}

.tgv-sidebar-block {
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
    background: #fafafa;
}

.tgv-sidebar-block-title {
    padding: 6px 8px;
    background: #f0f0f0;
    border-bottom: 1px solid #e5e5e5;
    font-weight: bold;
    font-size: 13px;
}

.tgv-sidebar-block ul {
    list-style: none;
    margin: 0;
    padding: 6px 8px;
}

.tgv-sidebar-block li {
    margin-bottom: 4px;
}

.tgv-sidebar-block a {
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
}

.tgv-sidebar-block a:hover {
    text-decoration: underline;
}

/* Nội dung chính */
.tgv-main {
    flex: 1;
}

/* ========== TIÊU ĐỀ SECTION ========== */
.tgv-section-title {
    margin: 0 0 6px;
    padding: 4px 6px;
    background: #f0f7ff;
    border-left: 4px solid #1890ff;
    font-size: 14px;
    font-weight: bold;
}

/* ========== LƯỚI GAME ========== */
.tgv-game-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 10px;
    margin-bottom: 10px;
}

.tgv-game-card {
    width: calc(20% - 8px); /* 5 cột */
    text-align: center;
    font-size: 12px;
}

.tgv-game-thumb {
    border: 1px solid #e0e0e0;
    padding: 2px;
    background: #fafafa;
    margin-bottom: 4px;
    min-height: 120px;
}

.tgv-game-card a {
    color: #0066cc;
    text-decoration: none;
}

.tgv-game-card a:hover {
    text-decoration: underline;
}

/* Responsive: tablet 3 cột, mobile 2 cột */
@media (max-width: 960px) {
    .tgv-game-card {
        width: calc(33.333% - 8px);
    }
}

@media (max-width: 640px) {
    .tgv-layout {
        flex-direction: column;
    }
    .tgv-sidebar {
        width: 100%;
    }
    .tgv-game-card {
        width: calc(50% - 8px);
    }
}

/* ========== CHỦ ĐỀ HOT ========== */
.tgv-hot-topics {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #d9d9d9;
}

.tgv-hot-title {
    text-align: center;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
    text-transform: uppercase;
}

.tgv-hot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: center;
}

.tgv-hot-item {
    text-align: center;
    font-size: 13px;
}

.tgv-hot-item a {
    color: #0066cc;
    text-decoration: none;
}

.tgv-hot-item a:hover {
    text-decoration: underline;
}

/* ========== TRANG SINGLE GAME ========== */
.tgv-game-title {
    font-size: 18px;
    font-weight: bold;
    margin: 8px 0;
}

.tgv-game-iframe {
    margin: 10px 0;
    border: 1px solid #ddd;
    padding: 3px;
    background: #000;
}

.tgv-game-iframe iframe {
    display: block;
}

/* ========== FOOTER ========== */
.tgv-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    font-size: 12px;
    color: #777;
    text-align: center;
}

.tgv-footer a {
    color: #0066cc;
    text-decoration: none;
}

.tgv-footer a:hover {
    text-decoration: underline;
}

/* ========== PAGINATION ========== */
.tgv-pagination {
    margin: 12px 0;
    text-align: center;
}

.tgv-pagination .page-numbers {
    display: inline-block;
    margin: 0 3px;
    padding: 3px 7px;
    border: 1px solid #ddd;
    font-size: 13px;
    text-decoration: none;
    color: #333;
}

.tgv-pagination .current {
    background: #0073e6;
    color: #fff;
    border-color: #0073e6;
}
