body {
    font-family: 'Fredoka One', cursive, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #a0e9ff;
    color: #333;
    text-align: center;
}

h1 {
    color: #0056b3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#game-container {
    position: relative;
    width: 90vw;
    height: 75vh;
    max-width: 1000px;
    max-height: 700px;
}

#game-board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 3px solid #007bff;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card {
    width: 100px;
    height: 100px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.image-card {
    cursor: grab;
    background-color: #f0f8ff;
}

.image-card:active {
    cursor: grabbing;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: scale(1.05);
}

.card img {
    max-width: 80%;
    max-height: 80%;
    pointer-events: none; /* Important for drag and drop */
}

.letter-card {
    font-size: 48px;
    font-weight: bold;
    color: #ff6347;
    background-color: #fffbe6;
}

.dragging {
    opacity: 0.5;
    transform: scale(0.9);
}

.drop-target-hover {
    border-color: #ff6347;
    background-color: #fff0e7;
    transform: scale(1.05);
}

.matched {
    visibility: hidden;
    opacity: 0;
    transform: scale(0.8);
    transition: visibility 0s 0.5s, opacity 0.5s, transform 0.5s;
}

#win-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 10px;
    opacity: 1;
    transition: opacity 0.5s;
}

#win-message.hidden {
    opacity: 0;
    pointer-events: none;
}

#win-message h2 {
    font-size: 2.5em;
    color: #28a745;
}

#restart-button {
    font-family: 'Fredoka One', cursive;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    margin-top: 20px;
    transition: background-color 0.3s, transform 0.2s;
}

#restart-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

