
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
}

.site-header {
    text-align: center;
    margin-bottom: 30px;
}

.site-header h1 a {
    color: #007bff;
    text-decoration: none;
    font-size: 28px;
}

.site-header h2 {
    font-size: 18px;
    color: #666;
    font-weight: normal;
}

.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#game-area {
    flex: 2;
    max-width: 600px;
}

#game-title {
    text-align: center;
    font-size: 22px;
    margin-bottom: 20px;
}

#crossword-grid {
    display: grid;
    border: 1px solid #333;
    background-color: #000; /* Black background for empty cells */
    gap: 0;
}

.cell {
    position: relative;
    background-color: #fff;
    border: 1px solid #ccc; /* Add border to cells */
    box-sizing: border-box;
}

.cell.empty-cell {
    background-color: #000;
    border: none;
}

.cell-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 10px;
    color: #555;
    font-weight: bold;
}

.cell input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none; /* Remove input border */
    text-align: center;
    font-size: 20px;
    text-transform: uppercase;
    background-color: transparent;
    padding: 0;
}

.cell input:focus {
    outline: none; /* Remove default outline */
    background-color: #e8f0fe; /* Light blue background on focus */
    box-shadow: inset 0 0 0 2px #1E90FF; /* Custom focus border */
}

.info-area {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#hints h3 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

#hints ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#hints li {
    padding: 8px 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#hints li:hover {
    background-color: #f0f2f5;
}

#hints li.active {
    background-color: #d0eaff;
    font-weight: bold;
}

.controls {
    margin-top: 20px;
    text-align: center;
}

button {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background-color: #007bff;
    color: #fff;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

#reset-btn {
    background-color: #6c757d;
}

#reset-btn:hover {
    background-color: #5a6268;
}

#result-message {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
}

#source-link a {
    color: #007bff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }

    #game-area {
        max-width: 100%;
    }

    .cell input {
        font-size: 16px;
    }
}
