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

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 50%, #0a0a2a 100%);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    color: white;
}

/* Animated star background */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.stars {
    background: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 230px 80px, #fff, transparent),
        radial-gradient(2px 2px at 300px 150px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 350px 200px, #fff, transparent),
        radial-gradient(2px 2px at 420px 50px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 500px 180px, #fff, transparent),
        radial-gradient(2px 2px at 580px 90px, rgba(255,255,255,0.9), transparent);
    background-repeat: repeat;
    background-size: 600px 300px;
    animation: twinkle 8s ease-in-out infinite;
}

.twinkling {
    background: 
        radial-gradient(3px 3px at 100px 200px, rgba(100, 200, 255, 0.8), transparent),
        radial-gradient(2px 2px at 250px 100px, rgba(255, 100, 200, 0.6), transparent),
        radial-gradient(3px 3px at 400px 250px, rgba(100, 255, 200, 0.7), transparent),
        radial-gradient(2px 2px at 550px 150px, rgba(255, 200, 100, 0.6), transparent);
    background-repeat: repeat;
    background-size: 700px 400px;
    animation: twinkle 12s ease-in-out infinite reverse;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 50px;
}

.title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff, #ff6b6b);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
    letter-spacing: 4px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

/* Game Cards */
.game-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    text-decoration: none;
    color: white;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.game-card:hover .card-glow {
    opacity: 0.15;
}

/* Archer Card Glow */
.archer .card-glow {
    background: radial-gradient(circle, #ff6b35 0%, transparent 70%);
}
.archer {
    border-color: rgba(255, 107, 53, 0.3);
}
.archer:hover {
    border-color: rgba(255, 107, 53, 0.6);
    box-shadow: 0 30px 60px rgba(255, 107, 53, 0.2);
}

/* Geometry Card Glow */
.geometry .card-glow {
    background: radial-gradient(circle, #00d4ff 0%, transparent 70%);
}
.geometry {
    border-color: rgba(0, 212, 255, 0.3);
}
.geometry:hover {
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 30px 60px rgba(0, 212, 255, 0.2);
}

/* Space Card Glow */
.space .card-glow {
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
}
.space {
    border-color: rgba(168, 85, 247, 0.3);
}
.space:hover {
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 30px 60px rgba(168, 85, 247, 0.2);
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.game-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Tags */
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.archer .tag {
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
}

.geometry .tag {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
}

.space .tag {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.4);
}

/* Play Button */
.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.archer .play-button {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
}

.geometry .play-button {
    background: linear-gradient(135deg, #00d4ff, #00a8cc);
}

.space .play-button {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
}

.game-card:hover .play-button {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.game-card:hover .arrow-icon {
    transform: translateX(5px);
}

/* Footer */
footer {
    margin-top: 50px;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Floating Particles */
.particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: rise 5s ease-in infinite;
    z-index: 0;
}

@keyframes rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        padding: 25px;
    }
    
    .game-icon {
        font-size: 3rem;
    }
    
    .title {
        letter-spacing: 2px;
    }
}

/* Hover sound effect indicator */
.game-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.archer::after {
    background: linear-gradient(90deg, transparent, #ff6b35, transparent);
}

.geometry::after {
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
}

.space::after {
    background: linear-gradient(90deg, transparent, #a855f7, transparent);
}

.game-card:hover::after {
    transform: scaleX(1);
}
