/* Main Layout */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: url('./img/bgtest.jpg') no-repeat center/cover #f0f8ff;
}

/* Variables */
:root {
    --color-primary: #2a75bb;
    --color-secondary: #ffcb05;
    --color-text: #ffffff;
    --color-bg: #f0f8ff;
    --button-border: 3px solid var(--color-secondary);
}

/* Game Selection Menu */
#main-menu {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    position: relative;
}

.game-container {
    margin-bottom: 20px;
}

.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Game Buttons */
.pokemon-button {
    border: var(--button-border);
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: no-repeat center/cover;
    padding: 0;
}

.pokemon-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-color: var(--color-primary);
}

.pokemon-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.button-text {
    position: relative;
    color: #fff;
    font: bold 18px/1.2 'Arial', sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 2;
    padding: 10px;
    width: 100%;
}

/* Headings */
h1 {
    color: var(--color-secondary);
    text-shadow: 
        3px 3px 0 var(--color-primary), 
        -1px -1px 0 var(--color-primary), 
        1px -1px 0 var(--color-primary), 
        -1px 1px 0 var(--color-primary), 
        1px 1px 0 var(--color-primary);
    margin: 0 0 20px;
    font-size: clamp(28px, 5vw, 36px);
    text-align: center;
}

/* Back Button */
.back-to-games-btn {
    display: inline-block;
    margin: 30px auto;
    padding: 12px 24px;
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border: var(--button-border);
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.back-to-games-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.back-arrow {
    margin-right: 8px;
    font-weight: bold;
}

/* Mobile Styles */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background-attachment: fixed;
    }
    
    .container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .pokemon-button {
        width: 140px;
        height: 140px;
    }
    
    .back-to-games-btn {
        width: 100%;
        max-width: 300px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Prevent zooming on mobile */
input, select, textarea {
    font-size: 16px;
}