:root {
    --primary-color: #6C63FF;
    --secondary-color: #FF6584;
    --accent-color: #43D9AD;
    --background-color: #2F2E41;
    --surface-color: #3F3D56;
    --text-color: #FFFFFF;
    --text-secondary: #B0B0B0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1F1D36 0%, #2F2E41 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.menu-container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.menu-header {
    margin-bottom: 50px;
    position: relative;
}

.menu-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    filter: drop-shadow(0 4px 10px rgba(108, 99, 255, 0.3));
}

.menu-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.close-btn {
    position: absolute;
    top: -20px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.close-btn:hover {
    background: var(--secondary-color);
    transform: rotate(90deg);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--card-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.card-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image-container img {
    transform: scale(1.1);
}

.card-content {
    padding: 25px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.game-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.play-btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 10px 25px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.game-card:hover .play-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Badge for new/updated games */
.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

@media (max-width: 768px) {
    .menu-title {
        font-size: 2.5rem;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}