/* Cosmic Games Design - Portable CSS */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: 
        radial-gradient(ellipse at center, #0a0a0a 0%, #000000 100%),
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: white;
    position: relative;
    overflow-x: hidden;
}

/* Animated Starfield */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: starsShift 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes starsShift {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

/* Comet Animation */
.comet {
    position: fixed;
    top: 20%;
    right: -100px;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #fff, rgba(255,255,255,0));
    border-radius: 50%;
    box-shadow: 0 0 20px 2px #fff;
    animation: cometFly 15s linear infinite;
    z-index: -1;
}

.comet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -100px;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff);
    transform: translateY(-50%);
}

@keyframes cometFly {
    0% {
        transform: translateX(0) translateY(0) rotate(45deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateX(-100vw) translateY(100vh) rotate(45deg);
        opacity: 0;
    }
}

/* Cosmic Title */
h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin: 2rem 0 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #a8a8a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

/* Game Buttons - 5 per row */
.button-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 15px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Glass Morphism Buttons */
button {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 18px 12px;
    font-size: 1rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
}

button::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.6s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Search Bar */
#searchInput {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 18px 28px;
    font-size: 1.1rem;
    border-radius: 16px;
    width: min(600px, 90vw);
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    outline: none;
    display: block;
    margin: 20px auto;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

#searchInput:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Game Counter */
.game-counter {
    text-align: center;
    margin: 10px 0 20px;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Container Animation */
.container {
    animation: float 6s ease-in-out infinite;
    position: relative;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .button-row {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1000px;
    }
}

@media (max-width: 900px) {
    .button-row {
        grid-template-columns: repeat(3, 1fr);
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .button-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 500px;
    }
    
    button {
        padding: 16px 10px;
        font-size: 0.95rem;
        min-height: 70px;
    }
    
    #searchInput {
        width: min(400px, 90vw);
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .button-row {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
    
    button {
        width: 100%;
        margin: 5px 0;
    }
}

