body {
    background-color: #E0F7FA; /* Light blue background */
    font-family: 'Verdana', 'Arial', 'Helvetica', sans-serif;
    color: #336699;
    text-align: center; /* Center content horizontally */
    margin: 0;
    padding: 0;
}

header {
    position: relative;
    margin: 10px 0; /* Reduced margin */
    padding: 20px; /* Added padding */
    background-color: #B3E5FC; /* Complementing shade of blue */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Ensure floating icons stay within the header */
    border: 2px solid #CCCCCC; /* Added border */
}

header h1 {
    font-size: 2.5em; /* Increased font size */
    margin: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header img {
    width: 200px; /* Reduced width */
    height: auto;
}

.header-description {
    font-size: 0.9em; /* Slightly smaller font size */
    color: #666666; /* Gray color */
    margin-left: 20px; /* Margin to the left of the description */
    max-width: 600px; /* Limit the width of the description */
    text-align: left; /* Align text to the left */
}

.header-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Ensure icons don't interfere with interactions */
}

.floating-icon {
    opacity: 0.25; /* Increased visibility */
    transition: transform 0.1s linear; /* Smooth movement */
}

main {
    padding: 10px; /* Reduced padding */
}

.game-type-key {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.key-item {
    margin: 0 10px;
    font-size: 1em;
    color: #336699;
    display: flex;
    align-items: center;
}

.key-item i {
    margin-right: 5px;
}

.memory-icon {
    color: #4CAF50 !important; /* Green color for memory games */
}

.association-icon {
    color: #FFC107 !important; /* Yellow color for association games */
}

.games-section {
    margin-bottom: 20px; /* Reduced margin */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjusted min-width for smaller cards */
    gap: 10px; /* Reduced gap between cards */
    padding: 10px; /* Reduced padding */
}

.game-card {
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    border-radius: 8px;
    padding: 8px; /* Reduced padding */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.memory-game {
    border-left: 5px solid #4CAF50 !important; /* Green border for memory games */
}

.association-game {
    border-left: 5px solid #FFC107 !important; /* Yellow border for association games */
}

.game-card img {
    width: 100%;
    border-radius: 8px;
}

.game-card h3 {
    font-size: 0.7em; /* Reduced font size */
    color: #336699;
    margin: 5px 0; /* Reduced margin */
    display: flex;
    align-items: center;
}

.game-card h3 .difficulty-icon {
    margin-left: 5px; /* Reduced margin */
}

.game-card p {
    font-size: 0.6em; /* Reduced font size */
    color: #666666;
}

.play-button {
    display: inline-block;
    margin-top: 5px; /* Reduced margin */
    padding: 7.5px 20px; /* Reduced height by 25% */
    background-color: #FF6F61; /* Button background color */
    color: #FFFFFF; /* Button text color */
    font-size: 1em; /* Button font size */
    font-weight: bold; /* Button font weight */
    text-align: center; /* Center text */
    border: none; /* Remove border */
    border-radius: 8px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s; /* Smooth transition for transform, background color, and box-shadow */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08); /* Add shadow for dimension */
    margin-left: auto;
    margin-right: auto;
}

.play-button:hover {
    background-color: #FF8A80; /* Lighter background color on hover */
    transform: scale(1.1); /* Slightly enlarge the button on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.08); /* Increase shadow on hover */
}

.play-button:active {
    transform: scale(0.9); /* Slightly shrink the button on click */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.08); /* Reduce shadow on click */
}

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

.play-button.bounce {
    animation: buttonBounce 0.5s ease-in-out;
}

footer {
    margin: 10px 0; /* Reduced margin */
}

footer img {
    width: 200px; /* Reduced width */
    height: auto;
}

a {
    color: #FF6F61;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

svg {
    display: block;
    margin: 0 auto; /* Center SVG horizontally */
}

.difficulty-icon {
    font-size: 12px; /* Reduced font size */
}

.difficulty-icon.easy {
    color: #4CAF50 !important;
}

.difficulty-icon.average {
    color: #FFC107 !important;
}

.difficulty-icon.hard {
    color: #F44336 !important;
}

@keyframes sizeAdjust {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    10% {
        transform: translateY(-20px);
    }
    20% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-15px);
    }
    40% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(0);
    }
    70% {
        transform: translateY(-5px);
    }
    80% {
        transform: translateY(0);
    }
    90% {
        transform: translateY(-2px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes tumble {
    0% {
        transform: rotate(0deg);
    }
    12.5% {
        transform: rotate(45deg);
    }
    25% {
        transform: rotate(90deg);
    }
    37.5% {
        transform: rotate(135deg);
    }
    50% {
        transform: rotate(180deg);
    }
    62.5% {
        transform: rotate(225deg);
    }
    75% {
        transform: rotate(270deg);
    }
    87.5% {
        transform: rotate(315deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.difficulty-icon.animate-bounce {
    animation: bounce 2s ease-in-out;
}

.difficulty-icon.animate-tumble {
    animation: tumble 2s ease-in-out; /* Increased duration for smoother animation */
}