body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.crossword-section {
    flex: 1;
    min-width: 400px;
}

.clues-section {
    flex: 1;
    min-width: 300px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.crossword-grid {
    border-collapse: collapse;
    margin: 20px auto;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cell {
    width: 30px;
    height: 30px;
    border: 1px solid #333;
    text-align: center;
    position: relative;
    font-weight: bold;
    font-size: 16px;
    vertical-align: middle;
    padding: 0;
}

.letter-cell {
    background-color: white;
}

.cell-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: text;
}

.letter-cell:focus-within {
    background-color: #e6f3ff;
    outline: 2px solid #0066cc;
}

.cell-input:focus {
    background-color: transparent;
    outline: none;
}

.empty-cell-black {
    background-color: #333;
    border: 1px solid #333;
}

.empty-cell-white {
    background-color: white;
    border: 1px solid #333;
}

.empty-cell-clean {
    background-color: transparent;
    border: none;
}

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

.correct {
    background-color: #d4edda !important;
    color: #155724;
}

.incorrect {
    background-color: #f8d7da !important;
    color: #721c24;
}

.clues {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clues h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.clues ul {
    list-style: none;
    padding: 0;
}

.clues li {
    margin: 8px 0;
    padding: 5px;
    border-radius: 4px;
}

.clue-number {
    font-weight: bold;
    color: #0066cc;
    margin-right: 5px;
}

.completion-link {
    display: none;
    margin-top: 5px;
    padding: 3px 8px;
    background-color: #e6f3ff;
    border-left: 3px solid #0066cc;
    border-radius: 3px;
    transition: opacity 0.3s ease-in-out;
}

.completion-link a {
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
    font-weight: normal;
}

.completion-link a:hover {
    text-decoration: underline;
}

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

.btn {
    background-color: #f56a6a;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 0 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0052a3;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.status {
    text-align: center;
    margin: 20px 0;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
}

.status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #d63384;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    margin: 20px;
}

.puzzle-loader {
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.puzzle-loader h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-size: 16px;
}

.puzzle-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.puzzle-input-group input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    flex: 1;
    max-width: 300px;
}

.puzzle-input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.btn-secondary {
    background-color: #6c757d !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .cell {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }
    
    .puzzle-input-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .puzzle-input-group input {
        min-width: 100%;
        max-width: 100%;
    }
}