/* Base styles */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #1c1e2c;
    color: #fff;
}

.main-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Header Styles */
.header {
    background: #23263a;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1 0px;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: left;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: left;
}

.logo img {
    height: 48px;
    width: auto;
    border-radius: 8px;
}

/* Navigation Menu */
.nav-menu {
    margin-left: auto;
}

.nav-menu ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu li a {
    display: flex;
    align-items: l;
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-menu li.active a {
    background: #55bbab;
    color: #fff;
}

.nav-menu li a:hover {
    background: #292e4a;
    color: #55bbab;
}

.nav-menu li a i {
    margin-right: 8px;
    font-size: 1rem;
}

/* Keyword Links */
.keyword-links {
    padding: 20px 0;
    background: #1c1e2c;
}

.keyword-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.keyword-links a {
    display: inline-block;
    padding: 8px 15px;
    background: #23263a;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #292e4a;
}

.keyword-links a:hover {
    background: #292e4a;
    color: #55bbab;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(85,187,171,0.1);
}

@media (max-width: 768px) {
    .header {
        padding: 10px 0;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
    }

    .header-content {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .nav-menu {
        width: 100%;
        margin: 0;
    }

    .nav-menu ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 5px;
        justify-content: flex-start;
    }

    .nav-menu li a {
        white-space: nowrap;
        padding: 8px 12px;
    }

    .main-content {
        padding-top: 80px;
    }

    .game-frame-container {
        height: 400px;
    }
    
    .game-thumbnail {
        height: 400px;
        gap: 20px;
    }
    
    .game-thumbnail img {
        width: 150px;
        height: 150px;
    }
    
    .play-frame-button {
        padding: 15px 30px;
        font-size: 20px;
    }
    
    .play-frame-button i {
        font-size: 24px;
    }
    
    .games-grid {
        padding-left: 0;
        padding-right: 15px;
    }
    
    /* Overlay for mobile menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .menu-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 8px 0;
    }

    .logo img {
        height: 32px;
    }

    .nav-menu li a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    .game-frame-container {
        height: 300px;
    }
    
    .game-thumbnail {
        height: 300px;
        gap: 15px;
    }
    
    .game-thumbnail img {
        width: 120px;
        height: 120px;
    }
    
    .play-frame-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .play-frame-button i {
        font-size: 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .game-item img {
        width: 70px;
        height: 70px;
    }
    
    .game-item span {
        font-size: 0.8rem;
        max-width: 70px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    background: #55bbab;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.menu-toggle:active {
    background: #476cbc;
}

.main-content {
    flex: 1;
    padding: 20px;
    margin-left: 0;
    width: 100%;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overscroll-behavior: contain;
}

.header h1 {
    margin: 0;
    color: #55bbab;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.games-grid {
    padding-left: 30px;
    padding-right: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 18px 14px;
}

.game-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #fff;
    background: #23263a;
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
}

.game-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.game-item:hover:before {
    opacity: 1;
}

.game-item:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.game-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.game-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.game-item .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #55bbab;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(85,187,171,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.game-item .play-button:hover {
    background: #476cbc;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(85,187,171,0.4);
}

.game-item .play-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.game-item span {
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
    color: #fff;
    font-weight: 500;
}

@media (max-width: 768px) {
    .game-item .play-button {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        padding: 8px 20px;
        font-size: 14px;
    }
    
    .game-item:before {
        opacity: 1;
        background: rgba(0,0,0,0.3);
    }
    
    .game-frame-title {
        font-size: 20px;
        padding: 12px;
    }
}

/* Detail Page Styles */
.detail-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    margin-top: 30px;
    padding-left: 30px;
    padding-right: 20px;
}

.detail-main {
    background: #23263a;
    border-radius: 14px;
    box-shadow: 0 3px 16px 0 rgba(30,32,56,0.07);
    padding: 30px 28px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
}

.detail-image img {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 18px;
    border: 2px solid #1c1e2c;
}

.detail-info h2 {
    color: #55bbab;
    font-size: 1.7rem;
    margin: 0 0 10px 0;
    text-align: center;
}

.category-tag {
    display: inline-block;
    background-color: #292e4a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.play-button {
    display: inline-block;
    background: linear-gradient(90deg,#55bbab 60%, #476cbc 100%);
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 12px 38px;
    margin: 10px 0 18px 0;
    cursor: pointer;
    transition: background 0.13s, box-shadow 0.13s;
    box-shadow: 0 4px 10px 0 rgba(85,187,171,.09);
    letter-spacing: 1px;
}

.play-button:hover {
    background: linear-gradient(90deg,#476cbc 20%, #55bbab 100%);
    color: #fffbea;
}

.detail-meta {
    color: #c7d7e7;
    font-size: .98rem;
    margin-bottom: 18px;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
}

.action-button {
    display: block;
    background: #292e4a;
    color: #fff;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.13s;
    text-align: center;
    width: 100%;
}

.action-button:hover {
    background: #323a5c;
    color: #55bbab;
}

.detail-description {
    color: #fff;
    background: #23263a;
    border-radius: 8px;
    padding: 17px 16px 11px;
    box-shadow: 0 2px 8px 0 rgba(85,187,171,0.07);
    font-size: .97rem;
    text-align: left;
    margin-top: 12px;
    width: 236px;
}

.detail-description h3 {
    color: #55bbab;
    font-size: 1.11rem;
    margin-bottom: 8px;
    margin-top: 0;
}

.detail-related {
    flex: 1;
    min-width: 240px;
    max-width: 800px;
}

.detail-related h3 {
    color: #c7d7e7;
    font-size: 1.17rem;
    margin-bottom: 14px;
    margin-top: 8px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.related-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #202335;
    border-radius: 9px;
    text-decoration: none;
    color: #fff;
    width: 88px;
    padding: 10px 0 8px 0;
    box-shadow: 0 1.5px 7px rgba(30,32,56,0.13);
    transition: background 0.13s, color 0.13s, transform 0.13s;
}

.related-item:hover {
    color: #55bbab;
    background: #2f364e;
    transform: translateY(-2px) scale(1.04);
}

.related-item img {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    margin-bottom: 7px;
}

.related-item span {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
}

@media (max-width: 1000px) {
    .detail-container {
        flex-direction: column;
        gap: 24px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .detail-main { width: 100%; min-width: unset; }
    .detail-related { max-width: 100%; }
}

.main-content.expanded {
    margin-left: 0;
}

/* Main layout */
.game-frame-container {
    position: relative;
    background: rgba(28, 30, 44, 0.85);
    border-radius: 12px;
    margin: 20px auto;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(85, 187, 171, 0.1);
    display: flex;
    flex-direction: column;
}

.game-thumbnail {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.game-thumbnail img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.play-frame-button {
    position: relative;
    background: #55bbab;
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 2;
}

.play-frame-button i {
    font-size: 28px;
}

.play-frame-button:hover {
    background: #476cbc;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.play-frame-button:active {
    transform: scale(0.95);
}

.game-frame-container iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
}

.game-frame-title {
    font-size: 24px;
    color: #fff;
    text-align: center;
    padding: 15px;
    background: rgba(28, 30, 44, 0.95);
    margin: 0;
    border-top: 1px solid rgba(85, 187, 171, 0.1);
}

/* Game controls */
.game-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #55bbab;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 16px;
}

.control-btn:hover {
    background: #476cbc;
    transform: scale(1.1);
}

/* Share menu */
.share-menu {
    display: none;
    position: absolute;
    bottom: 50px;
    right: 10px;
    background: rgba(35, 38, 58, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.share-menu.active {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-menu .control-btn {
    margin: 2px 0;
}

.share-menu:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 14px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(35, 38, 58, 0.95);
}

/* Mobile menu */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
    background: #55bbab;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}

/* Page title */
.page-title {
    grid-column: 1 / -1;
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 1.8rem;
    text-align: center;
}

/* Search bar */
.search-container {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 2px solid #292e4a;
    border-radius: 8px;
    font-size: 1rem;
    background: #23263a;
    color: #fff;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #55bbab;
    outline: none;
    box-shadow: 0 0 0 2px rgba(85, 187, 171, 0.2);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8a93a7;
    pointer-events: none;
}

/* Category filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 2rem;
    padding: 0 1rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #292e4a;
    border-radius: 20px;
    background: #23263a;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-btn:hover {
    background: #292e4a;
    border-color: #55bbab;
}

.category-btn.active {
    background: #55bbab;
    border-color: #55bbab;
    color: #fff;
}

/* Sort select styles */
.sort-select {
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: 2px solid #292e4a;
    border-radius: 8px;
    font-size: 1rem;
    background: #23263a;
    color: #fff;
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%238a93a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
}

.sort-select:focus {
    border-color: #55bbab;
    outline: none;
    box-shadow: 0 0 0 2px rgba(85, 187, 171, 0.2);
}

/* Games section */
.games-section {
    padding: 0 1rem;
}

/* Remove ad container styles */
.ad-container,
.ad-horizontal,
.ad-square,
.ad-vertical,
.ad-sticky-bottom,
.ad-sticky-close {
    display: none !important;
}

/* Responsive styles */
@media (max-width: 1100px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .game-frame-container {
        height: 450px;
        margin: 0;
        padding: 0;
    }
}

@media (max-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .game-frame-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 60px 0 0 0;
    }

    .games-grid {
        padding-left: 0;
        padding-right: 15px;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .game-item {
        padding: 8px;
    }

    .game-item img {
        width: 85px;
        height: 85px;
    }

    .game-item span {
        font-size: 0.9rem;
    }

    .game-frame-container {
        height: 400px;
    }
    
    .game-thumbnail {
        height: 400px;
        gap: 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .header {
        padding-left: 00px;
    }

    .games-grid {
        padding-left: 0px;
    }

    /* Overlay for mobile menu */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

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

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .game-item img {
        width: 70px;
        height: 70px;
    }

    .game-item span {
        font-size: 0.8rem;
        max-width: 70px;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .game-frame-container {
        height: 300px;
    }

    .game-frame-container iframe {
        height: 100%;
    }

    .game-controls {
        bottom: 5px;
        right: 5px;
    }

    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .game-frame-title {
        font-size: 1rem;
        padding: 8px;
    }

    .main-content {
        padding: 50px 0 0 0;
    }

    .games-grid {
        padding: 8px;
        margin: 0;
    }

    .game-thumbnail {
        height: 300px;
    }
    
    .play-frame-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .play-frame-button i {
        font-size: 20px;
    }
}

/* Footer Styles */
.site-footer {
    background: #1a1c2a; /* Màu nền cho footer */
    padding: 50px 0 20px; /* Padding cho footer */
    color: #fff; /* Màu chữ */
    position: relative; /* Để footer không bị che khuất */
}

.footer-content {
    display: flex; /* Sử dụng flexbox để sắp xếp các phần tử */
    justify-content: space-between; /* Căn giữa các phần tử */
    padding: 0 30px; /* Padding cho nội dung footer */
}

.footer-section {
    flex: 1; /* Mỗi section chiếm 1 phần bằng nhau */
    padding: 0 15px; /* Padding cho mỗi section */
}

.footer-section h3 {
    color: #55bbab; /* Màu cho tiêu đề section */
    font-size: 1.2rem; /* Kích thước chữ */
    margin-bottom: 20px; /* Khoảng cách dưới tiêu đề */
}

.footer-section p {
    color: #8a93a7; /* Màu chữ cho đoạn văn */
    line-height: 1.6; /* Khoảng cách giữa các dòng */
    margin-bottom: 15px; /* Khoảng cách dưới đoạn văn */
}

.footer-section ul {
    list-style: none; /* Bỏ dấu đầu dòng */
    padding: 0; /* Bỏ padding */
    margin: 0; /* Bỏ margin */
}

.footer-section ul li {
    margin-bottom: 10px; /* Khoảng cách giữa các mục */
}

.footer-section ul li a {
    color: #8a93a7; /* Màu chữ cho liên kết */
    text-decoration: none; /* Bỏ gạch chân */
    transition: color 0.3s ease; /* Hiệu ứng chuyển màu khi hover */
}

.footer-section ul li a:hover {
    color: #55bbab; /* Màu chữ khi hover */
}

.footer-bottom {
    text-align: center; /* Căn giữa nội dung */
    padding-top: 20px; /* Padding trên */
    border-top: 1px solid #2a2d3e; /* Đường viền trên */
    margin-top: 20px; /* Khoảng cách trên */
    color: #8a93a7; /* Màu chữ */
}

/* Responsive Footer */
@media (max-width: 768px) {
    .ad-vertical {
        height: 250px;
        grid-column: span 2;
        grid-row: span 2;
    }
    .ad-sticky-bottom {
        display: block;
    }
    .footer-content {
        flex-direction: column;
        padding: 0 15px;
    }
    .footer-section {
        margin-bottom: 30px;
        padding: 0;
    }
    .footer-bottom {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .ad-square, .ad-vertical {
        grid-column: 1 / -1;
        height: 250px;
    }
    .ad-horizontal {
        height: 100px;
    }
}

/* Sidebar menu icon styles */
.sidebar-menu ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.game-frame-container {
    grid-column: span 5;
    grid-row: span 3;
    height: 480px;
    background: #23263a;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 3px 14px 0 rgba(30,32,56,0.11);
    position: relative;
    margin: 0;
    padding: 0;
}

.game-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-frame-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(35, 38, 58, 0.9);
    color: #55bbab;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.game-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.control-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #55bbab;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 16px;
}

.control-btn:hover {
    background: #476cbc;
    transform: scale(1.1);
}

.share-menu {
    display: none;
    position: absolute;
    bottom: 50px;
    right: 10px;
    background: rgba(35, 38, 58, 0.95);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.share-menu.active {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.share-menu .control-btn {
    margin: 2px 0;
}

.share-menu:after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 14px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(35, 38, 58, 0.95);
}

/* Mobile menu toggle - Fixed Position */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #fff;
    background: #55bbab;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
}

.sidebar-categories h3 {
    color: #c7d7e7;
    padding: 10px 18px;
    margin: 0;
    font-size: 1.1rem;
}

/* Game Description */
.game-description {
    grid-column: 1 / -1;
    background: #23263a;
    border-radius: 13px;
    padding: 20px;
    margin-bottom: 20px;
    color: #fff;
}

.game-description h2 {
    color: #55bbab;
    margin-top: 0;
    font-size: 1.5rem;
}

.game-description p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.game-description h3 {
    color: #55bbab;
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

.game-description ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.game-description li {
    margin-bottom: 5px;
}

/* Related Games */
.related-games-title {
    grid-column: 1 / -1;
    color: #fff;
    font-size: 1.5rem;
    margin: 20px 0;
}

/* Responsive styles */
@media (max-width: 1100px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .game-frame-container {
        grid-column: span 4;
    }
}

@media (max-width: 900px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .game-frame-container {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    body {
        position: relative;
        overflow-x: hidden;
    }
    .main-wrapper {
        flex-direction: column;
    }
    .main-content {
        width: 100%;
        padding: 70px 10px 20px 10px;
    }
    .game-frame-container {
        grid-column: 1 / -1;
        height: 400px;
    }
    .games-grid {
        await new Promise(resolve => setTimeout(resolve, 1000));
        const gameFrame = document.querySelector('.game-frame-container iframe');
        if (gameFrame) {
            gameFrame.style.display = 'block';
        }
    }
}

    .games-grid {
        padding-left: 0;
        padding-right: 15px;
    }
    .game-item img {
        width: 85px;
        height: 85px;
    }
    .game-item span {
        width: 90px;
        font-size: 0.9rem;
    }
    /* Overlay when menu is active */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    .menu-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .game-frame-container {
        height: 300px;
    }
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    .game-item {
        padding: 8px 5px 6px 5px;
    }
    .game-item img {
        width: 70px;
        height: 70px;
        margin-bottom: 8px;
    }
    .game-item span {
        width: 75px;
        font-size: 0.8rem;
    }
    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .game-frame-title {
        font-size: 1rem;
        padding: 8px;
    }
}

/* Sidebar menu icon styles */
.sidebar-menu ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.keyword-item a,
.note-item a {
    color: #ffffff; /* Đặt màu chữ cho liên kết thành màu trắng */
    text-decoration: none; /* Bỏ gạch chân */
    transition: color 0.3s ease; /* Hiệu ứng chuyển màu khi hover */
}

.keyword-item a:hover,
.note-item a:hover {
    color: #55bbab; /* Đặt màu chữ khi hover (có thể thay đổi nếu cần) */
}

.keyword-grid a,
.note-grid a {
    color: #ffffff; /* Đặt màu chữ cho liên kết thành màu trắng */
    text-decoration: none; /* Bỏ gạch chân */
    transition: color 0.3s ease; /* Hiệu ứng chuyển màu khi hover */
}

.keyword-grid a:hover,
.note-grid a:hover {
    color: #55bbab; /* Đặt màu chữ khi hover (có thể thay đổi nếu cần) */
}

/* PWA Install Prompt */
.pwa-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #23263a;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 90%;
    width: 360px;
}

.pwa-prompt-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pwa-prompt-text {
    flex: 1;
}

.pwa-prompt-text h3 {
    margin: 0 0 4px;
    color: #55bbab;
    font-size: 1.1rem;
}

.pwa-prompt-text p {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.9;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.pwa-install-btn {
    background: #55bbab;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.pwa-install-btn:hover {
    background: #476cbc;
}

.pwa-close-btn {
    background: transparent;
    color: #fff;
    border: 1px solid #55bbab;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pwa-close-btn:hover {
    background: rgba(85, 187, 171, 0.1);
}

@media (max-width: 480px) {
    .pwa-prompt {
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}

/* Loading overlay styles */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(28, 30, 44, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #55bbab;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
