body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #f0f0f0;
}

.game-container {
    width: 90%;
    max-width: 600px;
    height: auto;
    border: 2px solid #ddd;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.game-header {
    background-color: #ffcccb;
    padding: 10px;
    text-align: center;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.stat .label {
    font-weight: bold;
}

.game-main {
    padding: 20px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(8, 40px);
    grid-gap: 2px;
    justify-content: center;
}

.game-controls {
    margin-top: 20px;
    text-align: center;
}

.btn {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    background-color: #ff4c3b;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background-color: #ff6f61;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
}

.modal-buttons {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* Candy Cells */
.candy-cell {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.candy-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.candy-cell.selected {
    border: 3px solid #ff6f61;
    background-color: #ffe6e6;
}

/* Candy Types */
.candy-red { background-color: #ff6b6b; }
.candy-blue { background-color: #4ecdc4; }
.candy-green { background-color: #45b7d1; }
.candy-yellow { background-color: #f9ca24; }
.candy-purple { background-color: #a55eea; }
.candy-orange { background-color: #ffa726; }

/* Animation for matching candies */
.candy-cell.matching {
    animation: match-animation 0.5s ease-in-out;
}

@keyframes match-animation {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(0); opacity: 0; }
}

/* Animation for falling candies */
.candy-cell.falling {
    animation: fall-animation 0.5s ease-in-out;
}

@keyframes fall-animation {
    0% { transform: translateY(-40px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

