@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
    background: url('../img/background.jpg') center center/cover no-repeat fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.game-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none;
}

h1, h2 {
    color: #ff69b4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

#level, #goal, #score, #timer {
    font-size: 16px;
    color: #333;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(8, 50px);
    gap: 1px;
    background-color: #ccc;
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.candy {
    width: 50px;
    height: 50px;
    background-size: cover;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 5px;
}

.candy:hover {
    transform: scale(1.1);
}

.candy.flash {
    animation: flash 0.5s ease-out;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.candy.explode {
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(1.5); opacity: 0; }
}

button {
    background-color: #ff69b4;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
    font-family: 'Tajawal', sans-serif;
}

button:hover {
    background-color: #ff1493;
}

.special-power {
    margin-top: 20px;
    width: 60px;
    height: 60px;
    background-color: #add8e6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    position: relative;
}

.special-power img {
    width: 45px;
    height: 45px;
    position: absolute;
}

.bomb-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.special-power:hover {
    transform: scale(1.2);
}

.special-power:active {
    transform: scale(1.1);
}

.special-power.disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.special-power.disabled img {
    opacity: 0.5;
}

.progress-ring {
    position: absolute;
    width: 60px;
    height: 60px;
}

.progress-ring__circle {
    fill: transparent;
    stroke: #00ff00;
    stroke-width: 4;
    transform: rotate(-90deg);
    transform-origin: 30px 30px;
}

.progress-ring__circle-bg {
    stroke: #ddd;
}

.progress-ring__circle-progress {
    stroke-dasharray: 176;
    stroke-dashoffset: 176;
    transition: stroke-dashoffset 0.5s;
}

.audio-controls {
    margin-top: 20px;
}

@media (max-width: 600px) {
    #game-board {
        grid-template-columns: repeat(8, 40px);
    }
    .candy {
        width: 40px;
        height: 40px;
    }
}