body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.tile-container {
    perspective: 1000px;
}

.tile {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0.375rem;
    transition: transform 0.7s;
    transform-style: preserve-3d;
}

@media (min-width: 640px) {
    .tile {
        width: 4rem;
        height: 4rem;
        font-size: 2.25rem;
    }
}

.tile-front, .tile-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.tile-front {
    background-color: #ffffff;
    border: 2px solid #d1d5db;
}

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

.tile.is-flipped {
    transform: rotateY(180deg);
}

.bg-absent { background-color: #787c7e; border-color: #787c7e; color: white; }
.bg-present { background-color: #c9b458; border-color: #c9b458; color: white; }
.bg-correct { background-color: #6aaa64; border-color: #6aaa64; color: white; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake { animation: shake 0.6s ease-in-out; }

@keyframes jump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.jump { animation: jump 0.5s ease-in-out; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.fade-in { animation: fadeIn 0.3s ease-out forwards; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition-property: opacity;
    transition-duration: 300ms;
}
