/* Estilo Base */
.cw-wrapper-pro {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    padding: 30px;
    border-radius: 16px;
    max-width: 950px;
    margin: 0 auto;
    color: #333;
}

.cw-header h3 { margin: 0 0 5px 0; color: #2c3e50; font-size: 1.8rem; }
.cw-header p { margin: 0 0 25px 0; color: #64748b; }

/* Panel de Configuración */
.cw-panel-config {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.cw-input-group { margin-bottom: 20px; }
.cw-input-group label { display: block; font-weight: 600; margin-bottom: 8px; color: #475569; }
.cw-input-text, .cw-textarea {
    width: 100%; padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px; 
    font-size: 15px; box-sizing: border-box; transition: border-color 0.2s;
}
.cw-input-text:focus, .cw-textarea:focus { border-color: #3498db; outline: none; }
.cw-textarea { height: 120px; font-family: monospace; resize: vertical; }

/* Botones */
.cw-actions-row, .cw-game-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.cw-game-actions { justify-content: center; background: #e2e8f0; padding: 15px; border-radius: 10px; }

.cw-btn {
    padding: 12px 20px; border: none; border-radius: 8px; font-weight: 700;
    cursor: pointer; font-size: 14px; text-transform: uppercase; color: white;
    transition: transform 0.1s;
}
.cw-btn:hover { transform: translateY(-2px); opacity: 0.9; }

.cw-btn-primary { background: #3498db; }
.cw-btn-danger { background: #e74c3c; }
.cw-btn-check { background: #8e44ad; } /* Lila para corregir */
.cw-btn-image { background: #27ae60; } /* Verde para PNG */
.cw-btn-secondary { background: #95a5a6; }

/* Mensajes */
.cw-warning-box { margin-top: 20px; background: #fff3cd; border-left: 5px solid #ffc107; padding: 15px; color: #856404; }
.cw-feedback-msg { text-align: center; padding: 15px; margin-bottom: 20px; border-radius: 8px; font-weight: bold; font-size: 1.1rem; }
.cw-msg-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.cw-msg-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Resultados (Lo que se imprime/captura) */
.cw-result-container {
    background: white; padding: 40px; border-radius: 0; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}
.cw-print-header { text-align: center; margin-bottom: 20px; }
.cw-print-header h1 { margin: 0; font-size: 2.2rem; color: #2c3e50; }

.cw-grid-stage {
    display: flex; justify-content: center; padding: 20px; margin-bottom: 20px;
}

/* GRILLA */
.cw-grid { display: grid; gap: 2px; padding: 5px; background: transparent; }
.cw-cell {
    width: 38px; height: 38px; background: transparent; position: relative;
    display: flex; align-items: center; justify-content: center;
}
.cw-cell.active {
    background: white; border: 2px solid #334155; border-radius: 4px;
}

/* Validación visual */
.cw-cell.correct { background-color: #d4edda !important; border-color: #28a745 !important; }
.cw-cell.incorrect { background-color: #f8d7da !important; border-color: #dc3545 !important; }

.cw-cell input {
    width: 100%; height: 100%; border: none; text-align: center; font-size: 20px;
    font-weight: 800; color: #1e293b; background: transparent; text-transform: uppercase; outline: none; padding: 0;
}
.cw-num-idx { position: absolute; top: 1px; left: 3px; font-size: 10px; color: #64748b; pointer-events: none; }

/* Pistas */
.cw-clues-box {
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
    border-top: 2px solid #eee; padding-top: 20px;
}
.cw-clue-col h4 { color: #3498db; border-bottom: 1px solid #eee; padding-bottom: 5px; }
.cw-clue-col ul { padding-left: 20px; }
.cw-clue-col li { margin-bottom: 6px; line-height: 1.4; color: #333; }

.cw-footer-brand {
    text-align: center; margin-top: 30px; font-size: 0.8rem; color: #aaa; font-style: italic;
}