body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1em 0;
    text-align: center;
}

main {
    padding: 20px;
}

#theme-selection {
    margin-bottom: 20px;
    text-align: center;
}

#theme-dropdown {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    width: 200px;
}

#generate-button {
    padding: 10px 20px;
    font-size: 1em;
    background-color: #5cb85c;
    color: white;
    border: none;
    cursor: pointer;
}

#crossword-container {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
    padding: 20px;
    margin-bottom: 60px;
    min-height: 500px;
}

#crossword-grid {
    flex: 0 0 auto;
    margin-right: 20px;
    display: grid;
    border: 1px solid #ccc;
}

.cell {
    width: 45px;
    height: 45px;
    border: 1px solid #ccc;
    text-align: center;
    font-size: 1.5em;
    padding: 0;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cell:focus {
    outline: none;
    border: 2px solid #5cb85c;
    box-shadow: 0 0 5px rgba(92, 184, 92, 0.5);
}

.cell:not(.black):hover {
    background-color: #f0f8ff;
}

.cell.black {
    background-color: #000 !important;
    border: none !important;
    pointer-events: none;
    opacity: 1 !important;
}

.cell.black:hover {
    background-color: #000 !important;
}

.cell.prefilled {
    background-color: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
}

.cell.prefilled:hover {
    background-color: #e8f5e9;
}


#clues-container {
    flex: 1 1 400px;
    min-width: 300px;
    max-width: 500px;
    height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: 20px;
}

#across-clues, #down-clues {
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

#down-clues {

    margin-top: 20px;
}

#across-clues h3, #down-clues h3 {
    position: sticky;
    top: 0;
    background-color: #fff;
    color: #333;
    font-size: 1.2em;
    padding: 10px;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #5cb85c;
    z-index: 1;
}

#across-clues-list, #down-clues-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#across-clues-list li, #down-clues-list li {
    margin-bottom: 15px;
    line-height: 1.5;
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

#across-clues-list li:hover, #down-clues-list li:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

footer {
    text-align: center;
    padding: 1em 0;
    background-color: #333;
    color: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
}
