/* Theme Name: 555RR Luxury Theme - Optimized
Author: akaishuchi & User
Description: Giao diện Casino sang trọng, tối ưu SEO tiêu đề, giữ vững bố cục 100%.
Version: 1.7
*/

/* 2. BIẾN HỆ THỐNG */
:root {
    --gold-gradient: linear-gradient(180deg, #fff3a0 0%, #d4af37 45%, #8a6d3b 100%);
    --emerald: #00ff88;
    --coin-size: 150px; 
}

/* 3. THIẾT LẬP CHUNG */
* { box-sizing: border-box; }

body { 
    background-color: #000; 
    color: #d1d5db; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    margin: 0; 
    overflow-x: hidden;
}

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

/* 4. LOGO 3D LUXURY PRO - CẬP NHẬT PHÁT SÁNG RỰC RỠ */
.luxury-logo-wrap { 
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    text-decoration: none !important;
}

/* Tối ưu hiển thị phông chữ để xóa lỗi 770ms */
@font-face {
    font-display: swap !important;
}

.fa, .fas, .far, .fab, [class^="fa-"], [class*=" fa-"] {
    font-display: swap !important;
}

.logo-main { 
    font-family: 'Cinzel', serif; 
    font-size: 4.2rem; 
    font-weight: 900; 
    background: var(--gold-gradient);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    line-height: 1; 
    position: relative;
    display: block;
    
    /* Hiệu ứng nhịp thở phát sáng rực rỡ */
    animation: luxury-breathing-glow 3s ease-in-out infinite;
    will-change: transform, filter;
}

@keyframes luxury-breathing-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
        transform: scale(1);
    }
    50% {
        filter: 
            drop-shadow(0 0 20px rgba(255, 215, 0, 0.9)) 
            drop-shadow(0 0 40px rgba(212, 175, 55, 0.6))
            drop-shadow(0 0 60px rgba(255, 255, 255, 0.3));
        transform: scale(1.04);
    }
}

.logo-sub { 
    font-size: 9px; 
    color: #d4af37;
    font-weight: 400; 
    text-transform: uppercase; 
    letter-spacing: 5px; 
    margin-top: 5px;
    opacity: 0.9;
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    animation: sub-breathing 3s ease-in-out infinite;
}

@keyframes sub-breathing {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; letter-spacing: 6px; }
}

/* 5. SLIDER */
.main-swiper-container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    overflow: hidden; 
}

.swiper-slide { display: flex; justify-content: center; align-items: center; }
.swiper-slide img { max-width: 100%; height: auto !important; object-fit: contain; display: block; border-radius: 10px; }

/* 6. NÚT BẤM LUXURY */
.btn-luxury {
    background: var(--gold-gradient);
    color: #000;
    font-weight: 800;
    font-size: 11px;
    padding: 10px 24px;
    text-transform: uppercase;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-luxury::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    transform: skewX(-30deg);
    animation: sweep-smooth 3s infinite linear;
}

@keyframes sweep-smooth { 0% { left: -150%; } 35% { left: 150%; } 100% { left: 150%; } }

/* 7. HIỆU ỨNG ĐỒNG XU 3D */
.coin-wrapper { perspective: 1000px; display: flex !important; justify-content: center; padding: 40px 0; }
#vip__chip { width: var(--coin-size); height: var(--coin-size); position: relative; transform-style: preserve-3d; animation: rotate-coin 5s linear infinite; }
@keyframes rotate-coin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
#vip__chip article { position: absolute; width: 100%; height: 100%; border-radius: 50%; background-size: cover; background-position: center; backface-visibility: visible !important; }
.front__chip { background-image: url('https://bangla555rr.com/wp-content/uploads/2025/12/mat-truoc-.png'); transform: translateZ(6px); z-index: 10; }
.back__chip { background-image: url('https://bangla555rr.com/wp-content/uploads/2025/12/mat-sau.png'); transform: rotateY(180deg) translateZ(6px); }

/* 8. DANH SÁCH BÀI VIẾT */
.custom-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.blog-item { display: flex; gap: 30px; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #222; align-items: flex-start; }
.blog-image { flex: 0 0 350px; }
.blog-image img { width: 100%; height: auto; border-radius: 12px; border: 1px solid #333; }
.blog-info { flex: 1; }
.blog-info h2 { margin: 0 0 15px 0; line-height: 1.3; position: relative; padding-left: 20px; border-left: 4px solid #d4af37; }
.blog-info h2 a { color: #fff; text-decoration: none; font-size: 26px; font-weight: 700; font-family: 'Cinzel', serif; background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; transition: all 0.4s ease; display: inline-block; text-transform: uppercase; }

/* 9. MOBILE */
@media (max-width: 768px) {
    .logo-main { font-size: 2.2rem !important; letter-spacing: 4px !important; }
    .logo-sub { font-size: 7px !important; letter-spacing: 3px !important; margin-top: 4px !important; }
    .vlog-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 10. PHÂN TRANG & NGÔN NGỮ (KHÔI PHỤC LÁ CỜ 100%) */
.pagination, .nav-links { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.pagination a, .pagination span, .nav-links a, .nav-links span {
    display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 15px; border-radius: 6px; background: #1a1a1a; color: #ffffff; text-decoration: none; border: 1px solid #333; transition: all 0.3s ease; font-weight: bold;
}
.pagination .current, .nav-links .current { background: linear-gradient(180deg, #ffdc1b 0%, #ff8c00 100%); color: #000 !important; border: none; box-shadow: 0 0 15px rgba(255, 220, 27, 0.4); }

/* KHÔI PHỤC PHẦN LÁ CỜ NÀY */
.header-lang-switcher .custom-lang-wrap { display: flex !important; gap: 3px !important; margin: 0 !important; padding: 0 !important; }
.header-lang-switcher .lang-node {
    padding: 0 5px !important; font-size: 8.5px !important; border-radius: 2px !important; display: flex !important; align-items: center !important; height: 16px !important; margin: 3px 0 !important;
}
.header-lang-switcher .lang-node.is-active { background: linear-gradient(180deg, #ffdc1b 0%, #ff8c00 100%) !important; color: #000 !important; }

/* 11. FIX CĂN GIỮ JACKPOT & NÚT BẤM CASINO */
.promo-gold-text { font-size: 40px; font-weight: bold; color: #ffd700; background: linear-gradient(to bottom, #cf9733 0%, #fcf6ba 20%, #bf953f 40%, #fbf5b7 60%, #aa771c 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0px 0px 10px rgba(255, 215, 0, 0.8)); text-transform: uppercase; display: block; text-align: center; width: 100%; margin: 20px auto; }
.jackpot-container, .promo-wrapper { display: flex; justify-content: center; align-items: center; width: 100%; }

.custom-555rr-btn {
    position: relative; display: inline-block; padding: 18px 45px !important; font-size: 22px !important; font-weight: 900 !important; font-style: italic; text-transform: uppercase; color: #000 !important; background: var(--gold-gradient) !important; border-radius: 50px !important; border: 2px solid #fff !important; box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; overflow: hidden; text-decoration: none !important;
}
.btn-shine { position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent); animation: shine-loop 3s infinite; }
@keyframes shine-loop { 0% { left: -100%; } 20% { left: 100%; } 100% { left: 100%; } }

/* --- CHỈ TÁC ĐỘNG VÙNG BÀI VIẾT (VLOG GRID) --- */

/* --- 1. ÉP LƯỚI 8 BÀI NGAY HÀNG (4 CỘT X 2 HÀNG) --- */
.vlog-grid { 
    display: grid !important; 
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 20px !important; 
    width: 100% !important;
    max-width: 1200px !important;
    margin: 40px auto !important;
}

/* --- 2. CỐ ĐỊNH KHUNG CHỨA (ĐỂ ẢNH CÓ CHỖ HIỂN THỊ) --- */
.vlog-thumb-static { 
    position: relative !important;
    width: 100% !important; 
    padding-top: 70% !important; /* Tạo độ cao cho khung ảnh */
    background: #222 !important; 
    overflow: hidden !important;
    display: block !important;
}

/* --- 3. ÉP ẢNH HIỆN LÊN (XỬ LÝ LỖI KHÔNG HIỆN) --- */
/* Tôi dùng lệnh gộp để dù bạn dùng class nào ảnh cũng phải hiện */
.vlog-thumb-static img, 
.vlog-card-static img { 
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    min-width: 100% !important; 
    min-height: 100% !important; 
    width: auto !important;
    height: auto !important;
    object-fit: cover !important; 
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: none !important; /* Quan trọng: Xóa bỏ lệnh làm nhỏ ảnh của theme */
}

/* --- 4. KHÓA CỨNG KÍCH THƯỚC LÁ CỜ (BẢO VỆ HEADER) --- */
/* Đoạn này giúp lá cờ không bị to theo ảnh bài viết */
.header-lang-switcher img, 
.custom-lang-wrap img, 
.lang-node img,
#header img {
    width: auto !important; 
    height: 16px !important; /* Khóa độ cao lá cờ đúng chuẩn */
    position: static !important;
    transform: none !important;
}

/* --- 5. ĐIỀU CHỈNH CHỮ CHO ĐẸP --- */
.vlog-info-static {
    padding: 15px !important;
    text-align: center !important;
    background: #0d0d0d !important;
}

/* Khung chứa ảnh: Cố định tỷ lệ để ảnh luôn to và lấp đầy */
.vlog-thumb-static { 
    position: relative; 
    width: 100%; 
    padding-top: 65%; /* Tỷ lệ vàng cho ảnh đại diện bài viết */
    background: #1a1a1a; 
    overflow: hidden; 
}

.vlog-thumb-static img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Quan trọng: Ảnh sẽ phủ kín khung mà không bị méo */
    object-position: center;
    transition: transform 0.5s ease;
}

.vlog-card-static:hover .vlog-thumb-static img {
    transform: scale(1.1); /* Hiệu ứng zoom nhẹ khi di chuột vào */
}

/* Căn chỉnh chữ dưới ảnh cho cân đối */
.vlog-info-static {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.single .entry-content img { 
    display: block !important; 
    margin: 20px auto !important; 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px;
}

/* Responsive cho điện thoại */
@media (max-width: 768px) { 
    .vlog-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
        padding: 0 10px;
    } 
    .vlog-info-static { padding: 10px; }
}

/* --- TỐI ƯU HIỂN THỊ 8 BÀI TRÊN ĐIỆN THOẠI --- */
@media (max-width: 768px) {
    /* 1. Ép về 2 cột để ảnh to và rõ trên mobile */
    .vlog-grid { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
        padding: 0 10px !important;
        margin: 20px auto !important;
    }

    /* 2. Điều chỉnh lại khung ảnh cho cân đối trên màn hình nhỏ */
    .vlog-thumb-static { 
        padding-top: 85% !important; /* Tăng độ cao khung ảnh trên mobile */
    }

    /* 3. Đảm bảo chữ tiêu đề không bị quá to chiếm chỗ của ảnh */
    .vlog-info-static {
        padding: 8px !important;
    }

    .vlog-info-static p {
        font-size: 12px !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 2 !important; /* Giới hạn đúng 2 dòng chữ */
    }
}

/* --- KHÓA CHẶT LỖI LÁ CỜ (BẢO VỆ HEADER) --- */
/* Dù bạn chỉnh cỡ ảnh bài viết thế nào, lá cờ vẫn sẽ không bị ảnh hưởng */
.header-lang-switcher img, 
.custom-lang-wrap img, 
.lang-node img,
.header-top img {
    width: 22px !important; /* Độ rộng chuẩn của icon lá cờ */
    height: 14px !important; /* Độ cao chuẩn */
    position: static !important;
    transform: none !important;
    object-fit: contain !important;
    display: inline-block !important;
    margin: 0 2px !important;
}

/* --- TỐI ƯU 2 CỘT CHO TRANG CHUYÊN MỤC TRÊN MOBILE --- */
@media (max-width: 768px) {
    /* 1. Tìm container chính của chuyên mục và biến nó thành Grid */
    .archive .site-main, 
    .category .site-main,
    .vlog-posts-section .vlog-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* Chia 2 cột đều */
        gap: 12px !important;
        padding: 10px !important;
    }

    /* 2. Ép bài viết hiển thị theo chiều dọc (Ảnh trên, chữ dưới) */
    .blog-item, 
    .post-item,
    article { 
        display: flex !important;
        flex-direction: column !important; /* Xếp chồng dọc để hết khoảng trống */
        height: 100% !important;
        background: #0d0d0d !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        margin-bottom: 0 !important; /* Để Grid xử lý gap */
    }

    /* 3. Xử lý hình ảnh cho to và lấp đầy chiều ngang */
    .blog-image, 
    .post-thumbnail {
        width: 100% !important;
        margin: 0 0 8px 0 !important;
    }

    .blog-image img, 
    .post-thumbnail img {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1 !important; /* Ép ảnh thành hình vuông cho đều */
        object-fit: cover !important;
        display: block !important;
    }

    /* 4. Xử lý tiêu đề và đoạn trích */
    .blog-info, 
    .entry-content {
        width: 100% !important;
        padding: 8px !important;
        text-align: left !important;
    }

    .blog-info h2, 
    .entry-title {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin: 0 0 5px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important; /* Chỉ hiện 2 dòng tiêu đề */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* 5. Ẩn bớt đoạn mô tả dài để tránh lệch hàng */
    .blog-info p, 
    .entry-summary {
        display: none !important; 
    }
}

/* Tối ưu hóa tổng thể Footer Container */
.footer-pro-final-layout {
    background: linear-gradient(180deg, #121215 0%, #08080a 100%); /* Nền gradient sâu */
    padding: 50px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.res-section-bright {
    max-width: 1100px;
    margin: 0 auto;
}

/* Tiêu đề Footer - Tối ưu Keyword SEO */
.res-title-glow {
    color: #e0e0e0;
    font-size: 1.4rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Thêm biểu tượng động bên cạnh tiêu đề */
.res-title-glow::before, .res-title-glow::after {
    content: "";
    height: 1px;
    width: 50px;
    background: linear-gradient(90deg, transparent, #ffcc00);
}
.res-title-glow::after { background: linear-gradient(270deg, transparent, #ffcc00); }

/* Container chứa các từ khóa Trending */
.trending-tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Style cho từng Game Tag */
.t-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px; /* Bo góc nhẹ tạo cảm giác hiện đại */
    color: #b0b0b0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng màu sắc icon đặc trưng */
.t-tag i {
    transition: transform 0.3s ease;
}
.t-tag:hover i {
    transform: scale(1.2) rotate(-10deg);
}

/* Màu riêng cho từng loại để người dùng dễ nhận diện (User Experience) */
.t-tag:hover {
    color: #fff;
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(255, 204, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

/* Hiệu ứng viền sáng chạy quanh khi Hover */
.t-tag::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ffcc00;
    transition: all 0.3s ease;
}

.t-tag:hover::after {
    width: 100%;
    left: 0;
}

/* Responsive cho Mobile */
@media (max-width: 600px) {
    .trending-tags-container {
        gap: 8px;
    }
    .t-tag {
        padding: 8px 14px;
        font-size: 11px;
        width: calc(50% - 10px); /* Chia 2 cột trên điện thoại */
        justify-content: center;
    }
}