
body {
    background-color: rgb(84, 84, 84);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1 {
    text-align: center;
    font-size: 50px;
    color: white;
}

.attempt-count {
    margin: 0 auto 12px;
    color: white;
    font-size: 24px;
}

.game-board {
    display: table;
    margin: auto;
}

.setup-container {
    width: 420px;
    max-width: calc(100% - 40px);
    margin: 20px auto;
    padding: 24px;
    background-color: rgba(156, 90, 157, 0.523);
    border-radius: 15px;
}

.setup-container h2 {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: center;
    color: white;
    font-size: 30px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-form label {
    color: white;
    font-size: 18px;
}

.setup-form input {
    margin-bottom: 8px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}

.setup-form button {
    margin-top: 8px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.setup-form button:hover {
    transform: translateY(-3px);
}

.setup-error {
    min-height: 20px;
    margin: 0;
    color: rgb(255, 206, 206);
    font-size: 15px;
}

.results-container {
    width: 420px;
    max-width: calc(100% - 40px);
    margin: 20px auto;
    padding: 24px;
    background-color: rgba(156, 90, 157, 0.523);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.results-line {
    margin: 0;
    color: white;
    font-size: 22px;
}

.results-link {
    margin-top: 10px;
    color: rgb(0, 0, 0);
    font-size: 20px;
    text-decoration: none;
    padding: 1rem;
    background-color: rgb(255, 255, 255);
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.results-link:hover {
    transform: translateY(-3px);
}

.board-row {
    display: table-row;
    gap: 10px;
}

.board-cell{
    width: 250px;
    height: 250px;
    border-radius: 15px;
    margin-top: 10px;
    margin-right: 10px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    backface-visibility: hidden;
}

.board-cell:hover {
    transform: translateY(-3px);
}

.board-cell.is-flipping {
    animation: cardFlip 0.35s ease;
}

@keyframes cardFlip {
    0% {
        transform: rotateY(0deg) scale(1);
    }
    50% {
        transform: rotateY(90deg) scale(0.96);
    }
    100% {
        transform: rotateY(0deg) scale(1);
    }
}