/* Body styles */
body {
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    color: #7926c7;
    background: linear-gradient(45deg, #6a1b9a, #ff4081, #ab47bc); /* Vibrant gradient */
    background-size: 600% 600%; /* Make it dynamic */
    animation: gradientShift 10s ease infinite; /* Animation for gradient */
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Title styling */
#title {
    height: 150px;
    width: 400px;
    margin-bottom: 20px;
    border-radius: 10px;
}

/* Board styles */
#board {
    width: 360px;
    height: 360px;
    background-color: rgba(84, 71, 199, 0.8); /* Slightly transparent for better background effect */
    border: 10px solid #ff92f0;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    border-radius: 20px; /* Rounded corners */
}

/* Tile styles */
#board img {
    width: 118px;
    height: 118px;
    border: 1px solid #ffb6f5;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease-in-out; /* Smooth transition for transformations */
}

/* Hover effect on tiles */
#board img:hover {
    opacity: 0.8;
    transform: scale(1.1) rotate(5deg); /* Slight zoom and rotation on hover */
    box-shadow: 0px 0px 15px rgba(255, 146, 240, 0.8); /* Glow effect */
}

/* Turns display */
h1 {
    font-size: 24px;
    margin-top: 20px;
    color: #ffffff;
}

/* Animation for background gradient */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Modal (win message) styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Black with opacity */
    overflow: auto;
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
