body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

h1 {
    color: var(--primary-color);
}

#board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background-color: var(--primary-color);
    padding: 10px;
    border-radius: 10px;
    max-width: 350px;
    width: 100%;
    margin: 0 auto;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /*min-width: 400px;*/
    padding: 10px;
    box-sizing: border-box;
}

.cell {
    width: 100%;
    padding-bottom: 100%;
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.cell::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border-radius: 50%;
}

.cell.red::after {
    background-color: red;
}

.cell.yellow::after {
    background-color: yellow;
}

#message {
    margin-top: 20px;
    font-weight: bold;
}

#resetBtn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

@keyframes dropAnimation {
    from {
        transform: translateY(-300px);
    }
    to {
        transform: translateY(0);
    }
}

.cell.animated {
    animation: dropAnimation 0.5s ease-in;
}

@keyframes firework {
    0% {
        transform: translate(-50%, -50%);
        width: 0.1vmin;
        opacity: 1;
    }
    50% {
        width: 0.5vmin;
        opacity: 1;
    }
    100% {
        width: 45vmin;
        opacity: 0;
    }
}

.firework {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.firework::before,
.firework::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 50%;
    border: 2vmin solid gold;
    animation: firework 0.5s linear infinite;
}

.firework::after {
    animation-delay: -0.3s;
}

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

.proud-computer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    animation: proudComputer 1s ease-in-out infinite;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .language-btn {
        font-size: 1em;
        margin: 0 2px;
    }

    #resetBtn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

@media (max-width: 430px) {
    .container {
        padding: 10px;
    }
    h1 {
        font-size: 1.5em;
    }
    #gameCanvas {
        width: 100%;
        height: auto;
    }

    #startButton {
        font-size: 16px;
        padding: 8px 16px;
    }

    #score {
        font-size: 20px;
    }
    #board {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        background-color: var(--primary-color);
        padding: 10px;
        border-radius: 10px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .firework::before,
    .firework::after {
        border-width: 1vmin;
    }

    .proud-computer {
        font-size: 3em;
    }
}