body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4, #fbc2eb, #fbc2eb, #a18cd1, #fad0c4);
    background-size: 300% 300%;
    animation: gradientShift 10s ease infinite;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 50px; 
}

@media (max-width: 768px) {
    body {
        margin-top: 40px; 
    }
}

@media (max-width: 480px) {
    body {
        margin-top: 30px;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.spacing {
    height: 80px;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 160px);
    grid-template-rows: repeat(3, 160px);
    gap: 15px;
    margin-top: 40px;
}

.cell {
    width: 160px;
    height: 160px;
    background-color: #fff;
    border: 3px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    cursor: pointer;
}

.colorful-button {
    background: linear-gradient(45deg, #ff6f61, #ff9478, #ffcf56, #98ff6c, #56fff4, #566eff);
    background-size: 400% 400%;
    color: white;
    font-weight: bold;
    padding: 15px 30px;
    font-size: 1.5em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-position 1s ease, transform 0.2s ease;
}

.colorful-button:hover {
    background-position: 100% 0%;
    transform: scale(1.1);
}

.colorful-button:active {
    transform: scale(1);
}

footer {
    text-align: center;
    color: #666;
    background-color: #f1f1f1;
    padding: 20px 0;
    margin-top: auto;
    width: 100%;
    font-size: 1.2em;
}

footer a {
    color: #161515;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

#status {
    margin-top: 60px;
    font-size: 2em;
    font-weight: bold;
    color: #ff4500;
    text-align: center;
    padding: 15px;
    border: 4px solid #ff4500;
    border-radius: 8px;
    background-color: #fff4e6;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: appear 1s ease-in-out forwards, pulse 2s infinite ease-in-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

#restart {
    margin-top: 40px;
    padding: 15px 30px;
    font-size: 1.5em;
    cursor: pointer;
}

/* Tablet Design */
@media (max-width: 768px) {
    .board {
        grid-template-columns: repeat(3, 120px);
        grid-template-rows: repeat(3, 120px);
        gap: 10px;
    }

    .cell {
        width: 120px;
        height: 120px;
        font-size: 3.5em;
    }

    #status {
        font-size: 1.5em;
        margin-top: 30px;
    }

    .colorful-button {
        padding: 10px 20px;
        font-size: 1.2em;
    }

    footer {
        font-size: 1em;
    }
}

/* Mobile Design */
@media (max-width: 480px) {
    body {
        height: auto;
        padding: 20px;
    }

    .board {
        grid-template-columns: repeat(3, 100px);
        grid-template-rows: repeat(3, 100px);
        gap: 8px;
    }

    .cell {
        width: 100px;
        height: 100px;
        font-size: 2.8em;
    }

    #status {
        font-size: 1.2em;
        margin-top: 20px;
    }

    .colorful-button {
        padding: 8px 15px;
        font-size: 1em;
    }

    footer {
        font-size: 0.8em;
    }
}









