body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #7f53ac 0%, #657ced 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #fff;
    overflow-x: hidden;
}

header {
    background: linear-gradient(90deg, #ff6a00 0%, #ee0979 100%);
    color: #fff;
    padding: 0.6rem 1rem 0.3rem 1rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(238,9,121,0.12);
    position: sticky;
    top: 0;
    z-index: 10;
}

#search {
    margin-top: 0.3rem;
    padding: 0.4rem 1rem;
    width: 210px;
    border-radius: 20px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(127,83,172,0.10);
    outline: none;
    transition: box-shadow 0.2s;
}
#search:focus {
    box-shadow: 0 4px 16px rgba(127,83,172,0.18);
}

#games-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.2rem;
    padding: 2.5rem 2rem 2rem 2rem;
}

.game-card {
    background: linear-gradient(135deg, #fff 60%, #e0c3fc 100%);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(101,124,237,0.13);
    width: 230px;
    padding: 1.2rem 1rem 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    color: #22223b;
    position: relative;
    overflow: hidden;
    border: 2px solid #7f53ac22;
}
.game-card:hover {
    transform: translateY(-8px) scale(1.04) rotate(-1deg);
    box-shadow: 0 8px 32px rgba(101,124,237,0.22);
    border-color: #ee0979;
}
.game-emoji {
    font-size: 3.2rem;
    margin-bottom: 0.7rem;
    filter: drop-shadow(0 2px 8px #ee097955);
    transition: transform 0.2s;
}
.game-card:hover .game-emoji {
    transform: scale(1.18) rotate(6deg);
}
.game-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #7f53ac;
    letter-spacing: 0.5px;
}
.game-category {
    color: #ee0979;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.game-description {
    color: #22223b;
    font-size: 1.01rem;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(34,34,59,0.75);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    background: linear-gradient(120deg, #fff 80%, #e0c3fc 100%);
    border-radius: 18px;
    padding: 1.2rem;
    position: relative;
    width: 92vw;
    max-width: 950px;
    height: 82vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 8px 32px rgba(127,83,172,0.18);
}
.close {
    position: absolute;
    top: 10px;
    right: 24px;
    font-size: 2.3rem;
    color: #ee0979;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
.close:hover {
    color: #ff6a00;
}
#game-frame {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 12px;
    margin-top: 2rem;
    background: #e0c3fc;
    box-shadow: 0 2px 12px rgba(127,83,172,0.10);
}

@media (max-width: 600px) {
    #games-container {
        padding: 1rem;
        gap: 1rem;
    }
    .game-card {
        width: 95vw;
    }
    .modal-content {
        width: 99vw;
        height: 80vh;
    }
}
