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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    color: #fff;
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: 100vh;
}

a{
    text-decoration: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 210, 255, 0.4);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.search-input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
}

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

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

/* Popular Recommend Section */
.section-title {
    font-size: 22px;
    font-weight: 800;
    padding: 25px 20px 18px;
    background: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

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

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

.popular-games {
    display: flex;
    gap: 18px;
}

.popular-game-card {
    flex: 0 0 auto;
    width: 160px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 210, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-decoration: none;
    color: #fff;
}

.popular-game-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 210, 255, 0.4);
    border-color: rgba(0, 210, 255, 0.6);
}

.popular-game-image {
    width: 160px;
    height: 160px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.popular-game-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.popular-game-card:hover .popular-game-image > img {
    transform: scale(1.1) rotate(2deg);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.8) 0%, rgba(58, 123, 213, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popular-game-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #00d2ff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.popular-game-card:hover .play-button {
    transform: scale(1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(0, 210, 255, 0.6);
    }
}

.play-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.popular-game-title {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
    padding: 0 20px;
}

.carousel-wrapper {
    display: flex;
    gap: 15px;
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex: 0 0 calc(100% - 15px);
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.3);
    transition: transform 0.3s ease;
}

.carousel-slide:hover img {
    transform: scale(1.02);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

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

.carousel-dot.active {
    background: #00d2ff;
    width: 30px;
    border-radius: 5px;
}

/* Category Section */
.category-section {
    margin-top: 30px;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 20px;
}

.game-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-decoration: none;
    color: #fff;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 210, 255, 0.4);
    border-color: rgba(0, 210, 255, 0.6);
}

.game-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-image img {
    transform: scale(1.15) rotate(2deg);
}

.game-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 15px 15px 10px;
    color: #fff;
}

/* Footer About Us */
.footer-about {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 40px 20px 100px 20px;
    margin-top: 40px;
    border-top: 2px solid rgba(0, 210, 255, 0.2);
}

.footer-about h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #00d2ff;
    text-align: center;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

.footer-about a {
    color: #00d2ff;
    font-weight: 600;
    text-decoration: underline;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    box-shadow: 0 -4px 20px rgba(0, 210, 255, 0.4);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 25px;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 15px;
}

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

.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

.nav-label {
    font-size: 13px;
    font-weight: 600;
}

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

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

.category-menu {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    border-radius: 30px 30px 0 0;
    padding: 25px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 3px solid #00d2ff;
}

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

.category-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 210, 255, 0.3);
}

.category-menu-title {
    font-size: 20px;
    font-weight: 800;
    color: #00d2ff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-menu-close {
    font-size: 32px;
    cursor: pointer;
    color: #ccc;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.category-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

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

.category-menu-item {
    padding: 20px 18px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border-radius: 12px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #fff;
}

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

.category-menu-item:hover {
    background: rgba(0, 210, 255, 0.1);
    padding-left: 25px;
    color: #00d2ff;
}

.category-menu-item:active {
    background: rgba(0, 210, 255, 0.2);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 180px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.5);
    z-index: 999;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 210, 255, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* Desktop Responsive */
@media (min-width: 769px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (min-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
