body {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #121212;
    color: #e0e0e0;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 100%;
}

h1 {
    font-weight: 700;
    color: #4CAF50;
    margin-bottom: 10px;
}

p {
    margin-bottom: 20px;
    color: #bdbdbd;
}

/* Game Selection Menu */
.game-menu {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.game-button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: #333333;
    color: #e0e0e0;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.game-button:hover {
    background-color: #4CAF50;
}

.game-button.active {
    background-color: #4CAF50;
}

/* Common styles for all games */
.game-area {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.game-area.active {
    display: flex;
}

.message-box {
    background-color: #333333;
    color: #4CAF50;
    padding: 15px;
    border-radius: 10px;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.9em;
    color: #9e9e9e;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #e0e0e0;
}

/* Color Clicker specific styles */
.color-clicker-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #f44336;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.5s;
    border: 5px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.color-clicker-button:hover {
    transform: scale(1.05);
}

.color-clicker-button:active {
    transform: scale(0.95);
}

.color-clicker-button.green {
    background-color: #4CAF50;
    animation: pulse 1s infinite alternate;
}

.color-clicker-button.red {
    background-color: #f44336;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Matching Pairs specific styles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    padding: 10px;
    background-color: #2a2a2a;
    border-radius: 10px;
}

.card {
    background-color: #444;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s, background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card.flipped {
    transform: rotateY(180deg);
}

.card.matched {
    cursor: default;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    border-radius: 8px;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    font-weight: 700;
    border-radius: 8px;
}

.card-front {
    background-color: #444;
}

.card-back {
    transform: rotateY(180deg);
}

/* Number Guessing specific styles */
.number-guessing-game {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.number-guessing-game input {
    padding: 10px;
    border: none;
    border-radius: 8px;
    text-align: center;
    background-color: #333333;
    color: #e0e0e0;
    font-size: 1.2em;
}

.number-guessing-game button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: #4CAF50;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.number-guessing-game button:hover {
    background-color: #43a047;
}

/* Tournament specific styles */
.tournament-end {
    display: none;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.tournament-end.active {
    display: flex;
}

.score-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.score-list li {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.score-total {
    background-color: #4CAF50;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
}

.new-game-button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: #4CAF50;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.new-game-button:hover {
    background-color: #43a047;
}


/* Mobile responsiveness */
@media (max-width: 500px) {
    .container {
        padding: 20px;
        max-width: 95%;
    }

    .color-clicker-button {
        width: 120px;
        height: 120px;
    }

    h1 {
        font-size: 1.5em;
    }

    p {
        font-size: 0.9em;
    }

    .grid-container {
        gap: 5px;
    }
}