* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f3f4f6;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    background-color: #8ba879;
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
}

.content {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    text-align: left;
}

.content h2 {
    margin-bottom: 10px;
    color: #8ba879;
}

.content p {
    margin-bottom: 15px;
}

ul {
    margin-top: 10px;
    padding-left: 20px;
}

ul li {
    margin-bottom: 10px;
}

ul li strong {
    color: #8ba879;
}

.mainGrid-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    max-width: 90vw;
    overflow: hidden; 
}

.mainGrid {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);
    border: 4px solid black;
    overflow: hidden;
    border-radius: 12px;
    width: 100%; 
    max-width: 1000px; 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.tip {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #777;
}

@media (max-width: 800px) {
    .tip {
        margin-bottom: 1rem;
        font-size: 1rem;
    }
}

#reset-button {
    margin: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #8ba879;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#reset-button:hover {
    background-color: #6e8f6c;
}

.mainGrid > * {
    border: 2px solid lightgray;
    height: 50px; 
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.5rem;
    font-family: monospace;
    transition: box-shadow 0.3s ease;
}

.mainGrid > *:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cell {
    height: 40px; 
    width: 40px; 
}

.number-1 {
    color: red;
}

.number-2 {
    color: orange;
}

.number-3 {
    color: green;
}

.number-4 {
    color: green;
}

.number-5 {
    color: gray;
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #777;
}
