:root {
    --bg-color: #fdf6e3;
    /* Soft beige background */
    --primary-color: #ff6b6b;
    /* Energetic red/pink */
    --secondary-color: #4ecdc4;
    /* Soft teal */
    --accent-color: #ff9f43;
    /* Bright orange */
    --text-color: #2d3436;
    /* Dark gray for readability */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'FbSpacer', 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.hub-container {
    background-color: #fff;
    border-radius: 30px;
    padding: 5vw;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    width: 100%;
    text-align: center;
    border: 8px solid var(--secondary-color);
}

.hub-header {
    margin-bottom: 40px;
}

.hub-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

.hub-subtitle {
    font-size: 1.5rem;
    color: #636e72;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 650px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .hub-title {
        font-size: 2.2rem;
    }

    .hub-subtitle {
        font-size: 1.2rem;
    }

    .hub-container {
        padding: 20px;
        margin: auto;
    }

    .game-icon {
        font-size: 3.5rem;
        margin-bottom: 10px;
    }

    .game-title {
        font-size: 1.5rem;
    }

    .game-card {
        padding: 20px;
        min-height: 150px;
    }
}

@media (max-height: 700px) {
    body {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        overflow-y: auto;
    }
}

.game-card {
    text-decoration: none;
    background-color: white;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--accent-color);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    min-height: 200px;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
    background-color: #fffbf5;
}

.game-card:nth-child(1) {
    border-color: #ff9f43;
}

/* Memory */
.game-card:nth-child(2) {
    border-color: #5f27cd;
}

/* Puzzle */
.game-card:nth-child(3) {
    border-color: #ff6b6b;
}

/* Learning */
.game-card:nth-child(4) {
    border-color: #10ac84;
}

/* Salon */

.game-icon {
    font-size: 4.5rem;
    margin-bottom: 15px;
}

.game-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 5px;
}

.game-desc {
    font-size: 1rem;
    color: #888;
}

.bounce {
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Back to Hub Button Styles for individual games */
.btn-back-hub {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ff6b6b;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    z-index: 9999;
}

.btn-back-hub:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}