body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    height: 100vh;
    background-color: #f0f0f0;
}

.container {
    max-width: 600px;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

#date {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

#grid {
    display: inline-grid;
    grid-template-columns: repeat(4, 60px);
    gap: 5px;
    margin: 20px 0;
}

.cell {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    background: #fff;
}

.cell.pre-filled {
    background: #e0e0e0;
    cursor: not-allowed;
}

.cell.error {
    border-color: red;
}

.cell.star {
    color: #ff0000;
}

.cell.circle {
    color: #0000ff;
}

.cell.square {
    color: #008000;
}

.cell.triangle {
    color: #ffa500;
}

#symbols {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

#symbols button {
    width: 50px;
    height: 50px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: 2px solid #333;
    background-color: #fff;
    cursor: pointer;
}

#symbols button.star {
    color: #ff0000;
}

#symbols button.circle {
    color: #0000ff;
}

#symbols button.square {
    color: #008000;
}

#symbols button.triangle {
    color: #ffa500;
}

#button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

#submit, #clear-all, #clear-last, #instructions-btn, #share-link-button {
    font-size: 16px;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

#submit {
    display: block;
    margin: 10px auto;
    background-color: #28a745;
}

#instructions-btn {
    display: block;
    margin: 10px auto;
}

#share-link-button {
    display: block;
    margin: 15px auto 0; /* Centers and adds spacing above */
}

#submit:hover, #clear-all:hover, #clear-last:hover, #instructions-btn:hover, #share-link-button:hover {
    background-color: #0056b3;
}

#submit:hover {
    background-color: #218838;
}

#usage {
    margin: 10px 0;
}

#feedback {
    margin: 10px 0;
    color: #d32f2f;
}

#attempts {
    font-weight: bold;
}

#score {
    font-weight: bold;
    margin: 10px 0;
}

#streak {
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

/* Modal Styles (for both status and instructions modals) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-height: 70%;
    overflow-y: auto;
}

.success .modal-content {
    background-color: #d4edda; /* Light green for success */
    border-color: #c3e6cb;
    color: #155724; /* Dark green text for success */
}

.failure .modal-content {
    background-color: #f8d7da; /* Light red for failure */
    border-color: #f5c6cb;
    color: #721c24; /* Dark red text for failure */
}

.close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.close-btn:hover {
    color: #000;
}

.example {
    margin: 15px 0;
    text-align: center;
}

.grid-example {
    display: inline-grid;
    grid-template-columns: repeat(4, 50px);
    gap: 2px;
    margin: 10px 0;
}

.grid-example .cell {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border: 2px solid #333;
    background: #fff;
}

.grid-example.error .cell {
    border-color: red;
}