* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00f3ff;
    --secondary-color: #ff00ff;
    --accent-color: #ffff00;
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --card-bg: rgba(15, 15, 25, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow-glow: 0 0 20px rgba(0, 243, 255, 0.5);
    --shadow-glow-pink: 0 0 20px rgba(255, 0, 255, 0.5);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Stars */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    animation: animateStars 50s linear infinite;
}

.stars2 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150"><circle cx="75" cy="75" r="1.5" fill="white" opacity="0.6"/></svg>') repeat;
    animation: animateStars 100s linear infinite;
}

.stars3 {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><circle cx="100" cy="100" r="2" fill="white" opacity="0.4"/></svg>') repeat;
    animation: animateStars 150s linear infinite;
}

@keyframes animateStars {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100vh);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 243, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    5% {
        clip: rect(65px, 9999px, 29px, 0);
    }
    10% {
        clip: rect(92px, 9999px, 98px, 0);
    }
    15% {
        clip: rect(9px, 9999px, 95px, 0);
    }
    20% {
        clip: rect(50px, 9999px, 57px, 0);
    }
    25% {
        clip: rect(33px, 9999px, 84px, 0);
    }
    30% {
        clip: rect(12px, 9999px, 8px, 0);
    }
    35% {
        clip: rect(78px, 9999px, 55px, 0);
    }
    40% {
        clip: rect(45px, 9999px, 23px, 0);
    }
    45% {
        clip: rect(67px, 9999px, 87px, 0);
    }
    50% {
        clip: rect(20px, 9999px, 15px, 0);
    }
    55% {
        clip: rect(88px, 9999px, 42px, 0);
    }
    60% {
        clip: rect(3px, 9999px, 99px, 0);
    }
    65% {
        clip: rect(56px, 9999px, 71px, 0);
    }
    70% {
        clip: rect(28px, 9999px, 36px, 0);
    }
    75% {
        clip: rect(81px, 9999px, 5px, 0);
    }
    80% {
        clip: rect(14px, 9999px, 62px, 0);
    }
    85% {
        clip: rect(49px, 9999px, 91px, 0);
    }
    90% {
        clip: rect(72px, 9999px, 18px, 0);
    }
    95% {
        clip: rect(25px, 9999px, 76px, 0);
    }
    100% {
        clip: rect(58px, 9999px, 41px, 0);
    }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 3px;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: var(--shadow-glow);
    border-color: var(--secondary-color);
}

.search-btn {
    padding: 15px 30px;
    background: var(--gradient-3);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--card-bg);
    padding: 30px 50px;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
    text-align: center;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.8);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.game-card:nth-child(4n+1) {
    border-top: 3px solid var(--primary-color);
}

.game-card:nth-child(4n+2) {
    border-top: 3px solid var(--secondary-color);
}

.game-card:nth-child(4n+3) {
    border-top: 3px solid var(--accent-color);
}

.game-card:nth-child(4n+4) {
    border-top: 3px solid #00ff88;
}

.game-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-3);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.game-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    text-align: center;
}

.game-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.play-btn {
    width: 100%;
    padding: 15px;
    background: var(--gradient-3);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
}

.play-btn:hover {
    background: var(--gradient-2);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.8);
}

.play-btn:active {
    transform: scale(0.95);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 2px solid var(--primary-color);
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(10px);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        width: 100%;
        max-width: 300px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}

