* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: rgba(15, 12, 41, 0.95);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo h1 {
    font-size: 28px;
    background: linear-gradient(45deg, #ff0080, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex: 0 1 400px;
}

.search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    backdrop-filter: blur(5px);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar button {
    background: linear-gradient(45deg, #ff0080, #ff8c00);
    border: none;
    width: 50px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.3s;
}

.search-bar button:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(45deg, #ff0080, #ff8c00);
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Filter Section */
.filter-section {
    background: rgba(36, 36, 62, 0.8);
    padding: 20px 0;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(45deg, #ff0080, #ff8c00);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Games Grid */
.main-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 0, 128, 0.3);
}

.game-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: white;
}

.game-category {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 12px;
    margin-bottom: 15px;
}

.play-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #ff0080, #ff8c00);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.play-btn:hover {
    background: linear-gradient(45deg, #ff8c00, #ff0080);
    letter-spacing: 1px;
}

/* Footer */
.footer {
    background: rgba(15, 12, 41, 0.95);
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ff0080, #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
}

.modal-content {
    position: relative;
    width: 95%;
    height: 90%;
    margin: 2.5% auto;
    background: rgba(36, 36, 62, 0.95);
    border-radius: 15px;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    width: 100%;
    height: 100%;
    padding: 50px 20px 20px;
}

#gameFrame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    background: black;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #ff0080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .search-bar {
        flex: 1;
        margin: 0 20px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-bar {
        width: 100%;
        margin: 0;
    }
    
    .filter-container {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }
}