/**
 * THEME HARMONIZED - GIAO DIỆN HÀI HÒA VỚI BACKGROUND ANIME/GAME (RIMURU ELECTRIC BLUE)
 */

:root {
    --bg-dark-cosmic: #070d1e;
    --glass-bg-card: rgba(9, 18, 38, 0.82);
    --glass-bg-card-hover: rgba(14, 28, 58, 0.9);
    --glass-border: rgba(0, 210, 255, 0.35);
    --glass-border-glow: rgba(0, 229, 255, 0.7);
    --cyan-glow: #00e5ff;
    --cyan-dim: #38bdf8;
    --blue-accent: #0284c7;
    --gold-glow: #fbbf24;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
}

/* ========================================================
   1. TOÀN CỤC & BODY
   ======================================================== */
body {
    background-color: var(--bg-dark-cosmic) !important;
    color: var(--text-main) !important;
}

/* ========================================================
   2. KHU VỰC CONTENT TRANG CHỦ (.box--content)
   ======================================================== */
.box--content {
    position: relative !important;
    border-top: 2px solid var(--glass-border) !important;
    background: linear-gradient(180deg, 
        rgba(7, 13, 29, 0.7) 0%, 
        rgba(9, 20, 44, 0.82) 40%, 
        rgba(6, 12, 28, 0.92) 100%) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 -10px 35px rgba(0, 200, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    margin-top: 20px !important;
    padding-top: 40px !important;
    padding-bottom: 30px !important;
}

/* Hiệu ứng tỏa sáng tiêu đề Tin Tức - Sự Kiện */
.box__new .tit-frame img {
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.55)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) !important;
    transition: transform 0.3s ease, filter 0.3s ease !important;
}

.box__new .tit-frame img:hover {
    transform: scale(1.03) !important;
    filter: drop-shadow(0 0 30px rgba(0, 230, 255, 0.8)) !important;
}

/* ========================================================
   3. KHUNG SLIDE & KHUNG BÀI VIẾT (.box-border)
   ======================================================== */
.box-border {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 
                inset 0 0 20px rgba(0, 180, 255, 0.1),
                0 0 25px rgba(0, 160, 255, 0.18) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    overflow: hidden !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.box-border:hover {
    border-color: var(--glass-border-glow) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.75), 
                inset 0 0 25px rgba(0, 210, 255, 0.15),
                0 0 35px rgba(0, 210, 255, 0.3) !important;
}

/* Ẩn các khối góc nhọn đen cũ */
.box-border .icon-rau,
.box-border .rau-left-top,
.box-border .rau-left-bottom,
.box-border .rau-right-top,
.box-border .rau-right-bottom {
    display: none !important;
}

/* Ẩn khung viền đen cũ của slide */
.list-slide:before {
    display: none !important;
}

.list-slide {
    border-radius: 16px !important;
    padding: 10px !important;
}

.list-slide .listSlide__new .slick-slide img {
    border-radius: 12px !important;
    border: 1px solid rgba(0, 210, 255, 0.25) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
}

/* Chấm slide (Slick Dots) */
.list-slide .slick-dots li {
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.list-slide .slick-dots li.slick-active {
    background: var(--cyan-glow) !important;
    box-shadow: 0 0 12px var(--cyan-glow) !important;
    transform: scale(1.2) !important;
}

/* ========================================================
   4. TABS TIN TỨC / SỰ KIỆN / HƯỚNG DẪN
   ======================================================== */
.box-list-new {
    padding: 20px 30px !important;
    border-radius: 16px !important;
}

.box-list-new .tab-new {
    border-bottom: 1px solid rgba(0, 210, 255, 0.25) !important;
    padding-bottom: 14px !important;
    margin-bottom: 10px !important;
}

.box-list-new .tab-new .tab-link {
    color: rgba(200, 230, 255, 0.65) !important;
    font-family: 'Bangers', cursive !important;
    font-size: 22px !important;
    letter-spacing: 1.5px !important;
    position: relative !important;
    padding-bottom: 8px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.box-list-new .tab-new .tab-link:hover {
    color: #fff !important;
    text-shadow: 0 0 12px var(--cyan-glow) !important;
}

.box-list-new .tab-new .tab-link.current {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.85) !important;
}

.box-list-new .tab-new .tab-link.current::after {
    content: '' !important;
    position: absolute !important;
    bottom: -15px !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: linear-gradient(90deg, var(--cyan-glow), #0284c7) !important;
    border-radius: 3px !important;
    box-shadow: 0 0 12px var(--cyan-glow) !important;
}

/* ========================================================
   5. DANH SÁCH BÀI VIẾT (.item-new-box)
   ======================================================== */
.box-list-new .tab-content .tab-detail .item-new-box {
    color: #fff !important;
    border-bottom: 1px solid rgba(0, 210, 255, 0.12) !important;
    padding: 10px 12px !important;
    margin-bottom: 6px !important;
    border-radius: 8px !important;
    transition: all 0.25s ease !important;
}

.box-list-new .tab-content .tab-detail .item-new-box:hover {
    background: rgba(0, 210, 255, 0.12) !important;
    transform: translateX(6px) !important;
    box-shadow: inset 3px 0 0 var(--cyan-glow), 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.item-new-image {
    border: 1px solid rgba(0, 210, 255, 0.3) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

.item-new-info .cat-des {
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
    transition: color 0.2s ease !important;
}

.item-new-box:hover .item-new-info .cat-des {
    color: var(--cyan-glow) !important;
}

.item-new-info .date-open {
    color: var(--cyan-dim) !important;
    font-size: 13px !important;
    opacity: 0.9 !important;
}

/* Nút Xem Thêm */
.box-list-new .view-more .link-more {
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.6)) !important;
    transition: transform 0.3s ease, filter 0.3s ease !important;
}

.box-list-new .view-more .link-more:hover {
    transform: scale(1.15) !important;
    filter: drop-shadow(0 0 15px var(--cyan-glow)) !important;
}

/* ========================================================
   6. HỘP NÚT LINK NHANH (.box-link)
   ======================================================== */
.box-link {
    margin-top: 30px !important;
    padding-bottom: 20px !important;
}

.item-box-link img {
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.6)) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.item-box-link:hover img {
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.75)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8)) !important;
    transform: translateY(-5px) scale(1.02) !important;
}

/* ========================================================
   7. PHẦN TÍNH NĂNG GAME (.box_game.ftg__sl)
   ======================================================== */
.box_game .tit-frame img {
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.6)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8)) !important;
}

.bg__sl_ft {
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 25px rgba(0, 180, 255, 0.25)) !important;
}

/* ========================================================
   8. BẢNG XẾP HẠNG (bangxephang.php)
   ======================================================== */
.rankings-container {
    max-width: 1200px !important;
    margin: 40px auto 60px !important;
}

.rankings-container .main-title {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.8), 2px 2px 4px rgba(0,0,0,0.8) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 180, 255, 0.2) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.rankings-container .tabs-container {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 160, 255, 0.2) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

.rankings-container .tab-navigation {
    background: rgba(6, 14, 30, 0.9) !important;
    border-bottom: 1px solid rgba(0, 210, 255, 0.25) !important;
}

.rankings-container .tab-btn {
    background: linear-gradient(135deg, rgba(14, 28, 58, 0.9), rgba(6, 14, 30, 0.9)) !important;
    border: 1px solid rgba(0, 210, 255, 0.4) !important;
    color: #c8e4ff !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.5) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

.rankings-container .tab-btn:hover {
    border-color: var(--cyan-glow) !important;
    color: #fff !important;
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.6) !important;
}

.rankings-container .tab-btn.active {
    background: linear-gradient(135deg, #0284c7, #00e5ff) !important;
    border-color: #ffffff !important;
    color: #040e21 !important;
    font-weight: bold !important;
    text-shadow: none !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8) !important;
}

.ranking-table th {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.9), rgba(0, 229, 255, 0.9)) !important;
    color: #040d1e !important;
    border: 1px solid rgba(0, 210, 255, 0.4) !important;
    text-shadow: none !important;
    font-weight: bold !important;
}

.ranking-table td {
    background: rgba(10, 22, 45, 0.65) !important;
    border: 1px solid rgba(0, 210, 255, 0.15) !important;
    color: #e2e8f0 !important;
}

.ranking-table tbody tr:hover td {
    background: rgba(0, 210, 255, 0.15) !important;
}

.ranking-table tbody tr:first-child td {
    background: rgba(251, 191, 36, 0.15) !important;
    color: #fef08a !important;
}

/* ========================================================
   9. TRANG CHI TIẾT BÀI VIẾT (post.php) & DANH MỤC (category.php)
   ======================================================== */
.post-detail,
.category-header,
.post-item,
.related-post-item {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 180, 255, 0.15) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    color: var(--text-main) !important;
    padding: 25px !important;
}

.post-detail h1.post-title,
.category-header h1 {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.7) !important;
}

.post-content {
    color: #e2e8f0 !important;
}

.post-content h2, 
.post-content h3, 
.post-content h4 {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5) !important;
}

.breadcrumb a {
    color: var(--cyan-dim) !important;
}

.breadcrumb span {
    color: #ffffff !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.5) !important;
}

.post-item .post-title a,
.related-post-title a {
    color: #ffffff !important;
}

.post-item:hover .post-title a,
.related-post-title a:hover {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 10px var(--cyan-glow) !important;
}

/* ========================================================
   10. TRANG GIFTCODE (giftcode.php)
   ======================================================== */
.giftcode-item {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

.giftcode-header {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(14, 28, 58, 0.85)) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: #ffffff !important;
}

.giftcode-name {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.6) !important;
}

/* ========================================================
   11. TRANG HỒ SƠ CÁ NHÂN (profile.php) & ĐĂNG NHẬP (login.php)
   ======================================================== */
.profile-container > div:first-child {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 180, 255, 0.2) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

.profile-container > div:first-child h1 {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.8), 2px 2px 4px rgba(0,0,0,0.8) !important;
}

.account-info-section {
    background: linear-gradient(135deg, rgba(14, 28, 58, 0.85), rgba(7, 14, 32, 0.9)) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 180, 255, 0.1) !important;
    backdrop-filter: blur(14px) !important;
}

.account-info-section > div:last-child > div:first-child {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.6) !important;
}

.account-info-section > div:last-child > div:nth-child(2),
.account-info-section > div:last-child > div:nth-child(3) {
    color: #cbd5e1 !important;
}

.account-info-section + div {
    background: linear-gradient(135deg, rgba(10, 24, 52, 0.85), rgba(6, 12, 28, 0.9)) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 180, 255, 0.1) !important;
    backdrop-filter: blur(14px) !important;
}

.account-info-section + div h2 {
    color: var(--cyan-glow) !important;
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.7) !important;
}

.account-info-section + div span {
    color: #e2e8f0 !important;
}

.profile-container .button-grid-2x2 button,
.profile-container .button-grid-1x3 button {
    background: linear-gradient(135deg, rgba(14, 28, 58, 0.9), rgba(6, 14, 30, 0.9)) !important;
    border: 1px solid rgba(0, 210, 255, 0.4) !important;
    color: #c8e4ff !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
    transition: all 0.3s ease !important;
}

.profile-container .button-grid-2x2 button:hover,
.profile-container .button-grid-1x3 button:hover {
    border-color: var(--cyan-glow) !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.7) !important;
    transform: translateY(-2px) !important;
}

#passwordForm {
    background: var(--glass-bg-card) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
}

#passwordForm label {
    color: #e2e8f0 !important;
}

#passwordForm input {
    background: rgba(6, 14, 30, 0.8) !important;
    border: 1px solid var(--glass-border) !important;
    color: #ffffff !important;
}

/* Đăng nhập & Đăng ký */
.post-detail .post-form .post-label {
    color: #e2e8f0 !important;
}

.post-detail .post-form .post-input {
    background: rgba(6, 14, 30, 0.8) !important;
    border: 1px solid var(--glass-border) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.post-detail .post-form .btn-primary {
    background: linear-gradient(135deg, #0284c7, #00e5ff) !important;
    border: none !important;
    color: #040e21 !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    padding: 12px !important;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.post-detail .post-form .btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.9) !important;
    transform: translateY(-2px) !important;
}

/* ========================================================
   LOGO NAVBAR FIX
   ======================================================== */
/* Đảm bảo .limit__game truyền chiều cao đúng */
.__section.main_head .limit__game {
    height: 100%;
    display: flex;
    align-items: right;
     justify-content: space-between;
}

/* Link bao logo */
.__section.main_head .limit__game > a.hidden__mobile {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 4px 12px;
    flex-shrink: 0;
    margin-left: -170px;
    margin-top: -20px;
}

/* Ảnh logo cân đối */
.__section.main_head .limit__game > a.hidden__mobile .logo-top {
    height: 110px;
    max-width: 430px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: filter 0.3s ease;          /* ← thêm dòng này vào cuối */
}

/* Hiệu ứng phát sáng xanh khi hover logo PC — thêm khối mới này */
.__section.main_head .limit__game > a.hidden__mobile:hover .logo-top {
    filter: drop-shadow(0 0 12px #00e5ff) drop-shadow(0 0 24px rgba(0, 229, 255, 0.7));
}
/* Logo mobile (thay icon + chữ) */
.logo-mobile {
    height: 52px;
    width: 165px;
    max-width: 165px;
    object-fit: contain;
    display: block;
}
/* Chữ chạy ngang 7 màu cạnh logo mobile */
.icon-name-game {
    gap: 10px;
}

.marquee-rainbow-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 40px;
    display: flex;
    align-items: center;
    position: relative;
    margin-right: -60%; 
}

.marquee-rainbow-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    font-weight: bold;
    font-size: 30px;

   
    letter-spacing: 1px;
    background: linear-gradient(90deg,
        #ff0000, #ff9900, #ffee00, #33ff00,
        #00ffee, #0066ff, #cc00ff, #ff0000);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation:
        marquee-scroll 8s linear infinite,
        rainbow-shift 3s linear infinite;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes rainbow-shift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}