* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    color: #fff;
    padding-top: 60px;
    padding-bottom: 70px;
}

a{
    text-decoration: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    padding: 10px 15px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: 768px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
}

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

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
}

/* Content Container */
.content {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 0 20px 0;
}

/* Popular Recommend Section */
.section-title {
    font-size: 18px;
    font-weight: bold;
    padding: 20px 15px 15px;
    background-color: #000;
}

.popular-recommend {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 15px 20px 15px;
    background-color: #000;
}

.popular-recommend::-webkit-scrollbar {
    display: none;
}

.popular-games {
    display: flex;
    gap: 12px;
    padding-bottom: 5px;
}

.popular-game-card {
    text-decoration: none;
    flex-shrink: 0;
    color: #fff;
    width: 140px;
    background: linear-gradient(135deg, #424242 0%, #303030 100%);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.popular-game-card:active {
    transform: scale(0.95);
}

.popular-game-image {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #7B1FA2 0%, #9C27B0 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;

    img{
        width: 100%;
        height: 100%;
        border-radius: 50%;
    }
}

.play-count {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 193, 7, 0.9);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    color: #000;
}

.popular-game-title {
    padding: 10px;
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

/* Carousel Section */
.carousel-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #000;
}

.carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E91E63 0%, #F44336 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;

    img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Category Section */
.category-section {
    padding: 20px 15px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.game-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    color: #fff;
}

.game-card:active {
    transform: scale(0.95);
}

.game-image {
    width:120px;
    height:120px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #424242 0%, #616161 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;

    img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.game-title {
    padding: 8px;
    font-size: 12px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer About Us */
.footer-about {
    background: #1a1a1a;
    padding: 30px 15px 90px 15px;
    margin-top: 20px;
}

.footer-about h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #9C27B0;
    text-align: center;
}

.footer-about p {
    font-size: 13px;
    line-height: 1.6;
    color: #aaa;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 5px 20px;
    transition: transform 0.2s;
    color: rgba(255, 255, 255, 0.8);
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-item.active {
    color: #fff;
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
}

/* Category Menu Overlay */
.category-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: flex-end;
}

.category-menu-overlay.show {
    display: flex;
}

.category-menu {
    background: #1a1a1a;
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.category-menu-overlay.show .category-menu {
    transform: translateY(0);
}

.category-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.category-menu-title {
    font-size: 18px;
    font-weight: bold;
}

.category-menu-close {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-menu-item {
    padding: 18px 15px;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.2s;
    text-decoration: none;
    color: #fff;
}

.category-menu-item:last-child {
    border-bottom: none;
}

.category-menu-item:active {
    background: #2a2a2a;
}

/* Desktop Responsive */
@media (min-width: 769px) {
    .header-content,
    .content {
        max-width: 768px;
    }

    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .popular-recommend {
        overflow-x: hidden;
    }

    .popular-games {
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel-container {
        height: 300px;
    }
}