* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 30px;
}

.game-card {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-align: center;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.game-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.game-card h2 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.game-card p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.play-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: opacity 0.3s;
}

.play-button:hover {
    opacity: 0.9;
}

#gameCanvas {
    display: none;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 100%;
}

.game-controls {
    display: none;
    margin-top: 20px;
    text-align: center;
}

.back-button {
    background: #f44336;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    margin-right: 10px;
}

.score-display {
    background: white;
    padding: 15px 30px;
    border-radius: 10px;
    display: inline-block;
    margin-left: 10px;
    font-weight: bold;
    color: #667eea;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}