body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
    color: #333;
    text-align: center;
}

h2 {
    margin-bottom: 15px;
}

#input-section {
    margin-bottom: 20px;
    text-align: center;
}

textarea {
    width: 90%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: monospace;
}

button {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
}

button:hover {
    background-color: #4cae4c;
}

#print-answers-btn {
    background-color: #f0ad4e;
}

#print-answers-btn:hover {
    background-color: #ec971f;
}

.print-controls {
    text-align: center;
    margin-bottom: 20px;
}

#crossword-grid-container,
#answer-grid-container {
    display: grid;
    margin: 20px auto;
    border: 1px solid #333;
    width: fit-content;
}

.grid-cell {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    background-color: #fff;
    text-transform: uppercase;
    box-sizing: border-box;
}

.grid-cell.filled {
    background-color: #fff;
}

.grid-cell.empty-block {
    background-color: #333;
    border: 1px solid #333;
}

.grid-cell .clue-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 9px;
    font-weight: normal;
    color: #555;
    line-height: 1;
}

.clues-container {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

#clues-across,
#clues-down,
#clues-across-answers,
#clues-down-answers {
    width: 45%;
}

#clues-across h3,
#clues-down h3,
#clues-across-answers h3,
#clues-down-answers h3 {
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 0;
}

ol {
    padding-left: 20px;
    list-style-type: decimal;
}

ol li {
    margin-bottom: 5px;
    font-size: 14px;
}

.message {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
}

.error {
    color: red;
}

.success {
    color: green;
}