/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header dan Navigation */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
    height: 25px; 
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c5ce7;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    max-width: 350px; /* Lebih kecil untuk PC */
    
}

.search-box {
    position: relative;
    flex: 1;
    transition: transform 0.2s ease;
    
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c5ce7;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #5900ff;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: rgb(239, 239, 239);
}

.search-box input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.leaderboard-icon {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    text-decoration: none;
    padding: 12px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    border: 2px solid transparent;
    width: 48px;
    height: 48px;
}

.leaderboard-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.5);
}

.leaderboard-icon i {
    margin: 0;
}

.search-box:focus-within i {
    color: #a29bfe;
}

.search-box input::placeholder {
    color: #6c757d;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 5px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 15px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.view-btn:hover {
    color: #6c5ce7;
    background: rgba(108, 92, 231, 0.1);
}

.view-btn.active {
    background: #6c5ce7;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #6c5ce7;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger removed */

/* Main Content */
main {
    padding-top: 0;
}

/* Games Section */
.games-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #190f14 0%, #030731 25%, #0f1858 50%, #030829 75%, #051050 100%); /* Gradasi dark blue */
    min-height: calc(100vh - 120px);
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #636e72;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 320px);
    gap: 2rem;
    margin-top: 3rem;
    justify-content: center;
}

.game-card {
    /* Background dinamis - diatur via JavaScript */
    background: #f8f9fa; /* Fallback jika gambar tidak ada */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid #8b5cf6; /* Garis tepi ungu */
    position: relative;
    overflow: hidden;
    width: 320px;
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* Normal overlay */
    transition: all 0.3s ease;
}

.game-card:hover::before {
    background: rgba(255, 255, 255, 0.1); /* Background jelas saat hover */
}

.game-card:active::before {
    background: rgba(255, 255, 255, 0.05); /* Background sangat jelas saat diklik */
}

.game-card.clicked::before {
    background: rgba(255, 255, 255, 0.05); /* Background sangat jelas saat diklik - PERSISTENT */
    transition: all 0.3s ease;
}

.game-card.active::before {
    background: rgba(255, 255, 255, 0.05); /* Background jelas untuk kontainer yang aktif */
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Game Card Layout */
.game-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Game Image - REMOVED (tidak diperlukan lagi) */

.game-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3436;
    margin: 0;
    position: relative;
    z-index: 2;
    /* Outline putih tebal */
    text-shadow: 
        -2px -2px 0 #fff,
        2px -2px 0 #fff,
        -2px 2px 0 #fff,
        2px 2px 0 #fff,
        -2px 0 0 #fff,
        2px 0 0 #fff,
        0 -2px 0 #fff,
        0 2px 0 #fff;
}

.game-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.game-category {
    display: flex;
}

.category {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.category.everyone {
    background: #00b894;
    color: white;
}

.category.kids {
    background: #74b9ff;
    color: white;
}

.category.teen {
    background: #fdcb6e;
    color: #2d3436;
}

.category.adult {
    background: #e17055;
    color: white;
}

/* Device Icon */
.device-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #6c5ce7;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    position: relative;
    z-index: 2;
    font-size: 1rem;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.5);
}

/* List View Styles - REMOVED (tidak diperlukan lagi) */

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.no-results i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    display: block;
}

.no-results h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.no-results p {
    margin: 0;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 1.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.pagination-btn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.page-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2d3436;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#currentPage {
    color: #6c5ce7;
    font-weight: 700;
}

/* Hide pagination when only 1 page */
.pagination-container.hidden {
    display: none;
}



/* Footer */
.footer {
    background: #2d3436;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #a29bfe;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #b2bec3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #a29bfe;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #636e72;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #6c5ce7;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #636e72;
    color: #b2bec3;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Mobile Hidden Class */
.mobile-hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 1rem 15px;
    }
    
    .logo {
        flex: 0 0 auto;
        margin: 0;
        text-align: left;
    }
    
    /* Hilangkan icon gamepad di mobile */
    .logo i {
        display: none;
    }

    /* Removed conflicting search-container properties - now using absolute positioning */

    .section-title {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: center;
    }

    /* Mobile List View - 2 columns */
    .games-grid.list-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .games-grid.list-view .game-card {
        max-width: 50px;
        gap: 0.3rem;
    }

    .games-grid.list-view .game-image {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        padding: 6px;
    }

    .games-grid.list-view .game-image img {
        width: 38px;
        height: 38px;
        border-radius: 4px;
    }

    .games-grid.list-view .play-btn {
        padding: 3px 6px;
        font-size: 0.6rem;
        border-radius: 10px;
        min-width: 50px;
    }

    .games-grid.list-view .play-btn i {
        font-size: 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Mobile search adjustments */
    .search-box input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 15px 14px 45px; /* Sedikit lebih besar untuk mobile */
    }

    /* Kecilkan font judul web di mobile */
    .logo h1 {
        font-size: 1rem; /* Lebih kecil agar muat sejajar */
        white-space: nowrap; /* Prevent text wrapping */
    }

    /* Search dan leaderboard di navbar - sejajar */
    .search-container {
        position: static;
        transform: none;
        background: none;
        padding: 0;
        border: none;
        box-shadow: none;
        min-width: auto;
        gap: 10px;
        z-index: auto;
        display: flex;
        align-items: center;
        flex: 1;
        max-width: 200px; /* Batasi lebar agar rapi */
        margin: 0 10px;
       
    }
    
    .search-box {
        flex: 1;
        min-width: 120px;
    }
    
    .search-box input {
        padding: 8px 10px 8px 30px;
        font-size: 0.8rem;
        background: white;
        border: 2px solid #5900ff;
        box-shadow: none; /* Hapus shadow agar lebih clean di navbar */
        border-radius: 20px;
    }
    
    .search-box i {
        left: 10px;
        font-size: 0.8rem;
    }
    
    .leaderboard-icon {
        padding: 6px;
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        box-shadow: none; /* Hapus shadow agar lebih clean di navbar */
        flex-shrink: 0;
    }
    
    /* Reset main padding karena search sudah di navbar */
    main {
        padding-top: 0;
    }

    .view-toggle {
        flex-shrink: 0;
    }

    /* Mobile Pagination */
    .pagination-container {
        gap: 1rem;
        margin-top: 2rem;
        padding: 1rem;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .page-info {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card {
        margin: 0 10px;
    }
} 