/* Crossword Puzzle Generator Styles */

.cwg-container {
    max-width: 1000px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.cwg-header h2 {
    font-size: 2rem;
    color: #333;
    margin: 0;
}

.cwg-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.cwg-grid-container {
    display: flex;
    justify-content: center;
    align-items: start;
}

.cwg-grid {
    display: inline-block;
    border: 3px solid #333;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cwg-grid-row {
    display: flex;
}

.cwg-grid-cell {
    width: 40px;
    height: 40px;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    position: relative;
}

.cwg-grid-cell.black {
    background: #333;
    cursor: default;
}

.cwg-grid-cell.white {
    background: white;
    cursor: cell;
}

.cwg-grid-cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
    padding: 0;
}

.cwg-grid-cell input:focus {
    outline: none;
    background: #fff8e1;
}

.cwg-grid-cell input.selected {
    background: #ffeb3b;
}

.cwg-grid-cell input.correct {
    background: #c8e6c9;
}

.cwg-grid-cell input.incorrect {
    background: #ffcdd2;
}

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

.cwg-clues-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cwg-clues-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.cwg-clues-section h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2rem;
}

.cwg-clues-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cwg-clue {
    padding: 10px;
    background: white;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cwg-clue:hover {
    background: #f0f4ff;
    transform: translateX(4px);
}

.cwg-clue.selected {
    background: #e3f2fd;
    border-left-color: #1976d2;
}

.cwg-clue-number {
    font-weight: bold;
    color: #667eea;
    margin-right: 8px;
}

.cwg-clue-text {
    color: #555;
}

.cwg-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
}

.cwg-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.cwg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cwg-btn-primary {
    background: #667eea;
    color: white;
}

.cwg-btn-primary:hover {
    background: #5568d3;
}

.cwg-btn-secondary {
    background: #999;
    color: white;
}

.cwg-btn-secondary:hover {
    background: #777;
}

.cwg-btn-success {
    background: #28a745;
    color: white;
}

.cwg-btn-success:hover {
    background: #218838;
}

.cwg-btn-info {
    background: #17a2b8;
    color: white;
}

.cwg-btn-info:hover {
    background: #138496;
}

.cwg-message {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    min-height: 20px;
}

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

.cwg-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

/* Responsive */
@media (max-width: 768px) {
    .cwg-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cwg-clues-container {
        grid-template-columns: 1fr;
    }

    .cwg-grid-cell {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .cwg-controls {
        flex-direction: column;
    }

    .cwg-btn {
        width: 100%;
    }

    .cwg-header h2 {
        font-size: 1.5rem;
    }
}
